From: Eric Sandeen <sandeen@redhat.com> To: Josef Bacik <jbacik@fusionio.com> Cc: linux-btrfs@vger.kernel.org, xfs@oss.sgi.com, jeff.liu@oracle.com Subject: Re: [PATCH] xfstests: generic/315: add one more sync and more output Date: Mon, 29 Jul 2013 12:31:06 -0500 [thread overview] Message-ID: <51F6A6DA.3080102@redhat.com> (raw) In-Reply-To: <1375118463-29654-1-git-send-email-jbacik@fusionio.com> On 7/29/13 12:21 PM, 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. So we need to add another > sync to make sure the pinned blocks are all freed up and the df space is really > really accurate, otherwise we end up with this test failling because the df > after the test is slightly off (in my case it was like 36kb off). With this > patch I'm not seeing random failures of this test. Thanks, Honest question: does one more sync make this deterministic, or is it a best-effort, um, hack? -Eric > 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..7c55b8a 100644 > --- a/tests/generic/315 > +++ b/tests/generic/315 > @@ -70,10 +70,11 @@ fsize=`ls -l $TEST_DIR/testfile.$seq | awk '{print $5}'` > # Truncate the file size back to 0 > truncate -s 0 $TEST_DIR/testfile.$seq > sync > +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)" > +[ "$avail_done" -eq "$avail_begin" ] || _fail "Available disk space ($avail_done KiB) wanted ($avail_begin KiB)" > > # success, all done > exit >
WARNING: multiple messages have this Message-ID (diff)
From: Eric Sandeen <sandeen@redhat.com> To: Josef Bacik <jbacik@fusionio.com> Cc: jeff.liu@oracle.com, linux-btrfs@vger.kernel.org, xfs@oss.sgi.com Subject: Re: [PATCH] xfstests: generic/315: add one more sync and more output Date: Mon, 29 Jul 2013 12:31:06 -0500 [thread overview] Message-ID: <51F6A6DA.3080102@redhat.com> (raw) In-Reply-To: <1375118463-29654-1-git-send-email-jbacik@fusionio.com> On 7/29/13 12:21 PM, 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. So we need to add another > sync to make sure the pinned blocks are all freed up and the df space is really > really accurate, otherwise we end up with this test failling because the df > after the test is slightly off (in my case it was like 36kb off). With this > patch I'm not seeing random failures of this test. Thanks, Honest question: does one more sync make this deterministic, or is it a best-effort, um, hack? -Eric > 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..7c55b8a 100644 > --- a/tests/generic/315 > +++ b/tests/generic/315 > @@ -70,10 +70,11 @@ fsize=`ls -l $TEST_DIR/testfile.$seq | awk '{print $5}'` > # Truncate the file size back to 0 > truncate -s 0 $TEST_DIR/testfile.$seq > sync > +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)" > +[ "$avail_done" -eq "$avail_begin" ] || _fail "Available disk space ($avail_done KiB) wanted ($avail_begin KiB)" > > # success, all done > exit > _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-07-29 17:31 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-07-29 17:21 [PATCH] xfstests: generic/315: add one more sync and more output Josef Bacik 2013-07-29 17:21 ` Josef Bacik 2013-07-29 17:31 ` Eric Sandeen [this message] 2013-07-29 17:31 ` Eric Sandeen 2013-07-29 17:38 ` Eric Sandeen 2013-07-29 17:38 ` Eric Sandeen 2013-07-29 18:25 ` Josef Bacik 2013-07-29 18:25 ` Josef Bacik
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=51F6A6DA.3080102@redhat.com \ --to=sandeen@redhat.com \ --cc=jbacik@fusionio.com \ --cc=jeff.liu@oracle.com \ --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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.