btrfs/249 fails with:
QA output created by 249
./common/btrfs: line 425: _require_loadable_fs_module: command not found
./common/btrfs: line 432: _reload_fs_module: command not found
ERROR: not a btrfs filesystem: /media/scratch
This is because the test is failing to source common/module.
Fix this by sourcing common/module in the btrfs common file.
While it it remove duplication of sourcing this file from other
tests in btrfs so that this is only done once in one place.
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
# Common btrfs specific functions
#
+. common/module
+
_btrfs_get_subvolid()
{
mnt=$1
# Import common functions.
. ./common/filter
-. ./common/module
# real QA test starts here
# Import common functions.
. ./common/filter
-. ./common/module
# real QA test starts here
# Import common functions.
. ./common/filter
. ./common/filter.btrfs
-. ./common/module
# real QA test starts here
_btrfs_rescan_devices
}
-# Import common functions.
-. ./common/module
-
# real QA test starts here
# Modify as appropriate.
# Import common functions.
. ./common/filter
-. ./common/module
# real QA test starts here
# Import common functions.
. ./common/filter
-. ./common/module
# real QA test starts here
# Import common functions.
. ./common/filter
-. ./common/module
# real QA test starts here
_supported_fs btrfs