diff mbox series

[5/5] btrfs: skip squota incompatible tests

Message ID f41f220de0b8e57efc668c3bbf99769898904f0b.1688600422.git.boris@bur.io (mailing list archive)
State New, archived
Headers show
Series btrfs: simple quotas fstests | expand

Commit Message

Boris Burkov July 5, 2023, 11:42 p.m. UTC
These tests cannot succeed if mkfs enable squotas, as they either test
the specifics of qgroups behavior or they test *enabling* squotas. Skip
these in squota mode.

Signed-off-by: Boris Burkov <boris@bur.io>
---
 tests/btrfs/017 | 1 +
 tests/btrfs/057 | 1 +
 tests/btrfs/091 | 3 ++-
 tests/btrfs/400 | 5 +++++
 4 files changed, 9 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/btrfs/017 b/tests/btrfs/017
index 622071018..496cc7df1 100755
--- a/tests/btrfs/017
+++ b/tests/btrfs/017
@@ -22,6 +22,7 @@  _begin_fstest auto quick qgroup
 
 _supported_fs btrfs
 _require_scratch
+_require_scratch_qgroup
 _require_cloner
 
 # Currently in btrfs the node/leaf size can not be smaller than the page
diff --git a/tests/btrfs/057 b/tests/btrfs/057
index 782d854a0..e932a6572 100755
--- a/tests/btrfs/057
+++ b/tests/btrfs/057
@@ -15,6 +15,7 @@  _begin_fstest auto quick
 # real QA test starts here
 _supported_fs btrfs
 _require_scratch
+_require_qgroup_rescan
 
 _scratch_mkfs_sized $((1024 * 1024 * 1024)) >> $seqres.full 2>&1
 
diff --git a/tests/btrfs/091 b/tests/btrfs/091
index f2cd00b2e..a71e03406 100755
--- a/tests/btrfs/091
+++ b/tests/btrfs/091
@@ -19,6 +19,7 @@  _begin_fstest auto quick qgroup
 _supported_fs btrfs
 _require_scratch
 _require_cp_reflink
+_require_scratch_qgroup
 
 # use largest node/leaf size (64K) to allow the test to be run on arch with
 # page size > 4k.
@@ -35,7 +36,7 @@  _run_btrfs_util_prog subvolume create $SCRATCH_MNT/subv2
 _run_btrfs_util_prog subvolume create $SCRATCH_MNT/subv3
 
 _run_btrfs_util_prog quota enable $SCRATCH_MNT
-_run_btrfs_util_prog quota rescan -w $SCRATCH_MNT
+_qgroup_rescan $SCRATCH_MNT
 
 $XFS_IO_PROG -f -c "pwrite 0 256K" $SCRATCH_MNT/subv1/file1 | _filter_xfs_io
 cp --reflink $SCRATCH_MNT/subv1/file1 $SCRATCH_MNT/subv2/file1
diff --git a/tests/btrfs/400 b/tests/btrfs/400
index c3548d42e..e05f259d0 100755
--- a/tests/btrfs/400
+++ b/tests/btrfs/400
@@ -32,6 +32,11 @@  EXT_SZ=$((128 * M))
 LIMIT_NR=8
 LIMIT=$(($EXT_SZ * $LIMIT_NR))
 
+_scratch_mkfs >> $seqres.full
+_scratch_mount
+_qgroup_mode $SCRATCH_MNT | grep 'squota' && _notrun "test relies on starting without simple quotas enabled"
+_scratch_unmount
+
 get_qgroup_usage()
 {
 	local qgroupid=$1