From: Josef Bacik Date: Tue, 13 May 2014 05:30:03 +0000 (+1000) Subject: common: fix flink check X-Git-Tag: v2022.05.01~3138 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=0fd4705782c3748b2f83a10ce7cb7f33ffc8ad77;p=users%2Fhch%2Fxfstests-dev.git common: fix flink check I don't have flink support in my xfsprogs, but it doesn't fail with "command not found" or whatever, it fails because I don't have the -T option, whereas Eric gets an error about $TEST_DIR being a directory because his xfs_io tries to open the directory first before it parses the options. So fix this by checking flink with these two cases and don't run if we hit either of them. Thanks, Signed-off-by: Josef Bacik Reviewed-by: Eric Sandeen Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner --- diff --git a/common/rc b/common/rc index 154cde14b..d1788d1f6 100644 --- a/common/rc +++ b/common/rc @@ -1266,6 +1266,8 @@ _require_xfs_io_command() "flink" ) testio=`$XFS_IO_PROG -T -F -c "flink $testfile" \ $TEST_DIR 2>&1` + echo $testio | egrep -q "invalid option|Is a directory" && \ + _notrun "xfs_io $command support is missing" ;; *) testio=`$XFS_IO_PROG -c "$command help" 2>&1`