diff options
author | Boqun Feng <boqun.feng@gmail.com> | 2016-05-18 23:42:22 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2016-06-14 19:03:29 -0400 |
commit | 1b900c6a26de26e111617d6b69b64aaee7b9de01 (patch) | |
tree | 315a4949689cd471c8d66e02158d29e5315d03d1 | |
parent | e5731b584b3e521e3db6fda9cdfe10646d3413a3 (diff) |
rcutorture: Use vmlinux as the fallback kernel image
The vmlinux image is available for all the architectures, and suitable
for running a KVM guest by QEMU, besides, we used to copy the vmlinux
to $resdir anyway. Therefore it makes sense to use it as the fallback
kernel image for rcutorture KVM tests.
This patch makes identify_boot_image() return vmlinux if
${TORTURE_BOOT_IMAGE} is not set on non-x86 architectures, also fixes
several places that hard-code "bzImage" as $KERNEL.
This also fixes a problem that PPC doesn't have a bzImage file as build
results.
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-rw-r--r-- | tools/testing/selftests/rcutorture/bin/functions.sh | 10 | ||||
-rwxr-xr-x | tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh | 5 |
2 files changed, 7 insertions, 8 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh index b325470c01b3..616180153208 100644 --- a/tools/testing/selftests/rcutorture/bin/functions.sh +++ b/tools/testing/selftests/rcutorture/bin/functions.sh | |||
@@ -99,8 +99,9 @@ configfrag_hotplug_cpu () { | |||
99 | # identify_boot_image qemu-cmd | 99 | # identify_boot_image qemu-cmd |
100 | # | 100 | # |
101 | # Returns the relative path to the kernel build image. This will be | 101 | # Returns the relative path to the kernel build image. This will be |
102 | # arch/<arch>/boot/bzImage unless overridden with the TORTURE_BOOT_IMAGE | 102 | # arch/<arch>/boot/bzImage or vmlinux if bzImage is not a target for the |
103 | # environment variable. | 103 | # architecture, unless overridden with the TORTURE_BOOT_IMAGE environment |
104 | # variable. | ||
104 | identify_boot_image () { | 105 | identify_boot_image () { |
105 | if test -n "$TORTURE_BOOT_IMAGE" | 106 | if test -n "$TORTURE_BOOT_IMAGE" |
106 | then | 107 | then |
@@ -110,11 +111,8 @@ identify_boot_image () { | |||
110 | qemu-system-x86_64|qemu-system-i386) | 111 | qemu-system-x86_64|qemu-system-i386) |
111 | echo arch/x86/boot/bzImage | 112 | echo arch/x86/boot/bzImage |
112 | ;; | 113 | ;; |
113 | qemu-system-ppc64) | ||
114 | echo arch/powerpc/boot/bzImage | ||
115 | ;; | ||
116 | *) | 114 | *) |
117 | echo "" | 115 | echo vmlinux |
118 | ;; | 116 | ;; |
119 | esac | 117 | esac |
120 | fi | 118 | fi |
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh index 9b17c5252a2e..8dc5e4639fb4 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh | |||
@@ -96,7 +96,8 @@ if test "$base_resdir" != "$resdir" -a -f $base_resdir/bzImage -a -f $base_resdi | |||
96 | then | 96 | then |
97 | # Rerunning previous test, so use that test's kernel. | 97 | # Rerunning previous test, so use that test's kernel. |
98 | QEMU="`identify_qemu $base_resdir/vmlinux`" | 98 | QEMU="`identify_qemu $base_resdir/vmlinux`" |
99 | KERNEL=$base_resdir/bzImage | 99 | BOOT_IMAGE="`identify_boot_image $QEMU`" |
100 | KERNEL=$base_resdir/${BOOT_IMAGE##*/} # use the last component of ${BOOT_IMAGE} | ||
100 | ln -s $base_resdir/Make*.out $resdir # for kvm-recheck.sh | 101 | ln -s $base_resdir/Make*.out $resdir # for kvm-recheck.sh |
101 | ln -s $base_resdir/.config $resdir # for kvm-recheck.sh | 102 | ln -s $base_resdir/.config $resdir # for kvm-recheck.sh |
102 | elif kvm-build.sh $config_template $builddir $T | 103 | elif kvm-build.sh $config_template $builddir $T |
@@ -110,7 +111,7 @@ then | |||
110 | if test -n "$BOOT_IMAGE" | 111 | if test -n "$BOOT_IMAGE" |
111 | then | 112 | then |
112 | cp $builddir/$BOOT_IMAGE $resdir | 113 | cp $builddir/$BOOT_IMAGE $resdir |
113 | KERNEL=$resdir/bzImage | 114 | KERNEL=$resdir/${BOOT_IMAGE##*/} |
114 | else | 115 | else |
115 | echo No identifiable boot image, not running KVM, see $resdir. | 116 | echo No identifiable boot image, not running KVM, see $resdir. |
116 | echo Do the torture scripts know about your architecture? | 117 | echo Do the torture scripts know about your architecture? |