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@xxxxxxxxxx> --- 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