common/rc: _require_xfs_io_command can't analyze multi-parameters
PATCH v2 1/1 common/rc: _require_xfs_io_command can't analyze multi-parameters
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
---
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(-)
common/rc +2 -1
@@ -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
Signature · 1 line
2.5.5
Quoted 6 lines · Zorro Lang
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)
Quoted 6 lines
We should make param="-Z N", not only "-Z". After this patch, we can run this function as:
_require_xfs_io_commandpwrite -Z NSigned-off-by Zorro Lang <[email protected]>
Looks good to me.
Quoted 39 lines
---
Hi,
I did 2 changes in "[PATCH 1/2] common/rc: modify
_require_xfs_io_commandfunction":
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,
Zorrocommon/rc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)common/rc +2
-1@@ -1874,7 +1874,8 @@ _require_xfs_io_command() exit 1 fi command=$1 - param=$2 + shift + param="$*" testfile=$TEST_DIR/$$.xfs_io case $command inSignature · 6 lines
2.5.5 -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Looks fine,