btrfs-progs: tests: do checksum verification with convert-tests

Signed-off-by: Lakshmipathi.G <Lakshmipathi.G@giis.co.in>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Lakshmipathi.G 2016-01-25 21:38:33 +05:30 committed by David Sterba
parent be09626592
commit cc57faac2e
1 changed files with 4 additions and 0 deletions

View File

@ -45,10 +45,14 @@ convert_test() {
run_check $SUDO_HELPER mount -o loop $IMAGE $TEST_MNT
run_check $SUDO_HELPER dd if=/dev/zero of=$TEST_MNT/test bs=$nodesize \
count=1 1>/dev/null 2>&1
run_check_stdout $SUDO_HELPER md5sum $TEST_MNT/test > $TEST_MNT/test.md5sum
run_check $SUDO_HELPER umount $TEST_MNT
run_check $TOP/btrfs-convert ${features:+-O "$features"} -N "$nodesize" $IMAGE
run_check $TOP/btrfs check $IMAGE
run_check $TOP/btrfs-show-super $IMAGE
run_check $SUDO_HELPER mount -o loop $IMAGE $TEST_MNT
run_check_stdout $SUDO_HELPER md5sum -c $TEST_MNT/test.md5sum | grep -q 'OK' || _fail "file validation failed."
run_check $SUDO_HELPER umount $TEST_MNT
}
if ! [ -z "$TEST" ]; then