From: Zorro Lang <zlang@redhat.com>
To: fstests@vger.kernel.org
Cc: zlang@redhat.com
Subject: [PATCH] common/xfs: change _xfs_mkfs_validation_check return logic
Date: Mon, 27 Feb 2017 13:07:59 +0800 [thread overview]
Message-ID: <1488172079-7170-1-git-send-email-zlang@redhat.com> (raw)
_xfs_mkfs_validation_check() try to make sure mkfs.xfs the stricter
input checks. It runs two test command lines with illegal parameters:
$cmd -s size=2s
$cmd -l version=2,su=260k
The current logic think if both of them return 0 (can't find
illegal input), then it means the current xfsprogs doesn't support
the stricter input checks.
But when test on machine with 4k sector size disk, the first command
will return non-zero, and then _xfs_mkfs_validation_check() return
non-zero to _require_xfs_mkfs_validation(). The latter will assume
xfsprogs support the stricter input checks.
So I think the proper logic should be if "any" of test command lines
return 0, then it means xfsprogs can't do stricter input test.
Signed-off-by: Zorro Lang <zlang@redhat.com>
---
common/xfs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/xfs b/common/xfs
index 767a481..0eaa974 100644
--- a/common/xfs
+++ b/common/xfs
@@ -546,7 +546,7 @@ _xfs_mkfs_validation_check()
local sum=$?
$cmd -l version=2,su=260k >/dev/null 2>&1
- sum=`expr $sum + $?`
+ sum=`expr $sum \* $?`
rm -f $tmpfile
return $sum
--
2.7.4
reply other threads:[~2017-02-27 5:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1488172079-7170-1-git-send-email-zlang@redhat.com \
--to=zlang@redhat.com \
--cc=fstests@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox