From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: guaneryu@gmail.com
Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org
Subject: [PATCH v2 24/24] check: try reloading modules
Date: Thu, 17 Sep 2020 19:06:37 -0700 [thread overview]
Message-ID: <20200918020637.GH7954@magnolia> (raw)
From: Darrick J. Wong <darrick.wong@oracle.com>
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>
---
v2: use "fs-$FSTYP" for the module name
---
README | 3 +++
check | 9 +++++++++
2 files changed, 12 insertions(+)
diff --git a/README b/README
index d0e23fcd..4af331b4 100644
--- a/README
+++ b/README
@@ -106,6 +106,9 @@ Preparing system for tests:
- set USE_KMEMLEAK=yes to scan for memory leaks in the kernel
after every test, if the kernel supports kmemleak.
- set KEEP_DMESG=yes to keep dmesg log after test
+ - Set TEST_FS_MODULE_RELOAD=1 to unload the module and reload
+ it between test invocations. This assumes that the name of
+ the module is the same as FSTYP.
- or add a case to the switch in common/config assigning
these variables based on the hostname of your test
diff --git a/check b/check
index 6a353399..6002233a 100755
--- a/check
+++ b/check
@@ -834,6 +834,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
reply other threads:[~2020-09-18 2:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200918020637.GH7954@magnolia \
--to=darrick.wong@oracle.com \
--cc=fstests@vger.kernel.org \
--cc=guaneryu@gmail.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).