diff mbox

btrfs-progs-tests: Avoid outputting useless warning in ./fsck-tests.sh

Message ID da33d0fb2b6ac7f8a52a4550ec74293f9e2f1af9.1438050482.git.zhaolei@cn.fujitsu.com (mailing list archive)
State Accepted
Headers show

Commit Message

Zhaolei July 28, 2015, 2:28 a.m. UTC
From: Zhao Lei <zhaolei@cn.fujitsu.com>

002-bad-transid outout 'transid verify failed' message in screen
which is just a warning in btrfs-image in normal condition of this
test.

This patch move above warning into $RESULTS, to:
1: Avoid trouble screen output
2: Let user known detail if other error happened in btrfs-image

Before patch:
  # ./fsck-tests.sh
    [TEST]   001-bad-file-extent-bytenr
    [TEST]   002-bad-transid
  parent transid verify failed on 29360128 wanted 9 found 755944791
  parent transid verify failed on 29360128 wanted 9 found 755944791
  Ignoring transid failure
    [TEST]   003-shift-offsets
    [TEST]   004-no-dir-index
  ...

After patch:
  # ./fsck-tests.sh
  [TEST]   001-bad-file-extent-bytenr
  [TEST]   002-bad-transid
  [TEST]   003-shift-offsets
  [TEST]   004-no-dir-index
  ...

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
---
 tests/common | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

David Sterba Sept. 25, 2015, 4:33 p.m. UTC | #1
On Tue, Jul 28, 2015 at 10:28:13AM +0800, Zhaolei wrote:
> From: Zhao Lei <zhaolei@cn.fujitsu.com>
> 
> 002-bad-transid outout 'transid verify failed' message in screen
> which is just a warning in btrfs-image in normal condition of this
> test.
> 
> This patch move above warning into $RESULTS, to:
> 1: Avoid trouble screen output
> 2: Let user known detail if other error happened in btrfs-image
> 
> Before patch:
>   # ./fsck-tests.sh
>     [TEST]   001-bad-file-extent-bytenr
>     [TEST]   002-bad-transid
>   parent transid verify failed on 29360128 wanted 9 found 755944791
>   parent transid verify failed on 29360128 wanted 9 found 755944791
>   Ignoring transid failure
>     [TEST]   003-shift-offsets
>     [TEST]   004-no-dir-index
>   ...
> 
> After patch:
>   # ./fsck-tests.sh
>   [TEST]   001-bad-file-extent-bytenr
>   [TEST]   002-bad-transid
>   [TEST]   003-shift-offsets
>   [TEST]   004-no-dir-index
>   ...
> 
> Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>

I missed this patch before, sorry. Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/tests/common b/tests/common
index 381ff96..4d03ed8 100644
--- a/tests/common
+++ b/tests/common
@@ -87,8 +87,9 @@  check_all_images()
 
 		if ! [ -f $image.restored ]; then
 			echo "restoring image $(basename $image)" >> $RESULTS
-			$TOP/btrfs-image -r $image $image.restored || \
-				_fail "failed to restore image $image"
+			$TOP/btrfs-image -r $image $image.restored \
+				&>> $RESULTS \
+				|| _fail "failed to restore image $image"
 		fi
 
 		check_image $image.restored