]> Gentwo Git Trees - linux/.git/commitdiff
torture: Permit negative kvm.sh --kconfig numberic arguments
authorPaul E. McKenney <paulmck@kernel.org>
Wed, 5 Nov 2025 20:32:13 +0000 (12:32 -0800)
committerFrederic Weisbecker <frederic@kernel.org>
Fri, 7 Nov 2025 12:57:38 +0000 (13:57 +0100)
This commit loosens the kvm.sh script's regular expressions to permit
negative-valued Kconfig options, for example:

--kconfig CONFIG_CMDLINE_LOG_WRAP_IDEAL_LEN=-1

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

index 617cba339d289db4c10ad4df3d304d1418626b37..fff15821c44c9605843f9ff3854fe2ddcdbfe416 100755 (executable)
@@ -199,7 +199,7 @@ do
                fi
                ;;
        --kconfig|--kconfigs)
-               checkarg --kconfig "(Kconfig options)" $# "$2" '^\(#CHECK#\)\?CONFIG_[A-Z0-9_]\+=\([ynm]\|[0-9]\+\|"[^"]*"\)\( \+\(#CHECK#\)\?CONFIG_[A-Z0-9_]\+=\([ynm]\|[0-9]\+\|"[^"]*"\)\)* *$' '^error$'
+               checkarg --kconfig "(Kconfig options)" $# "$2" '^\(#CHECK#\)\?CONFIG_[A-Z0-9_]\+=\([ynm]\|-\?[0-9]\+\|"[^"]*"\)\( \+\(#CHECK#\)\?CONFIG_[A-Z0-9_]\+=\([ynm]\|-\?[0-9]\+\|"[^"]*"\)\)* *$' '^error$'
                TORTURE_KCONFIG_ARG="`echo "$TORTURE_KCONFIG_ARG $2" | sed -e 's/^ *//' -e 's/ *$//'`"
                shift
                ;;