From: Jie Liu Date: Wed, 13 Aug 2014 01:15:46 +0000 (+1000) Subject: xfs/007: add project quota Q_XQUOTARM test X-Git-Tag: v2022.05.01~3098 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b8cac56f5b623f300e632576734516b44593db70;p=users%2Fhch%2Fxfstests-dev.git xfs/007: add project quota Q_XQUOTARM test Add test for project quota Q_XQUOTARM operations, update the golden output file to match the new test output. Signed-off-by: Jie Liu Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- diff --git a/tests/xfs/007 b/tests/xfs/007 index 8cc5bf3eb..247c5b3e9 100755 --- a/tests/xfs/007 +++ b/tests/xfs/007 @@ -74,6 +74,30 @@ echo "*** Usage after quotarm ***" xfs_db -c "inode $UQUOTINO" -c "p core.nblocks" $SCRATCH_DEV xfs_db -c "inode $GQUOTINO" -c "p core.nblocks" $SCRATCH_DEV +_qmount_option "uquota,pquota" +_qmount + +echo "*** umount" +umount $SCRATCH_MNT + +UQUOTINO=`xfs_db -c "sb 0" -c "p" $SCRATCH_DEV | grep uquotino | awk '{print $NF}'` +PQUOTINO=`xfs_db -c "sb 0" -c "p" $SCRATCH_DEV | grep gquotino | awk '{print $NF}'` + +echo "*** Usage before quotarm ***" +xfs_db -c "inode $UQUOTINO" -c "p core.nblocks" $SCRATCH_DEV +xfs_db -c "inode $PQUOTINO" -c "p core.nblocks" $SCRATCH_DEV + +_qmount +echo "*** turn off user and project quotas" +xfs_quota -x -c 'off -up' $SCRATCH_MNT +xfs_quota -x -c "remove -up" $SCRATCH_MNT +echo "*** umount" +umount $SCRATCH_MNT + +echo "*** Usage after quotarm ***" +xfs_db -c "inode $UQUOTINO" -c "p core.nblocks" $SCRATCH_DEV +xfs_db -c "inode $PQUOTINO" -c "p core.nblocks" $SCRATCH_DEV + # success, all done status=0 exit diff --git a/tests/xfs/007.out b/tests/xfs/007.out index 0fc17aebd..7c5bff57d 100644 --- a/tests/xfs/007.out +++ b/tests/xfs/007.out @@ -8,3 +8,12 @@ core.nblocks = 1 *** Usage after quotarm *** core.nblocks = 0 core.nblocks = 0 +*** umount +*** Usage before quotarm *** +core.nblocks = 1 +core.nblocks = 1 +*** turn off user and project quotas +*** umount +*** Usage after quotarm *** +core.nblocks = 0 +core.nblocks = 0