From 3f063f6bdc67e067b12898f018ef31df8c14c96c Mon Sep 17 00:00:00 2001 From: David Sterba Date: Mon, 30 May 2016 17:07:35 +0200 Subject: [PATCH] btrfs-progs: tests: convert, run md5sum with sudo helper Some of the files might not end up in the checksum list because of permissions. This is reported by md5sum as incorrectly formatted lines. Signed-off-by: David Sterba --- tests/convert-tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/convert-tests.sh b/tests/convert-tests.sh index 06d8419e..d42d287b 100755 --- a/tests/convert-tests.sh +++ b/tests/convert-tests.sh @@ -127,7 +127,7 @@ convert_test() { populate_fs run_check $SUDO_HELPER dd if=/dev/zero of=$TEST_MNT/test bs=$nodesize \ count=1 >/dev/null 2>&1 - run_check_stdout find $TEST_MNT -type f ! -name 'image' -exec md5sum {} \+ > $CHECKSUMTMP + run_check_stdout $SUDO_HELPER find $TEST_MNT -type f ! -name 'image' -exec md5sum {} \+ > $CHECKSUMTMP run_check_umount_test_dev run_check $TOP/btrfs-convert ${features:+-O "$features"} -N "$nodesize" $TEST_DEV @@ -135,7 +135,7 @@ convert_test() { run_check $TOP/btrfs-show-super $TEST_DEV run_check_mount_test_dev - run_check_stdout md5sum -c $CHECKSUMTMP | + run_check_stdout $SUDO_HELPER md5sum -c $CHECKSUMTMP | grep -q 'FAILED' && _fail "file validation failed." run_check_umount_test_dev }