These three tests try to reload the xfs module as a cheap way to detect
leaked inode and dquot objects when the slabs for those object are torn
down during rmmod. Removal might not succeed, and we don't really care
for that case because we still want to exercise the log recovery code.
However, if (say) the root filesystem is xfs, then removal will never
succeed. There's no way that waiting 50 seconds(!) per test is going
to change that. Add a silly helper to do it fast or go home.
Reported-by: sandeen@sandeen.net
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
return $mod_ret
}
+
+# Try to reload a filesystem driver. Don't wait if we can't remove the module,
+# and don't let failures related to removing the module escape. The caller
+# doesn't care if removal doesn't work.
+_optional_reload_fs_module()
+{
+ MODPROBE_PATIENT_RM_TIMEOUT_SECONDS=0 \
+ MODPROBE_REMOVE_PATIENT="" \
+ _test_loadable_fs_module "$@" 2>&1 | \
+ sed -e '/patient module removal/d'
+}
rm -f ${RESULT_DIR}/require_scratch
echo "See if we leak"
-_test_loadable_fs_module "xfs"
+_optional_reload_fs_module "xfs"
# success, all done
status=0
rm -f ${RESULT_DIR}/require_scratch
echo "See if we leak"
-_test_loadable_fs_module "xfs"
+_optional_reload_fs_module "xfs"
# success, all done
status=0
rm -f ${RESULT_DIR}/require_scratch
echo "See if we leak"
-_test_loadable_fs_module "xfs"
+_optional_reload_fs_module "xfs"
# success, all done
status=0