diff mbox

[btrfs-progs] Include file verification with convert-tests

Message ID 1453738113-19583-1-git-send-email-Lakshmipathi.G@giis.co.in (mailing list archive)
State Accepted
Headers show

Commit Message

Lakshmipathi.G Jan. 25, 2016, 4:08 p.m. UTC
From: "Lakshmipathi.G" <Lakshmipathi.G@giis.co.in>

Signed-off-by: Lakshmipathi.G <Lakshmipathi.G@giis.co.in>
---
 tests/convert-tests.sh | 4 ++++
 1 file changed, 4 insertions(+)

Comments

David Sterba Feb. 11, 2016, 5:53 p.m. UTC | #1
On Mon, Jan 25, 2016 at 09:38:33PM +0530, Lakshmipathi.G wrote:
> From: "Lakshmipathi.G" <Lakshmipathi.G@giis.co.in>
> 
> Signed-off-by: Lakshmipathi.G <Lakshmipathi.G@giis.co.in>

Applied, thanks.

The external checksum verification is a good thing to do. We'll have to
add some ways to populate the filesystems, by external scripts/tools or
some local to this testsuite.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/tests/convert-tests.sh b/tests/convert-tests.sh
index b26c069..b3d9797 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