linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>
Cc: linux-btrfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH] fstests: btrfs/079: Fix wrong value passed to available space check.
Date: Wed, 21 Jan 2015 15:19:11 +1100	[thread overview]
Message-ID: <20150121041911.GE16510@dastard> (raw)
In-Reply-To: <1419837438-13771-1-git-send-email-quwenruo@cn.fujitsu.com>

On Mon, Dec 29, 2014 at 03:17:18PM +0800, Qu Wenruo wrote:
> Before the patch, we passed wrong value to _require_fs_space, which
> should be in unit of 1024, but passed in unit of GB.

Yes, that needs fixing.

> Fix it and add better prompt for falloc failure.

That doesn't....

> 
> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
> ---
>  tests/btrfs/079 | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/btrfs/079 b/tests/btrfs/079
> index 202d3e6..99d0187 100755
> --- a/tests/btrfs/079
> +++ b/tests/btrfs/079
> @@ -73,8 +73,9 @@ rm -f $seqres.full
>  
>  _scratch_mkfs >>$seqres.full 2>&1
>  _scratch_mount
> -_require_fs_space $SCRATCH_MNT $(($filesize / 1024 / 1024 / 1024))
> -$XFS_IO_PROG -f -c "falloc 0 $filesize" $testfile
> +_require_fs_space $SCRATCH_MNT $(($filesize / 1024))
> +$XFS_IO_PROG -f -c "falloc 0 $filesize" $testfile || \
> +	_fail "falloc failed"

If the falloc fails, then the golden output match will fail. Let the
test run, regardless, because the first thing it does is try to
overwrite the fallocated region where the success or failure of the
writes are completely ignored. Hence a falloc failure should also be
ignored...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2015-01-21  4:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-29  7:17 [PATCH] fstests: btrfs/079: Fix wrong value passed to available space check Qu Wenruo
2015-01-21  4:19 ` Dave Chinner [this message]
2015-01-21  4:21   ` Qu Wenruo

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=20150121041911.GE16510@dastard \
    --to=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo@cn.fujitsu.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).