From: Zhao Lei Date: Tue, 28 Jul 2015 02:28:13 +0000 (+0800) Subject: btrfs-progs: tests: Avoid printing useless warning in fsck tests X-Git-Tag: upstream/4.16.1~1985 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9c3ce57e6bdb8f6af86e2c517bc8ea713e93a2c2;p=platform%2Fupstream%2Fbtrfs-progs.git btrfs-progs: tests: Avoid printing useless warning in fsck tests 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 Signed-off-by: David Sterba --- diff --git a/tests/common b/tests/common index 67d1558..4571350 100644 --- a/tests/common +++ b/tests/common @@ -97,8 +97,9 @@ extract_image() if ! [ -f $image.restored ]; then echo "restoring image $(basename $image)" >> $RESULTS - $TOP/btrfs-image -r $image $image.restored || \ - _fail "failed to restore image $image" >&2 + $TOP/btrfs-image -r $image $image.restored \ + &>> $RESULTS \ + || _fail "failed to restore image $image" >&2 fi [ -f "$cleanme" ] && rm -f "$cleanme"