]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
fstests: test for CONFIG_QFMT_V2 in _require_quota
authorEric Sandeen <sandeen@redhat.com>
Fri, 14 Mar 2025 15:44:16 +0000 (10:44 -0500)
committerZorro Lang <zlang@kernel.org>
Fri, 28 Mar 2025 01:17:39 +0000 (09:17 +0800)
When CONFIG_QUOTA is enabled but CONFIG_QFMT_V2 is disabled in the
kernel config, many quota tests on ext4 will fail in odd ways,
when in fact they should be _notrun. Add a CONFIG_QFMT_V2 test to
_require_quota() to catch this for filesystems that require it.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Bill O'Donnell <bodonnel@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/quota
tests/ext4/053
tests/ext4/055

index e306e2e33b119cfddc1cca772277431ae4df67aa..a51386b1dd249b8b0fb6fc5de11c93c6214e3ea8 100644 (file)
@@ -16,6 +16,7 @@ _require_quota()
        if [ ! -d /proc/sys/fs/quota ]; then
            _notrun "Installed kernel does not support quotas"
        fi
+       _require_kernel_config CONFIG_QFMT_V2
        ;;
     gfs2|ocfs2|bcachefs)
        ;;
index 5922ed571d8af56f40171f4e828a68c5e3d28f4d..77b3ac8171f0c091263c7f31fdbcebc977f9bc60 100755 (executable)
@@ -45,7 +45,6 @@ _require_loop
 _require_command "$TUNE2FS_PROG" tune2fs
 MKE2FS_PROG=$(type -P mke2fs)
 _require_command "$MKE2FS_PROG" mke2fs
-_require_kernel_config CONFIG_QFMT_V2
 
 LOG=""
 print_log() {
index 3117bf15f9f07e0799c831a7e3e228f481cb3508..711d18c227e62e71cef08bd25ae7892f70c8bffb 100755 (executable)
@@ -14,6 +14,7 @@
 # The test is based on a testcase from Zhang Yi <yi.zhang@huawei.com>.
 #
 . ./common/preamble
+. ./common/quota
 _begin_fstest auto quota
 
 _exclude_fs ext2
@@ -23,6 +24,7 @@ _require_scratch_nocheck
 _require_user fsgqa
 _require_user fsgqa2
 _require_command "$DEBUGFS_PROG" debugfs
+_require_quota
 
 echo "Silence is golden"