From 2d77f85806367be10885ace29faf75fb02264e16 Mon Sep 17 00:00:00 2001 From: Nikolay Borisov Date: Tue, 23 May 2017 17:16:40 +0300 Subject: [PATCH] xfs/293: Make 'man' hard requirement 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 Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- common/config | 1 + tests/xfs/293 | 6 ++++-- 2 files changed, 5 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..6ac08c6f 100755 --- a/tests/xfs/293 +++ b/tests/xfs/293 @@ -46,9 +46,11 @@ _cleanup() _supported_fs xfs _supported_os IRIX Linux +_require_command "$MAN_PROG" 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 +62,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.39.5