From 9cf2a6ced0ead97e60d8b5354ddaf88c6da3f747 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 29 Oct 2020 12:10:16 -0700 Subject: [PATCH] scoutfs-tests: add remounting test helpers Add functions to remount all the mounts, including after having removed and reinserted the module. Signed-off-by: Zach Brown --- tests/funcs/fs.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/funcs/fs.sh b/tests/funcs/fs.sh index f79c341e..11691cb9 100644 --- a/tests/funcs/fs.sh +++ b/tests/funcs/fs.sh @@ -157,6 +157,24 @@ t_umount_all() done } +t_remount_all() +{ + t_quiet t_umount_all || t_fail "umounting all failed" + t_quiet t_mount_all || t_fail "mounting all failed" +} + +t_reinsert_remount_all() +{ + t_quiet t_umount_all || t_fail "umounting all failed" + + t_quiet rmmod scoutfs || \ + t_fail "rmmod scoutfs failed" + t_quiet insmod "$T_KMOD_REPO/src/scoutfs.ko" || + t_fail "insmod scoutfs failed" + + t_quiet t_mount_all || t_fail "mounting all failed" +} + t_trigger_path() { local nr="$1"