From: Josef Bacik <jbacik@fusionio.com> To: <linux-btrfs@vger.kernel.org>, <xfs@oss.sgi.com>, <jeff.liu@oracle.com> Subject: [PATCH] xfstests: generic/315: add one more sync and more output Date: Mon, 29 Jul 2013 13:21:03 -0400 [thread overview] Message-ID: <1375118463-29654-1-git-send-email-jbacik@fusionio.com> (raw) 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, 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 -- 1.7.7.6
WARNING: multiple messages have this Message-ID (diff)
From: Josef Bacik <jbacik@fusionio.com> To: linux-btrfs@vger.kernel.org, xfs@oss.sgi.com, jeff.liu@oracle.com Subject: [PATCH] xfstests: generic/315: add one more sync and more output Date: Mon, 29 Jul 2013 13:21:03 -0400 [thread overview] Message-ID: <1375118463-29654-1-git-send-email-jbacik@fusionio.com> (raw) 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, 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 -- 1.7.7.6 _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2013-07-29 17:21 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-07-29 17:21 Josef Bacik [this message] 2013-07-29 17:21 ` [PATCH] xfstests: generic/315: add one more sync and more output Josef Bacik 2013-07-29 17:31 ` Eric Sandeen 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=1375118463-29654-1-git-send-email-jbacik@fusionio.com \ --to=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.