[PATCH V2] fstests: test for CONFIG_QFMT_V2 in _require_quota

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



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@xxxxxxxxxx>
Reviewed-by: Jan Kara <jack@xxxxxxx>
---

V2: add _require_quota to ext4/055, because it adds the -O quota
feature at mkfs time, and mount fails without CONFIG_QFMT_V2.
Jan, I took the liberty of leaving your RVB: despite that minor change,
please let me know if you object. Thanks!

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 <yi.zhang@xxxxxxxxxx>.
 #
 . ./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"
 





[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux