xfs
[Top] [All Lists]

[PATCH 2/5] xfstests: add _require_xfs_[mkfs_]finobt() checks for finobt

To: xfs@xxxxxxxxxxx
Subject: [PATCH 2/5] xfstests: add _require_xfs_[mkfs_]finobt() checks for finobt tests
From: Brian Foster <bfoster@xxxxxxxxxx>
Date: Fri, 2 May 2014 13:13:59 -0400
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1399050842-19633-1-git-send-email-bfoster@xxxxxxxxxx>
References: <1399050842-19633-1-git-send-email-bfoster@xxxxxxxxxx>
Free inode btree tests must ensure that the userspace and kernel bits
are compatible. Add a couple checks for the associated support.

Signed-off-by: Brian Foster <bfoster@xxxxxxxxxx>
---
 common/rc | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/common/rc b/common/rc
index 5c13db5..66a3cb8 100644
--- a/common/rc
+++ b/common/rc
@@ -1113,6 +1113,24 @@ _require_xfs_crc()
        umount $SCRATCH_MNT
 }
 
+# this test requires the finobt feature to be available in mkfs.xfs
+#
+_require_xfs_mkfs_finobt()
+{
+       _scratch_mkfs_xfs_supported -m crc=1,finobt=1 >/dev/null 2>&1 \
+          || _notrun "mkfs.xfs doesn't have finobt feature"
+}
+
+# this test requires the xfs kernel support finobt feature
+#
+_require_xfs_finobt()
+{
+       _scratch_mkfs_xfs -m crc=1,finobt=1 >/dev/null 2>&1
+       _scratch_mount >/dev/null 2>&1 \
+          || _notrun "Kernel doesn't support finobt feature"
+       umount $SCRATCH_MNT
+}
+
 # this test requires that external log/realtime devices are not in use
 #
 _require_nonexternal()
-- 
1.8.3.1

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