From: Dave Chinner <david@fromorbit.com>
To: David Disseldorp <ddiss@suse.de>
Cc: xfs@oss.sgi.com, dsterba@suse.cz, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 2/2] btrfs/035: add new clone overwrite regression test
Date: Thu, 6 Feb 2014 10:15:26 +1100 [thread overview]
Message-ID: <20140205231526.GJ13997@dastard> (raw)
In-Reply-To: <1391599009-2402-3-git-send-email-ddiss@suse.de>
On Wed, Feb 05, 2014 at 12:16:49PM +0100, David Disseldorp wrote:
> This test uses the newly added cloner binary to dispatch full file and
> range specific clone (reflink) requests.
A couple of small nits:
> +CLONER_PROG=$here/src/cloner
Need to test that the binary was build and is present.
> +
> +src_str="aaaaaaaaaa"
> +
> +echo -n "$src_str" > $SCRATCH_MNT/src || _fail "failed to create src"
No need for the "|| _fail ..." in any part of this test. Failures
will be caught in the output and hence cause golden output
mismatches.
Letting the test run even after a failure exercises the filesystem
in interesting ways, so it's worthwhile ignoring failures in the
test and letting the harness pick up the failures through error
messages.
> +$CLONER_PROG $SCRATCH_MNT/src $SCRATCH_MNT/src.clone1
> +
> +src_str="bbbbbbbbbbcccccccccc"
> +
> +echo -n "$src_str" > $SCRATCH_MNT/src || _fail "failed to create src"
> +
> +$CLONER_PROG $SCRATCH_MNT/src $SCRATCH_MNT/src.clone2
> +
> +snap_src_sz=`ls -lah $SCRATCH_MNT/src.clone1 | awk '{print $5}'`
> +echo "attempting ioctl (src.clone1 src)"
> +$CLONER_PROG -s 0 -d 0 -l ${snap_src_sz} \
> + $SCRATCH_MNT/src.clone1 $SCRATCH_MNT/src || _fail "ioctl failed"
And to do that here, you probably need to add perror() output to
the cloner program when it detects an error. i.e. let it give you
the exact error that was detected, rather than lumping them all into
a catchall here...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
prev parent reply other threads:[~2014-02-05 23:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-05 11:16 [PATCH 0/2] __btrfs_drop_extents() BUG_ON reproducer David Disseldorp
2014-02-05 11:16 ` [PATCH 1/2] btrfs: add small program for clone testing David Disseldorp
2014-02-05 23:09 ` Dave Chinner
2014-02-06 10:03 ` David Disseldorp
2014-02-05 11:16 ` [PATCH 2/2] btrfs/035: add new clone overwrite regression test David Disseldorp
2014-02-05 23:15 ` Dave Chinner [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=20140205231526.GJ13997@dastard \
--to=david@fromorbit.com \
--cc=ddiss@suse.de \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@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 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).