From: Su Yue Date: Mon, 8 Dec 2025 06:58:29 +0000 (+0800) Subject: generic: use _qmount_option and _qmount X-Git-Tag: v2026.01.05~29 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f02d4965d48f59f53a729e9ddd55fb8fcc373f85;p=xfstests-dev.git generic: use _qmount_option and _qmount This commit touches generic tests call `_scratch_mount -o usrquota` then chmod 777, quotacheck and quotaon. They can be simpilfied to _qmount_option and _qmount. _qmount already calls quotacheck, quota and chmod ugo+rwx. The conversions can save a few lines. Signed-off-by: Su Yue Reviewed-by: Darrick J. Wong Signed-off-by: Zorro Lang --- diff --git a/tests/generic/231 b/tests/generic/231 index ce7e62ea..02910523 100755 --- a/tests/generic/231 +++ b/tests/generic/231 @@ -47,10 +47,8 @@ _require_quota _require_user _scratch_mkfs >> $seqres.full 2>&1 -_scratch_mount "-o usrquota,grpquota" -chmod 777 $SCRATCH_MNT -quotacheck -u -g $SCRATCH_MNT 2>/dev/null -quotaon -u -g $SCRATCH_MNT 2>/dev/null +_qmount_option "usrquota,grpquota" +_qmount if ! _fsx 1; then _scratch_unmount 2>/dev/null diff --git a/tests/generic/232 b/tests/generic/232 index c903a561..21375809 100755 --- a/tests/generic/232 +++ b/tests/generic/232 @@ -44,10 +44,8 @@ _require_scratch _require_quota _scratch_mkfs > $seqres.full 2>&1 -_scratch_mount "-o usrquota,grpquota" -chmod 777 $SCRATCH_MNT -quotacheck -u -g $SCRATCH_MNT 2>/dev/null -quotaon -u -g $SCRATCH_MNT 2>/dev/null +_qmount_option "usrquota,grpquota" +_qmount _fsstress _check_quota_usage diff --git a/tests/generic/233 b/tests/generic/233 index 3fc1b63a..4606f3bd 100755 --- a/tests/generic/233 +++ b/tests/generic/233 @@ -59,10 +59,8 @@ _require_quota _require_user _scratch_mkfs > $seqres.full 2>&1 -_scratch_mount "-o usrquota,grpquota" -chmod 777 $SCRATCH_MNT -quotacheck -u -g $SCRATCH_MNT 2>/dev/null -quotaon -u -g $SCRATCH_MNT 2>/dev/null +_qmount_option "usrquota,grpquota" +_qmount setquota -u $qa_user 32000 32000 1000 1000 $SCRATCH_MNT 2>/dev/null _fsstress diff --git a/tests/generic/270 b/tests/generic/270 index c3d5127a..9ac829a7 100755 --- a/tests/generic/270 +++ b/tests/generic/270 @@ -62,10 +62,8 @@ _require_command "$SETCAP_PROG" setcap _require_attrs security _scratch_mkfs_sized $((512 * 1024 * 1024)) >> $seqres.full 2>&1 -_scratch_mount "-o usrquota,grpquota" -chmod 777 $SCRATCH_MNT -quotacheck -u -g $SCRATCH_MNT 2>/dev/null -quotaon -u -g $SCRATCH_MNT 2>/dev/null +_qmount_option "usrquota,grpquota" +_qmount if ! _workout; then _scratch_unmount 2>/dev/null