From: Eric Sandeen Date: Fri, 14 Mar 2025 15:44:16 +0000 (-0500) Subject: fstests: test for CONFIG_QFMT_V2 in _require_quota X-Git-Tag: v2025.03.30~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cd4ca5ac3512cbfd5fd929c243c90aa3b2d7613d;p=xfstests-dev.git fstests: test for CONFIG_QFMT_V2 in _require_quota 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 Reviewed-by: Jan Kara Reviewed-by: Bill O'Donnell Signed-off-by: Zorro Lang --- diff --git a/common/quota b/common/quota index e306e2e3..a51386b1 100644 --- a/common/quota +++ b/common/quota @@ -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) ;; diff --git a/tests/ext4/053 b/tests/ext4/053 index 5922ed57..77b3ac81 100755 --- a/tests/ext4/053 +++ b/tests/ext4/053 @@ -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() { diff --git a/tests/ext4/055 b/tests/ext4/055 index 3117bf15..711d18c2 100755 --- a/tests/ext4/055 +++ b/tests/ext4/055 @@ -14,6 +14,7 @@ # The test is based on a testcase from Zhang Yi . # . ./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"