mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-11-24 20:54:17 +08:00
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 <dsterba@suse.com>
This commit is contained in:
parent
96af160a01
commit
686dc0864e
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user