FS/XFS testing framework
 help / color / mirror / Atom feed
* [PATCH v2] common/rc: _require_xfs_io_command can't analyze multi-parameters
@ 2016-05-19  4:30 Zorro Lang
  2016-05-23  9:08 ` Eryu Guan
  2016-05-23 14:59 ` Christoph Hellwig
  0 siblings, 2 replies; 3+ messages in thread
From: Zorro Lang @ 2016-05-19  4:30 UTC (permalink / raw)
  To: fstests; +Cc: 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)

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] common/rc: _require_xfs_io_command can't analyze multi-parameters
  2016-05-19  4:30 [PATCH v2] common/rc: _require_xfs_io_command can't analyze multi-parameters Zorro Lang
@ 2016-05-23  9:08 ` Eryu Guan
  2016-05-23 14:59 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Eryu Guan @ 2016-05-23  9:08 UTC (permalink / raw)
  To: Zorro Lang; +Cc: fstests

On Thu, May 19, 2016 at 12:30:59PM +0800, Zorro Lang wrote:
> 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>

Looks good to me.

Reviewed-by: Eryu Guan <eguan@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
> 
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] common/rc: _require_xfs_io_command can't analyze multi-parameters
  2016-05-19  4:30 [PATCH v2] common/rc: _require_xfs_io_command can't analyze multi-parameters Zorro Lang
  2016-05-23  9:08 ` Eryu Guan
@ 2016-05-23 14:59 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2016-05-23 14:59 UTC (permalink / raw)
  To: Zorro Lang; +Cc: fstests

Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-23 14:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-19  4:30 [PATCH v2] common/rc: _require_xfs_io_command can't analyze multi-parameters Zorro Lang
2016-05-23  9:08 ` Eryu Guan
2016-05-23 14:59 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox