]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfstests: add _require_freeze and minor cleanups
authorEric Sandeen <sandeen@redhat.com>
Wed, 19 Sep 2012 22:53:56 +0000 (17:53 -0500)
committerBen Myers <bpm@sgi.com>
Mon, 24 Sep 2012 16:53:05 +0000 (11:53 -0500)
More filesystems have grown freeze capability, so rather than
hardcoding several in _supported_fs, make tests 068 and 280
generic and then add a new _require_freeze() which checks whether
the fs under test can be frozen before beginning the test.

Minor other cleanups to 280:
- remove extra _supported_fs line
- clear $seq.full before beginning

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
068
280
common.rc

diff --git a/068 b/068
index b595d1df4bc32f4311f499bf156ada1c595c47d0..617420cf1f5dd5e80341c8ecef9affddefddb50d 100755 (executable)
--- a/068
+++ b/068
@@ -51,10 +51,11 @@ trap "_cleanup" 0 1 2 3 15
 . ./common.filter
 
 # real QA test starts here
-_supported_fs btrfs ext3 ext4 xfs
+_supported_fs generic
 _supported_os Linux IRIX
 
 _require_scratch
+_require_freeze
 
 echo "*** init FS"
 
diff --git a/280 b/280
index 55849ed188999edb02b8a52201bc57f0a0e81f65..5e261733e052ee33ff2183e959272ddc2c8da352 100755 (executable)
--- a/280
+++ b/280
@@ -45,13 +45,15 @@ _cleanup()
 
 _require_scratch
 _require_quota
+_require_freeze
 
 # real QA test starts here
 
 # Modify as appropriate.
-_supported_fs generic
 _supported_os Linux
-_supported_fs ext3 ext4 xfs
+_supported_fs generic
+
+rm -f $seq.full
 
 umount $SCRATCH_DEV 2>/dev/null
 _scratch_mkfs >> $seq.full 2>&1
index 602513af8ab3dd63984692e46d1824dee6657151..e7037c1766b9b57baba353d5337a9e16cc78a77d 100644 (file)
--- a/common.rc
+++ b/common.rc
@@ -1758,6 +1758,15 @@ _require_btrfs()
        [ $? -eq 0 ] || _notrun "$BTRFS_UTIL_PROG too old (must support $cmd)"
 }
 
+# Does freeze work on this fs?
+_require_freeze()
+{
+       xfs_freeze -f "$TEST_DIR" >/dev/null 2>&1
+       result=$? 
+       xfs_freeze -u "$TEST_DIR" >/dev/null 2>&1
+       [ $result -eq 0 ] || _notrun "$FSTYP does not support freezing"
+}
+
 # arg 1 is dev to remove and is output of the below eg.
 # ls -l /sys/class/block/sdd | rev | cut -d "/" -f 3 | rev
 _devmgt_remove()