Skip to content

Commit

Permalink
test: always umount btrfs on teardown
Browse files Browse the repository at this point in the history
When a test fails the btrfs filesystem is still mounted and it shows an
ugly wall of `rmmod: ERROR: Module scsi_debug is in use`. So in both
mount cases make sure we always unmount uncoditionally.
  • Loading branch information
jelly committed Feb 4, 2025
1 parent 4185a0e commit 5d6c727
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/verify/check-storage-btrfs
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ class TestStorageBtrfs(storagelib.StorageCase):
self.click_dropdown(self.card_row("Storage", name=label) + " + tr", "Mount")
self.dialog({"mount_point": mount_point})
b.wait_visible(self.card_row("Storage", location=mount_point))
self.addCleanup(m.execute, f"while mountpoint -q {mount_point} && ! umount {mount_point}; do sleep 0.2; done;")

# create subvolume
m.execute(f"""
Expand All @@ -456,6 +457,7 @@ class TestStorageBtrfs(storagelib.StorageCase):
self.click_dropdown(self.card_row("Storage", name=os.path.basename(subvol)), "Mount")
self.dialog({"mount_point": subvol_mount_point})
b.wait_visible(self.card_row("Storage", location=subvol_mount_point))
self.addCleanup(m.execute, f"while mountpoint -q {subvol_mount_point} && ! umount {subvol_mount_point}; do sleep 0.2; done;")

# devices overview
self.click_card_row("Storage", name=label)
Expand Down

0 comments on commit 5d6c727

Please sign in to comment.