From: Zorro Lang Date: Thu, 12 May 2022 15:16:56 +0000 (+0800) Subject: generic/603: use project quota create and restore common helpers X-Git-Tag: v2022.05.22~14 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2eb19ea49c654820ee53eecaad53a2d465d0cab5;p=xfstests-dev.git generic/603: use project quota create and restore common helpers As common/quota has _create_project_quota and _restore_project_quota helpers now, so replace local similar functions with them. Reviewed-by: Darrick J. Wong Signed-off-by: Zorro Lang --- diff --git a/tests/generic/603 b/tests/generic/603 index b362a3d0..08ddcbf2 100755 --- a/tests/generic/603 +++ b/tests/generic/603 @@ -13,7 +13,7 @@ _begin_fstest auto quick quota # Override the default cleanup function. _cleanup() { - restore_project + _restore_project_quota cd / rm -f $tmp.* } @@ -22,38 +22,6 @@ _cleanup() . ./common/filter . ./common/quota -require_project() -{ - rm -f $tmp.projects $tmp.projid - if [ -f /etc/projects ];then - cat /etc/projects > $tmp.projects - fi - if [ -f /etc/projid ];then - cat /etc/projid > $tmp.projid - fi - - cat >/etc/projects </etc/projid < /etc/projects - fi - if [ -f $tmp.projid ];then - cat $tmp.projid > /etc/projid - fi - fi -} - init_files() { local dir=$1 @@ -157,7 +125,7 @@ BLOCK_SIZE=$(_get_file_block_size $SCRATCH_MNT) rm -rf $SCRATCH_MNT/t mkdir $SCRATCH_MNT/t $XFS_IO_PROG -r -c "chproj 100" -c "chattr +P" $SCRATCH_MNT/t -require_project +_create_project_quota $SCRATCH_MNT/t 100 $qa_user echo "### Set up different grace timers to each type of quota" UBGRACE=12