torture: Place --bootargs parameters at end of -append list
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 6 Jul 2023 21:19:26 +0000 (14:19 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Fri, 14 Jul 2023 22:10:57 +0000 (15:10 -0700)
Currently, the kernel boot parameters specified by the kvm.sh --bootargs
parameter are placed near the beginning of the -append list that is
passed to qemu.  This means that in the not-uncommon case of a kernel
boot parameter where the last argument wins, the --bootargs list overrides
neither the list in the .boot file nor the additional parameters supplied
by the rcutorture scripting.

This commit therefore places the kernel boot parameters specified by
the kvm.sh --bootargs parameter at the end of qemu's -append list.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/testing/selftests/rcutorture/bin/functions.sh
tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
tools/testing/selftests/rcutorture/configs/lock/ver_functions.sh
tools/testing/selftests/rcutorture/configs/rcu/ver_functions.sh
tools/testing/selftests/rcutorture/configs/rcuscale/ver_functions.sh
tools/testing/selftests/rcutorture/configs/refscale/ver_functions.sh
tools/testing/selftests/rcutorture/configs/scf/ver_functions.sh

index 48b9147e8c9107303eb8421a761854881f9813ae..b8e2ea23cb3f0cdf203ee89521cef8c83fed3fcc 100644 (file)
@@ -45,7 +45,7 @@ checkarg () {
 configfrag_boot_params () {
        if test -r "$2.boot"
        then
-               echo $1 `grep -v '^#' "$2.boot" | tr '\012' ' '`
+               echo `grep -v '^#' "$2.boot" | tr '\012' ' '` $1
        else
                echo $1
        fi
index b9912de9d71e4d038e1c02e51216068095fd5e79..1e7566997e51748502f578f9f0b4807836c25f49 100755 (executable)
@@ -162,7 +162,7 @@ boot_args="`configfrag_boot_params "$boot_args_in" "$config_template"`"
 boot_args="`per_version_boot_params "$boot_args" $resdir/.config $seconds`"
 if test -n "$TORTURE_BOOT_GDB_ARG"
 then
-       boot_args="$boot_args $TORTURE_BOOT_GDB_ARG"
+       boot_args="$TORTURE_BOOT_GDB_ARG $boot_args"
 fi
 
 # Give bare-metal advice
index d3e4b2971f9221129f4a7c3f4fed6b9d897358c0..e7bb32709d785ff105184c1dff4fe8de7510393e 100644 (file)
@@ -22,8 +22,9 @@ locktorture_param_onoff () {
 #
 # Adds per-version torture-module parameters to kernels supporting them.
 per_version_boot_params () {
-       echo $1 `locktorture_param_onoff "$1" "$2"` \
+       echo    `locktorture_param_onoff "$1" "$2"` \
                locktorture.stat_interval=15 \
                locktorture.shutdown_secs=$3 \
-               locktorture.verbose=1
+               locktorture.verbose=1 \
+               $1
 }
index e2bc99c785e75a9da38e2a11511c0a99424e4372..c044df3868760122e31aaec87195f513398bc051 100644 (file)
@@ -46,10 +46,11 @@ rcutorture_param_stat_interval () {
 #
 # Adds per-version torture-module parameters to kernels supporting them.
 per_version_boot_params () {
-       echo $1 `rcutorture_param_onoff "$1" "$2"` \
+       echo    `rcutorture_param_onoff "$1" "$2"` \
                `rcutorture_param_n_barrier_cbs "$1"` \
                `rcutorture_param_stat_interval "$1"` \
                rcutorture.shutdown_secs=$3 \
                rcutorture.test_no_idle_hz=1 \
-               rcutorture.verbose=1
+               rcutorture.verbose=1 \
+               $1
 }
index ffbe15109f0db1c1a8d98ee7dd987a6b20178220..28070b43f01714187713f043103651a99544a336 100644 (file)
@@ -11,6 +11,7 @@
 #
 # Adds per-version torture-module parameters to kernels supporting them.
 per_version_boot_params () {
-       echo $1 rcuscale.shutdown=1 \
-               rcuscale.verbose=0
+       echo    rcuscale.shutdown=1 \
+               rcuscale.verbose=0 \
+               $1
 }
index f81fa2c541a640638ab29b28b8154aaab7e5ae0e..7484656276012239e5d846a7365ef3203e46db2c 100644 (file)
@@ -11,6 +11,7 @@
 #
 # Adds per-version torture-module parameters to kernels supporting them.
 per_version_boot_params () {
-       echo $1 refscale.shutdown=1 \
-               refscale.verbose=0
+       echo    refscale.shutdown=1 \
+               refscale.verbose=0 \
+               $1
 }
index 2d949e58f5a5dfd2e7b267be5110686f2c869570..7637f68ef0cebc4424d132adf07e146d183dc4f6 100644 (file)
@@ -22,8 +22,9 @@ scftorture_param_onoff () {
 #
 # Adds per-version torture-module parameters to kernels supporting them.
 per_version_boot_params () {
-       echo $1 `scftorture_param_onoff "$1" "$2"` \
+       echo    `scftorture_param_onoff "$1" "$2"` \
                scftorture.stat_interval=15 \
                scftorture.shutdown_secs=$3 \
-               scftorture.verbose=1
+               scftorture.verbose=1 \
+               $1
 }