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>
master
David Sterba 2015-06-18 19:35:58 +02:00
parent eb81f8d263
commit 4b4d742b26
1 changed files with 6 additions and 3 deletions

View File

@ -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
}