aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2013-09-29 23:22:32 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2013-12-03 13:11:11 -0500
commit0cc2441447eafd4e0742b6363e416967167c5137 (patch)
tree6b518999d455994ba6c82df1e8cb90c0d08508cd
parent4275be83b807c2926d2b23e67eb61692a1810080 (diff)
rcutorture: Add per-Kconfig fragment boot parameters
Some Kconfig fragments require rcutorture module parameters to do optimal testing, for example, a configuration for SRCU would need rcutorture.torture_type=srcu. This commit therefore adds a per-Kconfig-fragment boot-parameter capability. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-rw-r--r--tools/testing/selftests/rcutorture/bin/functions.sh12
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh2
2 files changed, 14 insertions, 0 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh
index d4c15f81cd27..8f912419ed7f 100644
--- a/tools/testing/selftests/rcutorture/bin/functions.sh
+++ b/tools/testing/selftests/rcutorture/bin/functions.sh
@@ -28,6 +28,18 @@ bootparam_hotplug_cpu () {
28 echo "$1" | grep -q "rcutorture\.onoff_" 28 echo "$1" | grep -q "rcutorture\.onoff_"
29} 29}
30 30
31# configfrag_boot_params bootparam-string config-fragment-file
32#
33# Adds boot parameters from the .boot file, if any.
34configfrag_boot_params () {
35 if test -r "$2.boot"
36 then
37 echo $1 `grep -v '^#' "$2.boot" | tr '\012' ' '`
38 else
39 echo $1
40 fi
41}
42
31# configfrag_hotplug_cpu config-fragment-file 43# configfrag_hotplug_cpu config-fragment-file
32# 44#
33# Returns 1 if the config fragment specifies hotplug CPU. 45# Returns 1 if the config fragment specifies hotplug CPU.
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh
index 0a3f037a8bb3..618aa4d766d3 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh
@@ -137,6 +137,8 @@ fi
137boot_args="`rcutorture_param_onoff "$boot_args" $builddir/.config`" 137boot_args="`rcutorture_param_onoff "$boot_args" $builddir/.config`"
138# Generate rcu_barrier() boot parameter 138# Generate rcu_barrier() boot parameter
139boot_args="`rcutorture_param_n_barrier_cbs "$boot_args"`" 139boot_args="`rcutorture_param_n_barrier_cbs "$boot_args"`"
140# Pull in Kconfig-fragment boot parameters
141boot_args="`configfrag_boot_params "$boot_args" "$config_template"`"
140 142
141echo $QEMU -name rcu-test -serial file:$builddir/console.log $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append \"noapic selinux=0 console=ttyS0 initcall_debug debug rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args\" > $resdir/qemu-cmd 143echo $QEMU -name rcu-test -serial file:$builddir/console.log $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append \"noapic selinux=0 console=ttyS0 initcall_debug debug rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args\" > $resdir/qemu-cmd
142$QEMU -name rcu-test -serial file:$builddir/console.log $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append "noapic selinux=0 console=ttyS0 initcall_debug debug rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args" & 144$QEMU -name rcu-test -serial file:$builddir/console.log $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append "noapic selinux=0 console=ttyS0 initcall_debug debug rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args" &