btrfs-progs: tests: fix cleanup step in check/037

The test check/037-freespacetree-repair sometimes fails (does not in the
CI though) that the last unmount does not work due to -EBUSY. This
depends on timing, but what is obviously wrong is the 'rm' before
umount. The quoting of "*" does not remove all the files before
fallocate but is otherwise silent due to '-f'.

Add the run_check so it's recorded in the logs taht it happens and alos
add sudo so it can actually work. This makes the test work more
reliably.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2024-06-13 21:17:14 +02:00
parent 989fcbe942
commit 9d35464a6d
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ fi
# change the freespace such that we now have at least one free_space_extent # change the freespace such that we now have at least one free_space_extent
# object # object
run_check_mount_test_dev run_check_mount_test_dev
rm -rf "$TEST_MNT/file.*" run_check $SUDO_HELPER rm -rf "$TEST_MNT/"file.*
run_check $SUDO_HELPER fallocate -l 50m "$TEST_MNT/file" run_check $SUDO_HELPER fallocate -l 50m "$TEST_MNT/file"
run_check_umount_test_dev run_check_umount_test_dev