From 9d35464a6d50b87d7abd3dd03da2374ac129bcce Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 13 Jun 2024 21:17:14 +0200 Subject: [PATCH] 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 --- tests/fsck-tests/037-freespacetree-repair/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fsck-tests/037-freespacetree-repair/test.sh b/tests/fsck-tests/037-freespacetree-repair/test.sh index e615fd5e..66d2206d 100755 --- a/tests/fsck-tests/037-freespacetree-repair/test.sh +++ b/tests/fsck-tests/037-freespacetree-repair/test.sh @@ -87,7 +87,7 @@ fi # change the freespace such that we now have at least one free_space_extent # object 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_umount_test_dev