]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfstests: Make the requirement of projid32bit explicit in test 244
authorChandra Seetharaman <sekharan@us.ibm.com>
Fri, 17 Jun 2011 15:17:45 +0000 (10:17 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Fri, 17 Jun 2011 15:17:45 +0000 (10:17 -0500)
Test 244 depends on projid32bit feature in mkfs.xfs. Not all versions
of xfsprogs provide that feature in mkfs.xfs.

This patch makes it an explicit requirement and avoids running the test
if the feature doesn't exist, instead of failing the test with an obscure
message.

[slightly modified by Eric Sandeen to shorten the _require name]

Signed-Off-By: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-Off-By: Eric Sandeen <sandeen@redhat.com>
244
common.rc

diff --git a/244 b/244
index 99762a59b004b47f2ddc21492cbc67b8ec146b55..cd5f5e8bf5b4619ffb557e5f626d18f560550995 100755 (executable)
--- a/244
+++ b/244
@@ -48,6 +48,7 @@ _cleanup()
 _supported_fs xfs
 _require_xfs_quota
 _require_scratch
+_require_projid32bit
 
 export MOUNT_OPTIONS="-opquota"
 
index 44c746dffde94c719f5d6fa4eb957c1dfad7ac35..680631d7e595dd23388f9b786e9a5d173f9de64f 100644 (file)
--- a/common.rc
+++ b/common.rc
@@ -815,6 +815,15 @@ _require_command()
     [ -n "$1" -a -x "$1" ] || _notrun "$_cmd utility required, skipped this test"
 }
 
+# this test requires the projid32bit feature to be available in
+# mkfs.xfs
+#
+_require_projid32bit()
+{
+        _scratch_mkfs_xfs -f -i projid32bit=0 2>&1 >/dev/null \
+          || _notrun "mkfs.xfs doesn't have projid32bit feature"
+}
+
 # this test requires that external log/realtime devices are not in use
 #
 _require_nonexternal()