From: Filipe Manana <fdmanana@xxxxxxxx> With commit ce79de11337e ("fstests: clean up loop device instantiation") we started to always call _destroy_loop_device at the very end of the test, but we only create a loop device if we are running against xfs, so the call to _destroy_loop_device results in an error since no loop device was setup. For example running this test against btrfs or ext4 results in this failure: $ ./check generic/590 FSTYP -- btrfs PLATFORM -- Linux/x86_64 debian0 6.13.0-rc1-btrfs-next-181+ #1 SMP PREEMPT_DYNAMIC Tue Dec 3 13:03:23 WET 2024 MKFS_OPTIONS -- /dev/sdc MOUNT_OPTIONS -- /dev/sdc /home/fdmanana/btrfs-tests/scratch_1 generic/590 29s ... [failed, exit status 1]- output mismatch (see /home/fdmanana/git/hub/xfstests/results//generic/590.out.bad) --- tests/generic/590.out 2020-06-10 19:29:03.858520038 +0100 +++ /home/fdmanana/git/hub/xfstests/results//generic/590.out.bad 2024-12-11 10:48:43.946205346 +0000 @@ -1,2 +1,5 @@ QA output created by 590 -Silence is golden +losetup: option requires an argument -- 'd' +Try 'losetup --help' for more information. +Cannot destroy loop device +(see /home/fdmanana/git/hub/xfstests/results//generic/590.full for details) ... (Run 'diff -u /home/fdmanana/git/hub/xfstests/tests/generic/590.out /home/fdmanana/git/hub/xfstests/results//generic/590.out.bad' to see the entire diff) Ran: generic/590 Failures: generic/590 Failed 1 of 1 tests Fix this by removing the call to _destroy_loop_device at the end of the test, as it's unnecessary because we call it in the _cleanup function if we have setup a loop device. Fixes: ce79de11337e ("fstests: clean up loop device instantiation") Signed-off-by: Filipe Manana <fdmanana@xxxxxxxx> --- tests/generic/590 | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/generic/590 b/tests/generic/590 index 04d86e78..1adeef4c 100755 --- a/tests/generic/590 +++ b/tests/generic/590 @@ -115,8 +115,6 @@ $XFS_IO_PROG -c "truncate 0" -c fsync "$SCRATCH_MNT/file" # We need to do this before the loop device gets torn down. _scratch_unmount _check_scratch_fs -_destroy_loop_device $loop_dev -unset loop_dev echo "Silence is golden" status=0 -- 2.45.2