提交 1b900c6a 编写于 作者: B Boqun Feng 提交者: Paul E. McKenney

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: NBoqun Feng <boqun.feng@gmail.com>
Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
上级 e5731b58
...@@ -99,8 +99,9 @@ configfrag_hotplug_cpu () { ...@@ -99,8 +99,9 @@ configfrag_hotplug_cpu () {
# identify_boot_image qemu-cmd # identify_boot_image qemu-cmd
# #
# Returns the relative path to the kernel build image. This will be # Returns the relative path to the kernel build image. This will be
# arch/<arch>/boot/bzImage unless overridden with the TORTURE_BOOT_IMAGE # arch/<arch>/boot/bzImage or vmlinux if bzImage is not a target for the
# environment variable. # architecture, unless overridden with the TORTURE_BOOT_IMAGE environment
# variable.
identify_boot_image () { identify_boot_image () {
if test -n "$TORTURE_BOOT_IMAGE" if test -n "$TORTURE_BOOT_IMAGE"
then then
...@@ -110,11 +111,8 @@ identify_boot_image () { ...@@ -110,11 +111,8 @@ identify_boot_image () {
qemu-system-x86_64|qemu-system-i386) qemu-system-x86_64|qemu-system-i386)
echo arch/x86/boot/bzImage echo arch/x86/boot/bzImage
;; ;;
qemu-system-ppc64)
echo arch/powerpc/boot/bzImage
;;
*) *)
echo "" echo vmlinux
;; ;;
esac esac
fi fi
......
...@@ -96,7 +96,8 @@ if test "$base_resdir" != "$resdir" -a -f $base_resdir/bzImage -a -f $base_resdi ...@@ -96,7 +96,8 @@ if test "$base_resdir" != "$resdir" -a -f $base_resdir/bzImage -a -f $base_resdi
then then
# Rerunning previous test, so use that test's kernel. # Rerunning previous test, so use that test's kernel.
QEMU="`identify_qemu $base_resdir/vmlinux`" QEMU="`identify_qemu $base_resdir/vmlinux`"
KERNEL=$base_resdir/bzImage BOOT_IMAGE="`identify_boot_image $QEMU`"
KERNEL=$base_resdir/${BOOT_IMAGE##*/} # use the last component of ${BOOT_IMAGE}
ln -s $base_resdir/Make*.out $resdir # for kvm-recheck.sh ln -s $base_resdir/Make*.out $resdir # for kvm-recheck.sh
ln -s $base_resdir/.config $resdir # for kvm-recheck.sh ln -s $base_resdir/.config $resdir # for kvm-recheck.sh
elif kvm-build.sh $config_template $builddir $T elif kvm-build.sh $config_template $builddir $T
...@@ -110,7 +111,7 @@ then ...@@ -110,7 +111,7 @@ then
if test -n "$BOOT_IMAGE" if test -n "$BOOT_IMAGE"
then then
cp $builddir/$BOOT_IMAGE $resdir cp $builddir/$BOOT_IMAGE $resdir
KERNEL=$resdir/bzImage KERNEL=$resdir/${BOOT_IMAGE##*/}
else else
echo No identifiable boot image, not running KVM, see $resdir. echo No identifiable boot image, not running KVM, see $resdir.
echo Do the torture scripts know about your architecture? echo Do the torture scripts know about your architecture?
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册