From: Christoph Hellwig <hch@infradead.org>
To: Jeff Liu <jeff.liu@oracle.com>
Cc: Christoph Hellwig <hch@infradead.org>, xfs@oss.sgi.com
Subject: Re: [PATCH] xfstests: Introduce test case 285 for project quota negative test collections
Date: Wed, 11 Apr 2012 16:02:27 -0400 [thread overview]
Message-ID: <20120411200227.GB28816@infradead.org> (raw)
In-Reply-To: <4F7C575A.7030507@oracle.com>
Hi Jeff,
thanks a lot for sending this patch!
> I'd like to introduce a new test to verify something like this, it is intended to run as a negative test
> collections for project quota. It only verify the above issue for now, maybe its better to wrap the steps in a individual function?
We should have one testcase for one thing to test - by that defintion
this bug should really stay a test case on it's own. Some more comments
below.
> +_create_pquota_config_files()
> +{
> + echo "1:$tmpdir" > /etc/projects
> + echo "$project_name:1" > /etc/projid
> +}
We can use numeric ids for projects directly, and the -p object to
various xfs_quota subcommands also allows refering to a path instead
of a project name, that way we don't have to rewrite the config files
in /etc.
> +echo "*** create loopback image file ***"
> +dd if=/dev/zero of=$tmpfile bs=4k count=4096 >/dev/null 2>&1
> +
> +echo "*** mkfs.xfs ***"
> +mkfs.xfs -b size=4096 $tmpfile >/dev/null 2>&1
> +
> +# mount loopback image but without pquota option
> +mount -o loop $tmpfile $tmpdir || _fail "!!! failed to loopback mount"
This should use _scratch_mkfs _scratch_mount and so on instead of
opencoding it.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2012-04-11 20:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-04 14:14 [PATCH] xfstests: Introduce test case 285 for project quota negative test collections Jeff Liu
2012-04-11 20:02 ` Christoph Hellwig [this message]
2012-04-12 13:14 ` 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=20120411200227.GB28816@infradead.org \
--to=hch@infradead.org \
--cc=jeff.liu@oracle.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox