summaryrefslogtreecommitdiff
path: root/tests/misc-tests
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2015-06-18 19:35:58 +0200
committerDavid Sterba <dsterba@suse.cz>2015-06-18 19:49:33 +0200
commit4b4d742b26bb81575f67002ac7f3b7a0efffbd95 (patch)
treefb95408c3bd93b03618fb8f1e2bd2a0d76361c8d /tests/misc-tests
parenteb81f8d263ce7f5341561221f3b8b8a0ec8701dc (diff)
btrfs-progs: tests: verify btrfstune output during uuid-rewrite
The 'Current fsid:' value does not match the real fsid. Reported-by: Mike Fleetwood <mike.fleetwood@googlemail.com> Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'tests/misc-tests')
-rwxr-xr-xtests/misc-tests/002-uuid-rewrite/test.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/misc-tests/002-uuid-rewrite/test.sh b/tests/misc-tests/002-uuid-rewrite/test.sh
index 488f756e..6c2a3930 100755
--- a/tests/misc-tests/002-uuid-rewrite/test.sh
+++ b/tests/misc-tests/002-uuid-rewrite/test.sh
@@ -42,9 +42,12 @@ test_uuid_random()
--rootdir $TOP/Documentation \
$TEST_DEV
run_check $TOP/btrfs-show-super "$TEST_DEV"
- run_check $TOP/btrfstune -f -u $TEST_DEV
- # btrfs-show-super is called within get_fs_uuid
- fsid=$(get_fs_uuid $TEST_DEV)
+ currentfsid=$(run_check_stdout $TOP/btrfstune -f -u $TEST_DEV | \
+ grep -i 'current fsid:' | awk '{print $3}')
+ if ! [ $currentfsid = $origuuid ]; then
+ _fail "FAIL: current UUID mismatch"
+ fi
+ run_check $TOP/btrfs-show-super "$TEST_DEV"
run_check $SUDO_HELPER $TOP/btrfs check $TEST_DEV
}