From: Zorro Lang <zlang@kernel.org>
To: fstests@vger.kernel.org
Cc: tytso@mit.edu, djwong@kernel.org, linux-xfs@vger.kernel.org
Subject: [RFC PATCH 2/2] fstests: support test template
Date: Fri, 28 Jul 2023 02:53:15 +0800 [thread overview]
Message-ID: <20230727185315.530134-3-zlang@kernel.org> (raw)
In-Reply-To: <20230727185315.530134-1-zlang@kernel.org>
The fstests has too many big or small testing groups, and it keeps
growing. It's hard for many users to pick up test cases they need.
Likes the smoketest, soak test, random-load test, integrality test
and so on. So most of users might just run "quick" group, or "auto"
group, or "all" directly each time. Besides the group, there're
some global parameters (e.g. *_FACTOR, SOAK_DURATION, etc) too, so
there're many "portfolios" to use them.
So I think fstests can provide a test template, which is bigger than
group, base on group and global parameters, provide reference about
how to do some kinds of tests.
Some users who are familar with fstests have their own wrappers, they
do different kind of tests by fstests according their experience.
They have their different testing templates, some templates might be
helpful and recommended to others. So I'd like to let fstests provide
a template/ directory and a "-t" option to load template. By this
chance, hope more people can share their great test templates to
others. We can record these templates in fstests, then anyone can use
them directly or refer to them to write their wrapper.
Signed-off-by: Zorro Lang <zlang@kernel.org>
---
check | 8 ++++++++
templates/smoketest | 16 ++++++++++++++++
2 files changed, 24 insertions(+)
create mode 100644 templates/smoketest
diff --git a/check b/check
index 89e7e7bf..7100aae4 100755
--- a/check
+++ b/check
@@ -335,6 +335,14 @@ while [ $# -gt 0 ]; do
;;
-i) iterations=$2; shift ;;
-I) iterations=$2; istop=true; shift ;;
+ -t)
+ source templates/$2
+ if [ $? -ne 0 ];then
+ echo "Cannot import the templates/$2"
+ exit 1
+ fi
+ shift
+ ;;
-T) timestamp=true ;;
-d) DUMP_OUTPUT=true ;;
-b) brief_test_summary=true;;
diff --git a/templates/smoketest b/templates/smoketest
new file mode 100644
index 00000000..40a0104b
--- /dev/null
+++ b/templates/smoketest
@@ -0,0 +1,16 @@
+##/bin/bash
+# For infrequent filesystem developers who simply want to run a quick test
+# of the most commonly used filesystem functionality, use this command:
+#
+# ./check -t smoketest <other config options>
+#
+# This template helps fstests to run several tests to exercise the file I/O,
+# metadata, and crash recovery exercisers for four minutes apiece. This
+# should complete in approximately 20 minutes.
+
+echo "**********************"
+echo "* A Quick Smoke Test *"
+echo "**********************"
+
+[ -z "$SOAK_DURATION" ] && SOAK_DURATION="4m"
+GROUP_LIST="smoketest"
--
2.40.1
prev parent reply other threads:[~2023-07-27 18:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 18:53 [PATCH 0/2] add smoketest group and try to provide template Zorro Lang
2023-07-27 18:53 ` [PATCH 1/2] fstests: add smoketest group Zorro Lang
2023-07-27 21:23 ` Darrick J. Wong
2023-07-27 18:53 ` Zorro Lang [this message]
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=20230727185315.530134-3-zlang@kernel.org \
--to=zlang@kernel.org \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=tytso@mit.edu \
/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