From cc57faac2e33d49e43aa44118f51cd2b43c45aa1 Mon Sep 17 00:00:00 2001 From: "Lakshmipathi.G" Date: Mon, 25 Jan 2016 21:38:33 +0530 Subject: [PATCH] btrfs-progs: tests: do checksum verification with convert-tests Signed-off-by: Lakshmipathi.G Signed-off-by: David Sterba --- tests/convert-tests.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/convert-tests.sh b/tests/convert-tests.sh index b26c0698..f78f5d38 100755 --- a/tests/convert-tests.sh +++ b/tests/convert-tests.sh @@ -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