summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2020-09-17 19:06:37 -0700
committerEryu Guan <guaneryu@gmail.com>2020-09-21 01:15:20 +0800
commit9a6005c31f750c06e90f2bb36285fcd41c803798 (patch)
tree35f3635152fe83a5960423f8b802973ae5183a0a /check
parent41a6a75daec7d53ef5e2dafb79c02dbb3b6d804e (diff)
check: try reloading modules
Optionally reload the module between each test to try to pinpoint slab cache errors and whatnot. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Diffstat (limited to 'check')
-rwxr-xr-xcheck9
1 files changed, 9 insertions, 0 deletions
diff --git a/check b/check
index 5ffa8777..415e0ff3 100755
--- a/check
+++ b/check
@@ -810,6 +810,15 @@ function run_section()
_check_dmesg || err=true
fi
+ # Reload the module after each test to check for leaks or
+ # other problems.
+ if [ -n "${TEST_FS_MODULE_RELOAD}" ]; then
+ _test_unmount 2> /dev/null
+ _scratch_unmount 2> /dev/null
+ modprobe -r fs-$FSTYP
+ modprobe fs-$FSTYP
+ fi
+
# Scan for memory leaks after every test so that associating
# a leak to a particular test will be as accurate as possible.
_check_kmemleak || err=true