overlay/071: Fix undefined OVL_BASE_SCRATCH_DIR
[xfstests-dev.git] / check
diff --git a/check b/check
index 5ffa8777110393b96bb57960acb461d2f4355bf8..415e0ff326f50824591e98de6853cc59e09cd091 100755 (executable)
--- 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