All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: Make 'man' hard requirement for xfs/293
@ 2017-05-23 11:45 Nikolay Borisov
  2017-05-23 14:01 ` Eryu Guan
  0 siblings, 1 reply; 4+ messages in thread
From: Nikolay Borisov @ 2017-05-23 11:45 UTC (permalink / raw)
  To: fstests; +Cc: Nikolay Borisov

If xfs/293 is run on a system which doesn't have 'man' installed
it will hang the due to $CAT waiting for input indefinitely

Signed-off-by: Nikolay Borisov <nborisov@suse.com>

---
 tests/xfs/293 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/xfs/293 b/tests/xfs/293
index df44e98e..9556b4bb 100755
--- a/tests/xfs/293
+++ b/tests/xfs/293
@@ -40,6 +40,8 @@ _cleanup()
 . ./common/rc
 . ./common/filter
 
+_require_command man man
+
 # real QA test starts here
 
 # Modify as appropriate.
-- 
2.12.3


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

* Re: [PATCH] xfs: Make 'man' hard requirement for xfs/293
  2017-05-23 11:45 [PATCH] xfs: Make 'man' hard requirement for xfs/293 Nikolay Borisov
@ 2017-05-23 14:01 ` Eryu Guan
  2017-05-23 14:16   ` [PATCH v2] " Nikolay Borisov
  0 siblings, 1 reply; 4+ messages in thread
From: Eryu Guan @ 2017-05-23 14:01 UTC (permalink / raw)
  To: Nikolay Borisov; +Cc: fstests

On Tue, May 23, 2017 at 02:45:43PM +0300, Nikolay Borisov wrote:
> If xfs/293 is run on a system which doesn't have 'man' installed
> it will hang the due to $CAT waiting for input indefinitely
> 
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>

Yeah, we need to make sure 'man' is available.

> 
> ---
>  tests/xfs/293 | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tests/xfs/293 b/tests/xfs/293
> index df44e98e..9556b4bb 100755
> --- a/tests/xfs/293
> +++ b/tests/xfs/293
> @@ -40,6 +40,8 @@ _cleanup()
>  . ./common/rc
>  . ./common/filter
>  
> +_require_command man man
> +

Can you please add an entry in common/config for $MAN_PROG and do the
check in xfs/293 *after* _supported_os call, and call $MAN_PROG instead
of bare 'man'?

Thanks,
Eryu

>  # real QA test starts here
>  
>  # Modify as appropriate.
> -- 
> 2.12.3
> 
> --
> 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] 4+ messages in thread

* [PATCH v2] xfs: Make 'man' hard requirement for xfs/293
  2017-05-23 14:01 ` Eryu Guan
@ 2017-05-23 14:16   ` Nikolay Borisov
  2017-05-23 14:32     ` Eryu Guan
  0 siblings, 1 reply; 4+ messages in thread
From: Nikolay Borisov @ 2017-05-23 14:16 UTC (permalink / raw)
  To: eguan; +Cc: fstests, Nikolay Borisov, Nikolay Borisov

From: Nikolay Borisov <nborsiov@suse.com>

If xfs/293 is run on a system which doesn't have 'man' installed
it will hang the due to $CAT waiting for input indefinitely. Also
create an entry for $MAN_PROG and use the cached $MANPAGE instead
of repeatedy calling $MAN_PROG --page

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
 common/config | 1 +
 tests/xfs/293 | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/common/config b/common/config
index 8211356c..eb5b36b0 100644
--- a/common/config
+++ b/common/config
@@ -196,6 +196,7 @@ export XZ_PROG="`set_prog_path xz`"
 export FLOCK_PROG="`set_prog_path flock`"
 export LDD_PROG="`set_prog_path ldd`"
 export TIMEOUT_PROG="`set_prog_path timeout`"
+export MAN_PROG="`set_prog_path man`"
 
 # use 'udevadm settle' or 'udevsettle' to wait for lv to be settled.
 # newer systems have udevadm command but older systems like RHEL5 don't.
diff --git a/tests/xfs/293 b/tests/xfs/293
index df44e98e..24b0a992 100755
--- a/tests/xfs/293
+++ b/tests/xfs/293
@@ -40,15 +40,18 @@ _cleanup()
 . ./common/rc
 . ./common/filter
 
