btrfs: source common/module when requiring module reload
authorMarcos Paulo de Souza <mpdesouza@suse.com>
Fri, 23 Jul 2021 18:18:00 +0000 (15:18 -0300)
committerEryu Guan <guaneryu@gmail.com>
Sun, 25 Jul 2021 14:37:12 +0000 (22:37 +0800)
commitb0f8ace89c79dc2daee0f6889dbc3889f56ad6cb
tree6d516b18d96a220ef9b4e1f1d0c5e968d349ebd9
parent72167f61778e688bd7e17537b417a58dc113fa4b
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.

Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/btrfs/163
tests/btrfs/219
tests/btrfs/225
tests/btrfs/242