linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Liu <jeff.liu@oracle.com>
To: Josef Bacik <jbacik@fusionio.com>
Cc: linux-btrfs@vger.kernel.org, xfs@oss.sgi.com, sandeen@redhat.com
Subject: Re: [PATCH] xfstests: generic/315: allow a little tolerance for our used check
Date: Tue, 30 Jul 2013 11:48:10 +0800	[thread overview]
Message-ID: <51F7377A.9090707@oracle.com> (raw)
In-Reply-To: <1375124156-17620-1-git-send-email-jbacik@fusionio.com>

On 07/30/2013 02:55 AM, Josef Bacik wrote:

> So df in btrfs is tricky at best, and relying on it for accurate information is
> not great, but it's the best way to verify this test.  To get around btrfs being
> inconsistent sometimes just use _within_tolerance to check our new df value to
> make sure that our truncate did something.  With this patch I no longer see
> transient failures of this test.  Thanks,
> 
> Signed-off-by: Josef Bacik <jbacik@fusionio.com>
> ---
>  tests/generic/315 |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/tests/generic/315 b/tests/generic/315
> index 7cfc40d..9c01b5e 100644
> --- a/tests/generic/315
> +++ b/tests/generic/315
> @@ -73,7 +73,8 @@ sync
>  
>  # Preallocated disk space should be released
>  avail_done=`df -P $TEST_DIR | awk 'END {print $4}'`
> -[ "$avail_done" -eq "$avail_begin" ] || _fail "Available disk space ($avail_done KiB)"
> +_within_tolerance "df" $avail_done $avail_begin 1%
> +[ $? -eq 0 ] || _fail "Available disk space ($avail_done KiB) wanted ($avail_begin KiB)"

Looks good to me.
Reviewed-by: Jie Liu <jeff.liu@oracle.com>

Thanks,
-Jeff

  reply	other threads:[~2013-07-30  3:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-29 18:55 [PATCH] xfstests: generic/315: allow a little tolerance for our used check Josef Bacik
2013-07-30  3:48 ` Jeff Liu [this message]
2013-07-30 18:51   ` Ben Myers

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=51F7377A.9090707@oracle.com \
    --to=jeff.liu@oracle.com \
    --cc=jbacik@fusionio.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=sandeen@redhat.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;
as well as URLs for NNTP newsgroup(s).