aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2013-10-04 16:15:55 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2013-12-03 13:11:15 -0500
commit315c540d46f8f11fe2a84e627d9473e90441ae96 (patch)
tree24544028c66196efce7dcd113a51549c04585fc5 /tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh
parent2bcdf4e31ae4e215b1e61831d9defa3632cb7bd3 (diff)
rcutorture: Refactor to enable non-x86 architectures
This commit expands the checks for what architecture is running to generate additional qemu-system- commands, then uses the resulting qemu-system- command name to choose different qemu arguments as needed for different architectures. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh')
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh27
1 files changed, 14 insertions, 13 deletions
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 5e2e79b5eaba..9fd546ccb075 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh
@@ -115,20 +115,21 @@ QEMU="`identify_qemu $builddir/vmlinux.o`"
115 115
116# Generate -smp qemu argument. 116# Generate -smp qemu argument.
117cpu_count=`configNR_CPUS.sh $config_template` 117cpu_count=`configNR_CPUS.sh $config_template`
118ncpus=`grep '^processor' /proc/cpuinfo | wc -l` 118vcpus=`identify_qemu_vcpus`
119if test $cpu_count -gt $ncpus 119if test $cpu_count -gt $vcpus
120then 120then
121 echo CPU count limited from $cpu_count to $ncpus 121 echo CPU count limited from $cpu_count to $vcpus
122 touch $resdir/Warnings 122 touch $resdir/Warnings
123 echo CPU count limited from $cpu_count to $ncpus >> $resdir/Warnings 123 echo CPU count limited from $cpu_count to $vcpus >> $resdir/Warnings
124 cpu_count=$ncpus 124 cpu_count=$vcpus
125fi
126if echo $qemu_args | grep -q -e -smp
127then
128 echo CPU count specified by caller
129else
130 qemu_args="$qemu_args -smp $cpu_count"
131fi 125fi
126qemu_args="`specify_qemu_cpus "$QEMU" "$qemu_args" "$cpu_count"`"
127
128# Generate architecture-specific and interaction-specific qemu arguments
129qemu_args="$qemu_args `identify_qemu_args "$QEMU" "$builddir/console.log"`"
130
131# Generate qemu -append arguments
132qemu_append="`identify_qemu_append "$QEMU"`"
132 133
133# Generate CPU-hotplug boot parameters 134# Generate CPU-hotplug boot parameters
134boot_args="`rcutorture_param_onoff "$boot_args" $builddir/.config`" 135boot_args="`rcutorture_param_onoff "$boot_args" $builddir/.config`"
@@ -137,8 +138,8 @@ boot_args="`rcutorture_param_n_barrier_cbs "$boot_args"`"
137# Pull in Kconfig-fragment boot parameters 138# Pull in Kconfig-fragment boot parameters
138boot_args="`configfrag_boot_params "$boot_args" "$config_template"`" 139boot_args="`configfrag_boot_params "$boot_args" "$config_template"`"
139 140
140echo $QEMU -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 141echo $QEMU $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append \"$qemu_append rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args\" > $resdir/qemu-cmd
141$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" & 142$QEMU $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append "$qemu_append rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args" &
142qemu_pid=$! 143qemu_pid=$!
143commandcompleted=0 144commandcompleted=0
144echo Monitoring qemu job at pid $qemu_pid 145echo Monitoring qemu job at pid $qemu_pid