All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] _require_command: fixed typo
@ 2015-05-07 16:08 Omer Zilberberg
  2015-05-07 16:09 ` Eric Sandeen
  2015-05-18  8:16 ` Eryu Guan
  0 siblings, 2 replies; 3+ messages in thread
From: Omer Zilberberg @ 2015-05-07 16:08 UTC (permalink / raw)
  To: fstests; +Cc: Omer Zilberberg

fixes 9435b92 common: _require_command needs to handle parameters

Signed-off-by: Omer Zilberberg <omzg@plexistor.com>
---
 common/rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/rc b/common/rc
index 6ea107e..cd0f3e6 100644
--- a/common/rc
+++ b/common/rc
@@ -1299,7 +1299,7 @@ _require_command()
 	fi
 
 	_command=`echo "$1" | awk '{ print $1 }'`
-	if [ ! -x $command ]; then
+	if [ ! -x $_command ]; then
 		_notrun "$_name utility required, skipped this test"
 	fi
 }
-- 
1.9.3


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

* Re: [PATCH] _require_command: fixed typo
  2015-05-07 16:08 [PATCH] _require_command: fixed typo Omer Zilberberg
@ 2015-05-07 16:09 ` Eric Sandeen
  2015-05-18  8:16 ` Eryu Guan
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Sandeen @ 2015-05-07 16:09 UTC (permalink / raw)
  To: Omer Zilberberg, fstests

On 5/7/15 11:08 AM, Omer Zilberberg wrote:
> fixes 9435b92 common: _require_command needs to handle parameters
> 
> Signed-off-by: Omer Zilberberg <omzg@plexistor.com>

Yep, thanks!

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  common/rc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/rc b/common/rc
> index 6ea107e..cd0f3e6 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -1299,7 +1299,7 @@ _require_command()
>  	fi
>  
>  	_command=`echo "$1" | awk '{ print $1 }'`
> -	if [ ! -x $command ]; then
> +	if [ ! -x $_command ]; then
>  		_notrun "$_name utility required, skipped this test"
>  	fi
>  }
> 


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

* Re: [PATCH] _require_command: fixed typo
  2015-05-07 16:08 [PATCH] _require_command: fixed typo Omer Zilberberg
  2015-05-07 16:09 ` Eric Sandeen
@ 2015-05-18  8:16 ` Eryu Guan
  1 sibling, 0 replies; 3+ messages in thread
From: Eryu Guan @ 2015-05-18  8:16 UTC (permalink / raw)
  To: Omer Zilberberg; +Cc: fstests

On Thu, May 07, 2015 at 07:08:36PM +0300, Omer Zilberberg wrote:
> fixes 9435b92 common: _require_command needs to handle parameters
> 
> Signed-off-by: Omer Zilberberg <omzg@plexistor.com>
> ---
>  common/rc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/rc b/common/rc
> index 6ea107e..cd0f3e6 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -1299,7 +1299,7 @@ _require_command()
>  	fi
>  
>  	_command=`echo "$1" | awk '{ print $1 }'`
> -	if [ ! -x $command ]; then
> +	if [ ! -x $_command ]; then

Can you please send v2 with $_command quoted? I found that if $_command
is empty -x still treats it as executable, but not empty quoted string.

# prints ok
if [ -x ]; then echo ok; fi

# prints nothing
if [ -x "" ]; then echo ok; fi

Thanks,
Eryu

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

end of thread, other threads:[~2015-05-18  8:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-07 16:08 [PATCH] _require_command: fixed typo Omer Zilberberg
2015-05-07 16:09 ` Eric Sandeen
2015-05-18  8:16 ` Eryu Guan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.