mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
check: run auto test group by default
Everyone who starts using fstests runs "check" without parameters, and then has problems with it running dangerous tests. most people just want fstests to act as a regression test suite, not a fuzzer or exercise known crash conditions. Hence make the default behaviour to be "run the auto group" rather than "run every test". To enable people to run all tests easily (if they really want to) add a special group keyword named "all". This wildcard will trigger selecting all the tests in fstests as per the original "check without parameters" behaviour. Signed-Off-By: Dave Chinner <dchinner@redhat.com> Reviewed-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
@@ -102,6 +102,8 @@ a test file name match pattern (e.g. xfs/*).
|
|||||||
group argument is either a name of a tests group to collect from all
|
group argument is either a name of a tests group to collect from all
|
||||||
the test dirs (e.g. quick) or a name of a tests group to collect from
|
the test dirs (e.g. quick) or a name of a tests group to collect from
|
||||||
a specific tests dir in the form of <test dir>/<group name> (e.g. xfs/quick).
|
a specific tests dir in the form of <test dir>/<group name> (e.g. xfs/quick).
|
||||||
|
If you want to run all the tests in the test suite, use "-g all" to specify all
|
||||||
|
groups.
|
||||||
|
|
||||||
exclude_file argument refers to a name of a file inside each test directory.
|
exclude_file argument refers to a name of a file inside each test directory.
|
||||||
for every test dir where this file is found, the listed test names are
|
for every test dir where this file is found, the listed test names are
|
||||||
@@ -220,22 +222,24 @@ _prepare_test_list()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Specified groups to include
|
# Specified groups to include
|
||||||
for group in $GROUP_LIST; do
|
# Note that the CLI processing adds a leading space to the first group
|
||||||
list=$(get_group_list $group)
|
# parameter, so we have to catch that here checking for "all"
|
||||||
if [ -z "$list" ]; then
|
if ! $have_test_arg && [ "$GROUP_LIST" == " all" ]; then
|
||||||
echo "Group \"$group\" is empty or not defined?"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
for t in $list; do
|
|
||||||
grep -s "^$t\$" $tmp.list >/dev/null || \
|
|
||||||
echo "$t" >>$tmp.list
|
|
||||||
done
|
|
||||||
done
|
|
||||||
|
|
||||||
if ! $have_test_arg && [ -z "$GROUP_LIST" ]; then
|
|
||||||
# no test numbers, do everything
|
# no test numbers, do everything
|
||||||
get_all_tests
|
get_all_tests
|
||||||
|
else
|
||||||
|
for group in $GROUP_LIST; do
|
||||||
|
list=$(get_group_list $group)
|
||||||
|
if [ -z "$list" ]; then
|
||||||
|
echo "Group \"$group\" is empty or not defined?"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
for t in $list; do
|
||||||
|
grep -s "^$t\$" $tmp.list >/dev/null || \
|
||||||
|
echo "$t" >>$tmp.list
|
||||||
|
done
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Specified groups to exclude
|
# Specified groups to exclude
|
||||||
@@ -364,6 +368,10 @@ if $have_test_arg; then
|
|||||||
|
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
elif [ -z "$GROUP_LIST" ]; then
|
||||||
|
# default group list is the auto group. If any other group or test is
|
||||||
|
# specified, we use that instead.
|
||||||
|
GROUP_LIST="auto"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# we need common/rc
|
# we need common/rc
|
||||||
|
|||||||
Reference in New Issue
Block a user