All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Liu <jeff.liu@oracle.com>
To: fstests@vger.kernel.org
Cc: "xfs@oss.sgi.com" <xfs@oss.sgi.com>
Subject: [PATCH v2] xfs/007: add project quota Q_XQUOTARM test
Date: Thu, 17 Jul 2014 22:13:21 +0800	[thread overview]
Message-ID: <53C7DA01.7060703@oracle.com> (raw)

From: Jie Liu <jeff.liu@oracle.com>

Add test for project quota Q_XQUOTARM operations, update the
golden output file to match the new test output.

Signed-off-by: Jie Liu <jeff.liu@oracle.com>
---
 tests/xfs/007     | 24 ++++++++++++++++++++++++
 tests/xfs/007.out |  9 +++++++++
 2 files changed, 33 insertions(+)

diff --git a/tests/xfs/007 b/tests/xfs/007
index 8cc5bf3..04c20e3 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 0fc17ae..7c5bff5 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
-- 
1.8.3.2

WARNING: multiple messages have this Message-ID (diff)
From: Jeff Liu <jeff.liu@oracle.com>
To: fstests@vger.kernel.org
Cc: "xfs@oss.sgi.com" <xfs@oss.sgi.com>
Subject: [PATCH v2] xfs/007: add project quota Q_XQUOTARM test
Date: Thu, 17 Jul 2014 22:13:21 +0800	[thread overview]
Message-ID: <53C7DA01.7060703@oracle.com> (raw)

From: Jie Liu <jeff.liu@oracle.com>

Add test for project quota Q_XQUOTARM operations, update the
golden output file to match the new test output.

Signed-off-by: Jie Liu <jeff.liu@oracle.com>
---
 tests/xfs/007     | 24 ++++++++++++++++++++++++
 tests/xfs/007.out |  9 +++++++++
 2 files changed, 33 insertions(+)

diff --git a/tests/xfs/007 b/tests/xfs/007
index 8cc5bf3..04c20e3 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 0fc17ae..7c5bff5 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
-- 
1.8.3.2

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

             reply	other threads:[~2014-07-17 14:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-17 14:13 Jeff Liu [this message]
2014-07-17 14:13 ` [PATCH v2] xfs/007: add project quota Q_XQUOTARM test Jeff Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53C7DA01.7060703@oracle.com \
    --to=jeff.liu@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.