[Top] [All Lists]

[PATCH] xfstests: generic/315: add one more sync and more output

To: <linux-btrfs@xxxxxxxxxxxxxxx>, <xfs@xxxxxxxxxxx>, <jeff.liu@xxxxxxxxxx>
Subject: [PATCH] xfstests: generic/315: add one more sync and more output
From: Josef Bacik <jbacik@xxxxxxxxxxxx>
Date: Mon, 29 Jul 2013 13:21:03 -0400
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fusionio.com; s=default; t=1375118466; bh=OXu8FRdVknG9YL1UHtafUhgxr5YFIk6P6ZgnuaTLrU0=; h=From:To:Subject:Date; b=JkYhICpgmo29cLuRCPyIZ0O7oNN1aE7gkmFu6tCUSoVvUQJMhJ9sZ3ttloaC6wloP q9kJfLqU7uO4BZRGrRKLIL72RqdVQgc7eeLzS8qhTg3vnQgaOa9P8tbnRnBvno7aML eNs5VHDQ7LiLbjZvRdffHkV9ZJIHG6Lkpx43oXJg=
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@xxxxxxxxxxxx>
 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
 # 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

<Prev in Thread] Current Thread [Next in Thread>