Skip to contentSkip to conversation

generic/38[3-6]: require project quota to be enabled on SCRATCH_DEV

PATCH In review Eryu Guan 3 participants 3 messages Nov 12, 2016 – Dec 13, 2016

lore
Share & tools
lore

Eryu Guan

author
#0 lore raw

PATCH 1/1 generic/38[3-6]: require project quota to be enabled on SCRATCH_DEV

generic/38[3-6] are made generic from xfs tests to test project quota on other filesystems, e.g. ext4. But we should make sure project quota is enabled in between of _scratch_enable_pquota and _qmount. Otherwise mount will fail if there's no project quota support on SCRATCH_DEV, e.g. ext2 and ext3.

---
 tests/generic/383 | 1 +
 tests/generic/384 | 2 +-
 tests/generic/385 | 2 +-
 tests/generic/386 | 2 +-
 4 files changed, 4 insertions(+), 3 deletions(-)
tests/generic/383 +1 -0
index be5b19b..93836ea 100755
@@ -54,6 +54,7 @@ _require_xfs_quota_foreign
 
 _scratch_mkfs >/dev/null 2>&1
 _scratch_enable_pquota
+_require_prjquota $SCRATCH_DEV
 
 do_project_test()
 {
tests/generic/384 +1 -1
index 452d26e..4784e47 100755
@@ -73,10 +73,10 @@ chmod a+rwx $seqres.full	# arbitrary users will write here
 _require_scratch
 _scratch_mkfs >/dev/null 2>&1
 _scratch_enable_pquota
+_require_prjquota $SCRATCH_DEV
 
 _qmount_option "prjquota"
 _qmount
-_require_prjquota $SCRATCH_DEV
 
 report_quota()
 {
tests/generic/385 +1 -1
index f07ae5d..b7c5bd3 100755
@@ -71,9 +71,9 @@ quota_cmd="$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid"
 
 _scratch_mkfs >/dev/null 2>&1
 _scratch_enable_pquota
+_require_prjquota $SCRATCH_DEV
 _qmount_option "prjquota"
 _qmount
-_require_prjquota $SCRATCH_DEV
 
 #
 # Create the project root
tests/generic/386 +1 -1
index 3aede60..0ceb14d 100755
@@ -127,10 +127,10 @@ echo $proj_num:$proj_dir > "$my_projects"
 
 _scratch_mkfs					>> "$seqres.full" 2>&1
 _scratch_enable_pquota
+_require_prjquota $SCRATCH_DEV
 
 _qmount_option "prjquota"
 _qmount
-_require_prjquota $SCRATCH_DEV
 
 mkdir -p "${proj_dir}"
 
Signature · 1 line
2.7.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Eryu Guan

generic/38[3-6] are made generic from xfs tests to test project quota on other filesystems, e.g. ext4. But we should make sure project quota is enabled in between of _scratch_enable_pquota and _qmount. Otherwise mount will fail if there's no project quota support on SCRATCH_DEV, e.g. ext2 and ext3.

looks fine.

Signature · 2 lines
Dave Chinner
[email protected]
#2 lore raw
In reply to Eryu Guan
Quoted 31 lines · Eryu Guan

generic/38[3-6] are made generic from xfs tests to test project quota on other filesystems, e.g. ext4. But we should make sure project quota is enabled in between of _scratch_enable_pquota and _qmount. Otherwise mount will fail if there's no project quota support on SCRATCH_DEV, e.g. ext2 and ext3.

---
 tests/generic/383 | 1 +
 tests/generic/384 | 2 +-
 tests/generic/385 | 2 +-
 tests/generic/386 | 2 +-
 4 files changed, 4 insertions(+), 3 deletions(-)
tests/generic/383 +1 -0
index be5b19b..93836ea 100755
@@ -54,6 +54,7 @@ _require_xfs_quota_foreign
 
 _scratch_mkfs >/dev/null 2>&1
 _scratch_enable_pquota
+_require_prjquota $SCRATCH_DEV
 
 do_project_test()
 {
tests/generic/384 +0 -0
index 452d26e..4784e47 100755

tests/generic/384 chmod a+rwx $seqres.full # arbitrary users will write here · line 79

Quoted 8 lines
tests/generic/384 +1 -1
@@ -73,10 +73,10 @@ chmod a+rwx $seqres.full	# arbitrary users will write here
 _require_scratch
 _scratch_mkfs >/dev/null 2>&1
 _scratch_enable_pquota
+_require_prjquota $SCRATCH_DEV
 
 _qmount_option "prjquota"
 _qmount
-_require_prjquota $SCRATCH_DEV

This commit seems to break things, on ext4 as well as on xfs. (Bill ran into this)

how can _require_projquota, which uses src/feature to call a quotactl, operate before the filesystem is mounted:

# ./check  generic/384
FSTYP         -- xfs (non-debug)
PLATFORM      -- Linux/x86_64 bp-05 4.9.0-rc1+
MKFS_OPTIONS  -- -f -bsize=4096 /dev/sdb2
MOUNT_OPTIONS -- -o context=system_u:object_r:nfs_t:s0 /dev/sdb2 /mnt/scratch

generic/384 [not run] Installed kernel does not support project quotas

did this work for you?

-Eric