From: Eryu Guan <eguan@redhat.com>
To: Dave Chinner <david@fromorbit.com>
Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 01/15 v2] btrfs: new test to run btrfs balance and subvolume test simultaneously
Date: Tue, 9 Sep 2014 19:53:24 +0800 [thread overview]
Message-ID: <20140909115324.GU2977@dhcp-13-216.nay.redhat.com> (raw)
In-Reply-To: <20140908100127.GF30012@dastard>
On Mon, Sep 08, 2014 at 08:01:27PM +1000, Dave Chinner wrote:
> On Thu, Aug 28, 2014 at 09:47:42PM +0800, Eryu Guan wrote:
> > Run btrfs balance and subvolume create/mount/umount/delete simultaneously,
> > with fsstress running in background.
> >
> > Signed-off-by: Eryu Guan <eguan@redhat.com>
> > ---
> > common/rc | 24 ++++++++++
> > tests/btrfs/059 | 129 ++++++++++++++++++++++++++++++++++++++++++++++++++++
> > tests/btrfs/059.out | 2 +
> > tests/btrfs/group | 1 +
> > 4 files changed, 156 insertions(+)
> > create mode 100755 tests/btrfs/059
> > create mode 100644 tests/btrfs/059.out
> >
> > diff --git a/common/rc b/common/rc
> > index 16da898..c1a7b9e 100644
> > --- a/common/rc
> > +++ b/common/rc
> > @@ -2375,6 +2375,30 @@ _get_free_inode()
> > echo $nr_inode
> > }
> >
> > +_btrfs_stress_balance()
> > +{
> > + local btrfs_mnt=$1
> > + while true; do
> > + $BTRFS_UTIL_PROG balance start $btrfs_mnt
> > + done
> > +}
> > +
> > +_btrfs_stress_subvolume()
> > +{
> > + local btrfs_dev=$1
> > + local btrfs_mnt=$2
> > + local subvol_name=$3
> > + local subvol_mnt=$4
> > +
> > + mkdir -p $subvol_mnt
> > + while true; do
> > + $BTRFS_UTIL_PROG subvolume create $btrfs_mnt/$subvol_name
> > + $MOUNT_PROG -o subvol=$subvol_name $btrfs_dev $subvol_mnt
> > + $UMOUNT_PROG $subvol_mnt
> > + $BTRFS_UTIL_PROG subvolume delete $btrfs_mnt/$subvol_name
> > + done
> > +}
> > +
>
> I'm thinking that we need to start separating common/rc in
> filesystem specific include files. Not necessary for this series,
> but we really need to so using this file as a dumping ground for
> shared code rather than for init and config stuff.
Agreed, maybe I can add one more patch as a last patch to sort out all
btrfs shared code to common/btrfs
>
> > +echo "QA output created by $seq"
> > +
> > +here=`pwd`
> > +tmp=/tmp/$$
> > +status=1
> > +trap "_cleanup; exit \$status" 0 1 2 3 15
> > +
> > +_cleanup()
> > +{
> > + cd /
> > + rm -fr $tmp.*
> > +}
>
> Really dangerous, that. if $tmp is empty, then that will remove
> everything under / (i.e. 'cd /; rm -rf .*'). You shouldn't be using
> subdirs under $tmp - if you need lots of temporary data for the
> test, it should be under $TESTDIR, not on the root filesystem.
Makes much sense! Will change it.
Thanks,
Eryu
>
> > +run_test()
> > +{
> > + local mkfs_opts=$1
> > + local subvol_mnt=$tmp.mnt
>
> IOWs, don't do this. Mount stuff under $TESTDIR/$seq.mnt. That's
> what the testdir is there for...
>
> Cheers,
>
> Dave.
> --
> Dave Chinner
> david@fromorbit.com
next prev parent reply other threads:[~2014-09-09 11:53 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-28 13:47 [PATCH 00/15 v2] xfstests: new btrfs stress test cases Eryu Guan
2014-08-28 13:47 ` [PATCH 01/15 v2] btrfs: new test to run btrfs balance and subvolume test simultaneously Eryu Guan
2014-09-08 10:01 ` Dave Chinner
2014-09-09 11:53 ` Eryu Guan [this message]
2014-09-09 23:53 ` Dave Chinner
2014-09-09 15:41 ` Eric Sandeen
2014-08-28 13:47 ` [PATCH 02/15 v2] btrfs: new test to run btrfs balance and scrub simultaneously Eryu Guan
2014-09-08 10:04 ` Dave Chinner
2014-09-09 11:55 ` Eryu Guan
2014-08-28 13:47 ` [PATCH 03/15 v2] btrfs: new test to run btrfs balance and defrag operations simultaneously Eryu Guan
2014-08-28 13:47 ` [PATCH 04/15 v2] btrfs: new case to run btrfs balance and remount with different compress algorithms Eryu Guan
2014-09-08 10:08 ` Dave Chinner
2014-09-09 13:06 ` Eryu Guan
2014-08-28 13:47 ` [PATCH 05/15 v2] btrfs: new case to run btrfs balance and device replace operations simultaneously Eryu Guan
2014-08-28 13:47 ` [PATCH 06/15 v2] btrfs: new case to run btrfs subvolume create/delete operations and device replace simultaneously Eryu Guan
2014-08-28 13:47 ` [PATCH 07/15 v2] btrfs: new case to run btrfs subvolume create/delete operations and scrub simultaneously Eryu Guan
2014-08-28 13:47 ` [PATCH 08/15 v2] btrfs: new case to run btrfs subvolume create/delete and defrag operations simultaneously Eryu Guan
2014-08-28 13:47 ` [PATCH 09/15 v2] btrfs: new case to run subvolume create/delete and remount with defferent compress algorithms Eryu Guan
2014-08-28 13:47 ` [PATCH 10/15 v2] btrfs: new case to run device replace and scrub operations simultaneously Eryu Guan
2014-08-28 13:47 ` [PATCH 11/15 v2] btrfs: new case to run device replace and defrag " Eryu Guan
2014-08-28 13:47 ` [PATCH 12/15 v2] btrfs: new case to run device replace and remount with different compress algorithms simultaneously Eryu Guan
2014-08-28 13:47 ` [PATCH 13/15 v2] btrfs: new case to run btrfs scrub and defrag operations simultaneously Eryu Guan
2014-08-28 13:47 ` [PATCH 14/15 v2] btrfs: new case to run btrfs scrub and remount with different compress algorithms simultaneously Eryu Guan
2014-08-28 13:47 ` [PATCH 15/15 v2] btrfs: new case to run defrag " Eryu Guan
2014-09-08 9:54 ` [PATCH 00/15 v2] xfstests: new btrfs stress test cases Dave Chinner
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=20140909115324.GU2977@dhcp-13-216.nay.redhat.com \
--to=eguan@redhat.com \
--cc=david@fromorbit.com \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).