]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
torture: Permit running of experimental torture types
authorPaul E. McKenney <paulmck@kernel.org>
Sat, 19 Feb 2022 01:52:13 +0000 (17:52 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Tue, 12 Apr 2022 00:08:59 +0000 (17:08 -0700)
This commit weakens the checks of the kvm.sh script's --torture parameter
and the kvm-recheck.sh script's parsing so that experimental torture tests
may be created without updating these two scripts.  The changes required
are to the appropriate Makefile and Kconfig file, plus a directory
whose name begins with "X" must be added to the rcutorture/configs file.
This new directory's name can then be passed in via the kvm.sh script's
--torture parameter.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
tools/testing/selftests/rcutorture/bin/kvm.sh

index 0a5419982ab3ead8b0986d787b356ddbd07ac169..0789c5606d2abb347e8f93efbeefc88f60c04b3c 100755 (executable)
@@ -33,7 +33,12 @@ do
                TORTURE_SUITE="`cat $i/../torture_suite`"
                configfile=`echo $i | sed -e 's,^.*/,,'`
                rm -f $i/console.log.*.diags
-               kvm-recheck-${TORTURE_SUITE}.sh $i
+               case "${TORTURE_SUITE}" in
+               X*)
+                       ;;
+               *)
+                       kvm-recheck-${TORTURE_SUITE}.sh $i
+               esac
                if test -f "$i/qemu-retval" && test "`cat $i/qemu-retval`" -ne 0 && test "`cat $i/qemu-retval`" -ne 137
                then
                        echo QEMU error, output:
index 55b2c153328274bf8a1d469ad978060ad7c621a0..af58b86a503a05e43f1e8d53c1b413c4636b5c6a 100755 (executable)
@@ -86,7 +86,7 @@ usage () {
        echo "       --remote"
        echo "       --results absolute-pathname"
        echo "       --shutdown-grace seconds"
-       echo "       --torture lock|rcu|rcuscale|refscale|scf"
+       echo "       --torture lock|rcu|rcuscale|refscale|scf|X*"
        echo "       --trust-make"
        exit 1
 }
@@ -231,7 +231,7 @@ do
                shift
                ;;
        --torture)
-               checkarg --torture "(suite name)" "$#" "$2" '^\(lock\|rcu\|rcuscale\|refscale\|scf\)$' '^--'
+               checkarg --torture "(suite name)" "$#" "$2" '^\(lock\|rcu\|rcuscale\|refscale\|scf\|X.*\)$' '^--'
                TORTURE_SUITE=$2
                TORTURE_MOD="`echo $TORTURE_SUITE | sed -e 's/^\(lock\|rcu\|scf\)$/\1torture/'`"
                shift