xfstests: add _require_freeze and minor cleanups

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>
This commit is contained in:
Eric Sandeen
2012-09-19 17:53:56 -05:00
committed by Ben Myers
parent 13149d529b
commit 6565b7986e
3 changed files with 15 additions and 3 deletions
+9
View File
@@ -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()