Skip to contentSkip to conversation

btrfs: Source common/module when requiring module reload

PATCH New Marcos Paulo de Souza 1 participant 1 message Jul 23, 2021 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs: Source common/module when requiring module reload

Tests 163, 219, 225 and 242 require the btrfs module to be reloaded in the middle of the test. If btrfs is compiled builtin, these tests should be skipped, since we cannot unload it.

Today, this is what happens:

QA output created by 242
+./common/btrfs: line 405: _require_loadable_fs_module: command not found

Sourcing common/module in these tests fixes the issue by skipping the test:

    btrfs/242       [not run] btrfs: must be a module.
    Ran: btrfs/242
    Not run: btrfs/242

Other tests liker btrfs/124 and btrfs/125 already source the same file for the same reason, so follow the pattern.

---
 tests/btrfs/163 | 1 +
 tests/btrfs/219 | 1 +
 tests/btrfs/225 | 1 +
 tests/btrfs/242 | 1 +
 4 files changed, 4 insertions(+)
tests/btrfs/163 +1 -0
index 1dc081f1..76553831 100755
@@ -27,6 +27,7 @@ _cleanup()
 # Import common functions.
 . ./common/filter
 . ./common/filter.btrfs
+. ./common/module
 
 # real QA test starts here
 
tests/btrfs/219 +1 -0
index 528175b8..1cd5daae 100755
@@ -35,6 +35,7 @@ _cleanup()
 
 # Import common functions.
 . ./common/filter
+. ./common/module
 
 # real QA test starts here
 
tests/btrfs/225 +1 -0
index 408c03d2..ce1818db 100755
@@ -25,6 +25,7 @@ _cleanup()
 
 # Import common functions.
 . ./common/filter
+. ./common/module
 
 # real QA test starts here
 
tests/btrfs/242 +1 -0
index 6ce62081..e1c102ae 100755
@@ -13,6 +13,7 @@ _begin_fstest auto quick volume trim
 
 # Import common functions.
 . ./common/filter
+. ./common/module
 
 # real QA test starts here
 _supported_fs btrfs
Signature · 1 line
2.26.2