]> www.infradead.org Git - users/hch/xfstests-dev.git/commit
btrfs/254: don't leave mount on test fs in case of failure/interruption
authorFilipe Manana <fdmanana@suse.com>
Wed, 19 Feb 2025 18:19:14 +0000 (18:19 +0000)
committerZorro Lang <zlang@kernel.org>
Fri, 21 Feb 2025 14:50:39 +0000 (22:50 +0800)
commit7122c0315a0866989a3887aa03a27139b399536d
tree61357af2b2bd7d7190a6c7b1c103c502bdde7de2
parent04d0cf3f8909e194acea73badf9914727e486ecc
btrfs/254: don't leave mount on test fs in case of failure/interruption

If the test fails or is interrupted after mounting $scratch_dev3 inside
the test filesystem and before unmounting at test_add_device(), we leave
without being unable to unmount the test filesystem since it has a mount
inside it. This results in the need to manually unmount $scratch_dev3,
otherwise a subsequent run of fstests fails since the unmount of the
test device fails with -EBUSY.

Fix this by unmounting $scratch_dev3 ($seq_mnt) in the _cleanup()
function.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
tests/btrfs/254