From: "Darrick J. Wong" <djwong@kernel.org>
To: djwong@kernel.org, zlang@redhat.com
Cc: tytso@mit.edu, linux-xfs@vger.kernel.org,
fstests@vger.kernel.org, guan@eryu.me
Subject: [PATCH 1/2] check: add a -smoketest option
Date: Tue, 25 Jul 2023 18:56:45 -0700 [thread overview]
Message-ID: <169033660570.3222210.3010411210438664310.stgit@frogsfrogsfrogs> (raw)
In-Reply-To: <169033659987.3222210.11071346898413396128.stgit@frogsfrogsfrogs>
From: Darrick J. Wong <djwong@kernel.org>
Create a "-smoketest" parameter to check that will run generic
filesystem smoke testing for five minutes apiece. Since there are only
five smoke tests, this is effectively a 16min super-quick test.
With gcov enabled, running these tests yields about ~75% coverage for
iomap and ~60% for xfs; or ~50% for ext4 and ~75% for ext4; and ~45% for
btrfs. Coverage was about ~65% for the pagecache.
Cc: tytso@mit.edu
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
README | 9 +++++++++
check | 6 +++++-
doc/group-names.txt | 1 +
tests/generic/475 | 2 +-
tests/generic/476 | 2 +-
tests/generic/521 | 2 +-
tests/generic/522 | 2 +-
tests/generic/642 | 2 +-
8 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/README b/README
index 9790334db1..d4ec73d10d 100644
--- a/README
+++ b/README
@@ -311,6 +311,15 @@ Running tests:
The TEST and SCRATCH partitions should be pre-formatted
with another base fs, where the overlay dirs will be created
+ - For infrequent filesystem developers who simply want to run a quick test
+ of the most commonly used filesystem functionality, use this command:
+
+ ./check -smoketest <other config options>
+
+ This configures fstests to run five tests to exercise the file I/O,
+ metadata, and crash recovery exercisers for four minutes apiece. This
+ should complete in approximately 20 minutes.
+
The check script tests the return value of each script, and
compares the output against the expected output. If the output
diff --git a/check b/check
index 89e7e7bf20..c02e693642 100755
--- a/check
+++ b/check
@@ -68,6 +68,7 @@ check options
-pvfs2 test PVFS2
-tmpfs test TMPFS
-ubifs test ubifs
+ -smoketest run smoke tests for 4min each
-l line mode diff
-udiff show unified diff (default)
-n show me, do not run tests
@@ -290,7 +291,10 @@ while [ $# -gt 0 ]; do
FSTYP=overlay
export OVERLAY=true
;;
-
+ -smoketest)
+ test -z "$SOAK_DURATION" && SOAK_DURATION="4m"
+ GROUP_LIST="smoketest"
+ ;;
-g) group=$2 ; shift ;
GROUP_LIST="$GROUP_LIST ${group//,/ }"
;;
diff --git a/doc/group-names.txt b/doc/group-names.txt
index 1c35a39432..c3dcca3755 100644
--- a/doc/group-names.txt
+++ b/doc/group-names.txt
@@ -118,6 +118,7 @@ selftest tests with fixed results, used to validate testing setup
send btrfs send/receive
shrinkfs decreasing the size of a filesystem
shutdown FS_IOC_SHUTDOWN ioctl
+smoketest Simple smoke tests
snapshot btrfs snapshots
soak long running soak tests whose runtime can be controlled
directly by setting the SOAK_DURATION variable
diff --git a/tests/generic/475 b/tests/generic/475
index 0cbf5131c2..ce7fe013b1 100755
--- a/tests/generic/475
+++ b/tests/generic/475
@@ -12,7 +12,7 @@
# testing efforts.
#
. ./common/preamble
-_begin_fstest shutdown auto log metadata eio recoveryloop
+_begin_fstest shutdown auto log metadata eio recoveryloop smoketest
# Override the default cleanup function.
_cleanup()
diff --git a/tests/generic/476 b/tests/generic/476
index 8e93b73457..b1ae4df4d4 100755
--- a/tests/generic/476
+++ b/tests/generic/476
@@ -8,7 +8,7 @@
# bugs in the write path.
#
. ./common/preamble
-_begin_fstest auto rw long_rw stress soak
+_begin_fstest auto rw long_rw stress soak smoketest
# Override the default cleanup function.
_cleanup()
diff --git a/tests/generic/521 b/tests/generic/521
index 22dd31a8ec..0956e50171 100755
--- a/tests/generic/521
+++ b/tests/generic/521
@@ -7,7 +7,7 @@
# Long-soak directio fsx test
#
. ./common/preamble
-_begin_fstest soak long_rw
+_begin_fstest soak long_rw smoketest
# Import common functions.
. ./common/filter
diff --git a/tests/generic/522 b/tests/generic/522
index f0cbcb245c..0e4e6009ed 100755
--- a/tests/generic/522
+++ b/tests/generic/522
@@ -7,7 +7,7 @@
# Long-soak buffered fsx test
#
. ./common/preamble
-_begin_fstest soak long_rw
+_begin_fstest soak long_rw smoketest
# Import common functions.
. ./common/filter
diff --git a/tests/generic/642 b/tests/generic/642
index eba90903a3..e6a475a8b5 100755
--- a/tests/generic/642
+++ b/tests/generic/642
@@ -8,7 +8,7 @@
# bugs in the xattr code.
#
. ./common/preamble
-_begin_fstest auto soak attr long_rw stress
+_begin_fstest auto soak attr long_rw stress smoketest
_cleanup()
{
next prev parent reply other threads:[~2023-07-26 1:56 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 1:56 [PATCHSET v2 0/2] fstests: testing improvements Darrick J. Wong
2023-07-26 1:56 ` Darrick J. Wong [this message]
2023-07-27 19:04 ` [PATCH 1/2] check: add a -smoketest option Theodore Ts'o
2023-07-26 1:56 ` [PATCH 2/2] check: generate gcov code coverage reports at the end of each section Darrick J. Wong
2023-07-27 14:57 ` Zorro Lang
-- strict thread matches above, loose matches on Subject: below --
2023-07-19 1:10 [PATCHSET 0/2] fstests: testing improvements Darrick J. Wong
2023-07-19 1:10 ` [PATCH 1/2] check: add a -smoketest option Darrick J. Wong
2023-07-19 15:10 ` Zorro Lang
2023-07-19 15:29 ` Darrick J. Wong
2023-07-19 16:11 ` Zorro Lang
2023-07-20 2:27 ` Darrick J. Wong
2023-07-20 14:34 ` Zorro Lang
2023-07-26 0:05 ` Darrick J. Wong
2023-07-26 6:01 ` Theodore Ts'o
2023-07-26 14:54 ` Zorro Lang
2023-07-26 20:59 ` Theodore Ts'o
2023-07-27 1:36 ` Theodore Ts'o
2023-07-27 1:54 ` Darrick J. Wong
2023-07-27 3:25 ` Zorro Lang
2023-07-27 14:33 ` Theodore Ts'o
2023-07-27 15:30 ` Zorro Lang
2023-07-28 15:53 ` Theodore Ts'o
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=169033660570.3222210.3010411210438664310.stgit@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=guan@eryu.me \
--cc=linux-xfs@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=zlang@redhat.com \
/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