xfs
[Top] [All Lists]

[PATCH] xfstests: fix flink test

To: <linux-btrfs@xxxxxxxxxxxxxxx>, <xfs@xxxxxxxxxxx>
Subject: [PATCH] xfstests: fix flink test
From: Josef Bacik <jbacik@xxxxxx>
Date: Wed, 7 May 2014 16:54:47 -0400
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fb.com; h=from : to : subject : date : message-id : mime-version : content-type; s=facebook; bh=4MeCTwutRqrnCLwTms6d1XYunnBOD49Z4TslbV/fDLQ=; b=MP3JgArT4iScLe9Y+oxE5Aj9xtFYOxYXF9XqDZHbLShtcHhJjA4cLPKRc7MzZwkSPht0 hd47cTRI8ZJrVRVU9O9G+T1pdEeTklKBv5BjApwjPCPWQUuqjIcRZJ0FuC1U4KfhTk2a mXqvcyHIX3dZ4qxgiFGecG8trZdM5wVg61Y=
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.  So fix
_require_xfs_io_command to check for an invalid option and not run.  This way I
get notrun instead of a failure.  Thanks,

Signed-off-by: Josef Bacik <jbacik@xxxxxx>
---
 common/rc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/rc b/common/rc
index 5c13db5..4fa7e63 100644
--- a/common/rc
+++ b/common/rc
@@ -1258,6 +1258,8 @@ _require_xfs_io_command()
                _notrun "xfs_io $command support is missing"
        echo $testio | grep -q "Operation not supported" && \
                _notrun "xfs_io $command failed (old kernel/wrong fs?)"
+       echo $testio | grep -q "invalid option" && \
+               _notrun "xfs_io $command support is missing"
 }
 
 # Check that a fs has enough free space (in 1024b blocks)
-- 
1.8.3.1

<Prev in Thread] Current Thread [Next in Thread>