@@ -113,6 +113,13 @@ _require_btrfs_fs_sysfs()
}
+_require_btrfs_no_compress()
+{
+ if _normalize_mount_options | grep -q "compress"; then
+ _notrun "This test requires no compression enabled"
+ fi
+}
+
_check_btrfs_filesystem()
{
device=$1
@@ -1676,6 +1676,17 @@ _require_scratch_nocheck()
rm -f ${RESULT_DIR}/require_scratch
}
+_require_no_compress()
+{
+ case "$FSTYP" in
+ btrfs)
+ _require_btrfs_no_compress
+ ;;
+ *)
+ ;;
+ esac
+}
+
# we need the scratch device and it should be checked post test.
_require_scratch()
{
@@ -19,6 +19,10 @@ _supported_fs btrfs
_require_scratch
_require_btrfs_qgroup_report
+# This test requires specific data space usage, skip if we have compression
+# enabled.
+_require_no_compress
+
_scratch_mkfs >/dev/null
# Use enospc_debug mount option to trigger restrict space info check
_scratch_mount "-o enospc_debug"
@@ -19,6 +19,10 @@ _supported_fs btrfs
# We at least need 2GB of free space on $SCRATCH_DEV
_require_scratch_size $((2 * 1024 * 1024))
+# This test requires specific data space usage, skip if we have compression
+# enabled.
+_require_no_compress
+
_scratch_mkfs > /dev/null 2>&1
_scratch_mount
@@ -17,6 +17,10 @@ _begin_fstest auto quick qgroup limit
_supported_fs btrfs
+# This test requires specific data space usage, skip if we have compression
+# enabled.
+_require_no_compress
+
# Need at least 2GiB
_require_scratch_size $((2 * 1024 * 1024))
_scratch_mkfs > /dev/null 2>&1
@@ -33,6 +33,10 @@ writer()
_supported_fs btrfs
+# This test requires specific data space usage, skip if we have compression
+# enabled.
+_require_no_compress
+
_require_scratch_size $((2 * 1024 * 1024))
_scratch_mkfs > /dev/null 2>&1
_scratch_mount
@@ -24,6 +24,10 @@ _require_btrfs_command filesystem sync
_require_command "$BLKZONE_PROG" blkzone
_require_zoned_device "$SCRATCH_DEV"
+# This test requires specific data space usage, skip if we have compression
+# enabled.
+_require_no_compress
+
get_data_bg()
{
$BTRFS_UTIL_PROG inspect-internal dump-tree -t CHUNK $SCRATCH_DEV |\
@@ -25,6 +25,10 @@ _cleanup()
_supported_fs generic
_require_scratch
+# This test requires specific data space usage, skip if we have compression
+# enabled.
+_require_no_compress
+
echo "------------------------------"
echo "write until ENOSPC test"
echo "------------------------------"
@@ -22,6 +22,10 @@ _require_scratch
_require_test_program "feature"
_require_aiodio aio-dio-eof-race
+# This test requires specific data space usage, skip if we have compression
+# enabled.
+_require_no_compress
+
# limit the filesystem size, to save the time of filling filesystem
_scratch_mkfs_sized $((256 * 1024 * 1024)) >>$seqres.full 2>&1
_scratch_mount
Our nightly xfstests runs exposed a set of tests that always fail if we have compression enabled. This is because compression obviously messes with the amount of data space allocated on disk, and these tests are testing either that quota is doing the correct thing, or that we're able to completely fill the file system. Add a helper to check to see if we have any of our compression related mount options set and simply _not_run for these specific tests. Signed-off-by: Josef Bacik <josef@toxicpanda.com> --- v1->v2: - added _require_no_compress(), made it call the btrfs helper for fstyp == btrfs, changed all the tests to use the generic helper instead. - added the require to btrfs/237 common/btrfs | 7 +++++++ common/rc | 11 +++++++++++ tests/btrfs/126 | 4 ++++ tests/btrfs/139 | 4 ++++ tests/btrfs/230 | 4 ++++ tests/btrfs/232 | 4 ++++ tests/btrfs/237 | 4 ++++ tests/generic/275 | 4 ++++ tests/generic/427 | 4 ++++ 9 files changed, 46 insertions(+)