From 686dc0864ea913d694182b40e9841baa825ba10c Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 7 Jun 2018 15:18:50 +0200 Subject: [PATCH] btrfs-progs: tests: fix fsck-tests/031 when on NFS The restore target file does not exist and creating by root does not work on NFS, so precreating will make that work. Also fix the image name to be deleted. Signed-off-by: David Sterba --- tests/fsck-tests/031-metadatadump-check-data-csum/test.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/fsck-tests/031-metadatadump-check-data-csum/test.sh b/tests/fsck-tests/031-metadatadump-check-data-csum/test.sh index 30b0b7a3..e9b2d5c6 100755 --- a/tests/fsck-tests/031-metadatadump-check-data-csum/test.sh +++ b/tests/fsck-tests/031-metadatadump-check-data-csum/test.sh @@ -16,6 +16,8 @@ run_check_mount_test_dev run_check $SUDO_HELPER dd if=/dev/urandom of="$TEST_MNT/file" bs=4k count=16 run_check_umount_test_dev +touch restored_image +chmod a+w restored_image run_check $SUDO_HELPER "$TOP/btrfs-image" "$TEST_DEV" "restored_image" # use prepare_test_dev() to wipe all existing data on $TEST_DEV @@ -27,4 +29,4 @@ run_check $SUDO_HELPER "$TOP/btrfs-image" -r "restored_image" "$TEST_DEV" # Should not report any error run_check "$TOP/btrfs" check --check-data-csum "$TEST_DEV" -rm -rf -- "restored_image*" +rm -rf -- "restored_image" -- 2.11.4.GIT