All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Liu <jeff.liu@oracle.com>
To: Ben Myers <bpm@sgi.com>
Cc: Christoph Hellwig <hch@infradead.org>, xfs@oss.sgi.com
Subject: Re: [PATCH v2] xfstests: Introduce test case 285 to check statfs(2) will not cause ASSERT(XFS_IS_QUOTA_RUNNING(mp)) failed.
Date: Sat, 02 Jun 2012 22:27:09 +0800	[thread overview]
Message-ID: <4FCA22BD.3030801@oracle.com> (raw)
In-Reply-To: <20120416174929.GD2924@sgi.com>

Hi Ben,

Sorry for the delay! I have worked on another task in the past few weeks.

On 04/17/2012 01:49 AM, Ben Myers wrote:

>> +					>/dev/null 2>&1
>> +du -sh $proj_dir			>/dev/null 2>&1
> 
> I was unable to reproduce this until I changed 'du -sh' to 'df'.  Now it does
> crash consistently without your fix for xfs_fs_statfs().
> 
> With that change you can consider this
> Reviewed-by: Ben Myers <bpm@sgi.com>
> 
> -Ben


This patch was fixed per your comments, I have to adjust the case number to 287 since seek_data/seek_hole tests were merged, and thanks
you for help fixing issues for them!

Regards,
-Jeff


287: add a project quota test

This test is a negative test case. Pre-vanilla kernel-3.4, if the "pquota"
or "projquota" mount option was not enabled on the underlying XFS partition,
call statfs(2) against a project quota directory causes xfs_qm_dqget()->
ASSERT(XFS_IS_QUOTA_RUNNING(mp)) failed.

Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Jie Liu <jeff.liu@oracle.com>
---
 287     |   75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 287.out |    2 +
 group   |    1 +
 3 files changed, 78 insertions(+), 0 deletions(-)
 create mode 100755 287
 create mode 100644 287.out

diff --git a/287 b/287
new file mode 100755
index 0000000..736d632
--- /dev/null
+++ b/287
@@ -0,0 +1,75 @@
+#! /bin/bash
+# FS QA Test No. 287
+#
+# This test verify statfs(2) against a project directory will not cause
+# ASSERT(XFS_IS_QUOTA_RUNNING(mp)) at xfs_qm_dqget() failed if the project
+# quota option was not enabled on the underlying partition.  It was failed
+# pre-vanilla kernel 3.4.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2012 Oracle Liu Jie.  All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  021101301  USA
+# ---------------------------------------------------------------------
+#
+# creator
+owner=jeff.liu@oracle.com
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	umount $SCRATCH_MNT 2>/dev/null
+	rm -f $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.filter
+. ./common.quota
+
+echo "Silence is golden."
+
+# Modify as appropriate.
+_supported_fs xfs
+_supported_os Linux
+_require_xfs_quota
+_require_scratch
+
+proj_dir="${SCRATCH_MNT}/test_project"
+test_file="${proj_dir}/test_file"
+
+_scratch_mkfs_xfs			>/dev/null 2>&1
+_qmount
+
+mkdir $proj_dir
+touch $test_file
+
+$XFS_QUOTA_PROG -x -c "project -s -p ${proj_dir} 2012" $SCRATCH_DEV \
+					>/dev/null 2>&1
+df $proj_dir				>/dev/null 2>&1
+
+# Clean up
+rm -rf $proj_dir
+_scratch_unmount
+
+status=0
+exit
diff --git a/287.out b/287.out
new file mode 100644
index 0000000..e61bda7
--- /dev/null
+++ b/287.out
@@ -0,0 +1,2 @@
+QA output created by 287
+Silence is golden.
diff --git a/group b/group
index cbe9101..21566af 100644
--- a/group
+++ b/group
@@ -405,3 +405,4 @@ deprecated
 284 auto
 285 auto rw
 286 other
+287 auto quick quota
-- 
1.7.9


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

      parent reply	other threads:[~2012-06-02 14:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-13  9:09 [PATCH v2] xfstests: Introduce test case 285 to check statfs(2) will not cause ASSERT(XFS_IS_QUOTA_RUNNING(mp)) failed Jeff Liu
2012-04-16 16:31 ` Ben Myers
2012-04-16 17:49 ` Ben Myers
2012-04-17  6:29   ` Jeff Liu
2012-06-02 14:27   ` Jeff Liu [this message]

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=4FCA22BD.3030801@oracle.com \
    --to=jeff.liu@oracle.com \
    --cc=bpm@sgi.com \
    --cc=hch@infradead.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.