+
 # real QA test starts here
 
 # Modify as appropriate.
 _supported_fs xfs
 _supported_os IRIX Linux
 
+_require_command man man
+
 echo "Silence is golden"
 
-MANPAGE=`man --path xfs_io`
+MANPAGE=`$MAN_PROG --path xfs_io`
 
 case "$MANPAGE" in
 *.gz|*.z\|*.Z)	CAT=zcat;;
@@ -60,7 +63,7 @@ esac
 _require_command `which $CAT` $CAT
 
 for COMMAND in `$XFS_IO_PROG -c help | awk '{print $1}' | grep -v "^Use"`; do
-  $CAT `man --path xfs_io` | egrep -q "^\.B.*$COMMAND" || \
+  $CAT "$MANPAGE" | egrep -q "^\.B.*$COMMAND" || \
 	echo "$COMMAND not documented in the xfs_io manpage"
 done
 
-- 
2.12.3


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

* Re: [PATCH v2] xfs: Make 'man' hard requirement for xfs/293
  2017-05-23 14:16   ` [PATCH v2] " Nikolay Borisov
@ 2017-05-23 14:32     ` Eryu Guan
  0 siblings, 0 replies; 4+ messages in thread
From: Eryu Guan @ 2017-05-23 14:32 UTC (permalink / raw)
  To: Nikolay Borisov; +Cc: fstests, Nikolay Borisov

On Tue, May 23, 2017 at 05:16:40PM +0300, Nikolay Borisov wrote:
> From: Nikolay Borisov <nborsiov@suse.com>
> 
> If xfs/293 is run on a system which doesn't have 'man' installed
> it will hang the due to $CAT waiting for input indefinitely. Also
> create an entry for $MAN_PROG and use the cached $MANPAGE instead
> of repeatedy calling $MAN_PROG --page

Thanks for the update! I did minor modifications and queued it for next
fstests update.

> 
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>
> ---
>  common/config | 1 +
>  tests/xfs/293 | 7 +++++--
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/common/config b/common/config
> index 8211356c..eb5b36b0 100644
> --- a/common/config
> +++ b/common/config
> @@ -196,6 +196,7 @@ export XZ_PROG="`set_prog_path xz`"
>  export FLOCK_PROG="`set_prog_path flock`"
>  export LDD_PROG="`set_prog_path ldd`"
>  export TIMEOUT_PROG="`set_prog_path timeout`"
> +export MAN_PROG="`set_prog_path man`"
>  
>  # use 'udevadm settle' or 'udevsettle' to wait for lv to be settled.
>  # newer systems have udevadm command but older systems like RHEL5 don't.
> diff --git a/tests/xfs/293 b/tests/xfs/293
> index df44e98e..24b0a992 100755
> --- a/tests/xfs/293
> +++ b/tests/xfs/293
> @@ -40,15 +40,18 @@ _cleanup()
>  . ./common/rc
>  . ./common/filter
>  
> +

Removed this extra new line.

>  # real QA test starts here
>  
>  # Modify as appropriate.
>  _supported_fs xfs
>  _supported_os IRIX Linux
>  
> +_require_command man man

_require_command "$MAN_PROG" man, otherwise test _notrun

xfs/293  [not run] man utility required, skipped this test

Thanks,
Eryu

> +
>  echo "Silence is golden"
>  
> -MANPAGE=`man --path xfs_io`
> +MANPAGE=`$MAN_PROG --path xfs_io`
>  
>  case "$MANPAGE" in
>  *.gz|*.z\|*.Z)	CAT=zcat;;
> @@ -60,7 +63,7 @@ esac
>  _require_command `which $CAT` $CAT
>  
>  for COMMAND in `$XFS_IO_PROG -c help | awk '{print $1}' | grep -v "^Use"`; do
> -  $CAT `man --path xfs_io` | egrep -q "^\.B.*$COMMAND" || \
> +  $CAT "$MANPAGE" | egrep -q "^\.B.*$COMMAND" || \
>  	echo "$COMMAND not documented in the xfs_io manpage"
>  done
>  
> -- 
> 2.12.3
> 

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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-23 11:45 [PATCH] xfs: Make 'man' hard requirement for xfs/293 Nikolay Borisov
2017-05-23 14:01 ` Eryu Guan
2017-05-23 14:16   ` [PATCH v2] " Nikolay Borisov
2017-05-23 14:32     ` 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.