summaryrefslogtreecommitdiff
path: root/tests/btrfs/164
diff options
context:
space:
mode:
authorAnand Jain <anand.jain@oracle.com>2019-04-02 16:19:46 +0800
committerEryu Guan <guaneryu@gmail.com>2019-04-06 19:41:47 +0800
commitcbae878f4110ca6e746756777f774ede788a046d (patch)
tree179fbed65c0f1061cbc7c4767fc71a377f2c0b43 /tests/btrfs/164
parent1f139bbe014099eea76ebad31c65919d62ba782b (diff)
btrfs: try use forget to unregister device
Some btrfs test cases use btrfs module-reload to unregister devices in the btrfs kernel. The problem with the module-reload approach is, if test system contains btrfs as rootfs, then you can't run these test cases. Patches [1] introduced btrfs forget feature which can unregister devices without the module-reload approach. [1] btrfs-progs: device scan: add new option to forget one or all scanned devices btrfs: introduce new ioctl to unregister a btrfs device And this patch makes relevant changes in the fstests to use this new feature, when available. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Diffstat (limited to 'tests/btrfs/164')
-rwxr-xr-xtests/btrfs/1644
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/btrfs/164 b/tests/btrfs/164
index 097191a0..e280f52e 100755
--- a/tests/btrfs/164
+++ b/tests/btrfs/164
@@ -36,7 +36,7 @@ rm -f $seqres.full
# Modify as appropriate.
_supported_fs btrfs
_supported_os Linux
-_require_loadable_fs_module "btrfs"
+_require_btrfs_forget_or_module_loadable
_require_scratch_dev_pool 2
_scratch_dev_pool_get 2
@@ -69,7 +69,7 @@ delete_seed()
{
_run_btrfs_util_prog device delete $dev_seed $SCRATCH_MNT
_scratch_unmount
- _reload_fs_module "btrfs"
+ _btrfs_forget_or_module_reload
run_check _mount $dev_sprout $SCRATCH_MNT
_run_btrfs_util_prog filesystem show -m $SCRATCH_MNT
echo -- sprout --