From: Zorro Lang <zlang@redhat.com>
To: fstests@vger.kernel.org
Cc: Zorro Lang <zlang@redhat.com>
Subject: [PATCH v2] common/rc: _require_xfs_io_command can't analyze multi-parameters
Date: Thu, 19 May 2016 12:30:59 +0800 [thread overview]
Message-ID: <1463632259-19948-1-git-send-email-zlang@redhat.com> (raw)
The $param can't be used for all command's options, for example
"help pwrite" include:
-Z N -- zeed the random number generator (used when writing randomly)
(heh, zorry, the -s/-S arguments were already in use in pwrite)
We should make param="-Z N", not only "-Z". After this patch, we can
run this function as:
_require_xfs_io_command pwrite -Z N
Signed-off-by: Zorro Lang <zlang@redhat.com>
---
Hi,
I did 2 changes in "[PATCH 1/2] common/rc: modify _require_xfs_io_command
function":
1. change "$command help" to "help $command"
2. change "param=$2" to "shift; param=\"$*\""
V2 patch give up the 1st change (Dave explained why we don't change that),
remain the 2nd change as below.
Thanks,
Zorro
common/rc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/common/rc b/common/rc
index 51092a0..9c532cc 100644
--- a/common/rc
+++ b/common/rc
@@ -1874,7 +1874,8 @@ _require_xfs_io_command()
exit 1
fi
command=$1
- param=$2
+ shift
+ param="$*"
testfile=$TEST_DIR/$$.xfs_io
case $command in
--
2.5.5
next reply other threads:[~2016-05-19 4:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-19 4:30 Zorro Lang [this message]
2016-05-23 9:08 ` [PATCH v2] common/rc: _require_xfs_io_command can't analyze multi-parameters Eryu Guan
2016-05-23 14:59 ` Christoph Hellwig
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=1463632259-19948-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