From patchwork Thu May 19 03:42:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 623788 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3r9H4f2mLnz9sBc for ; Thu, 19 May 2016 13:44:34 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=OBBjS6r1; dkim-atps=neutral Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3r9H4f1kC9zDqZC for ; Thu, 19 May 2016 13:44:34 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=OBBjS6r1; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-ig0-x241.google.com (mail-ig0-x241.google.com [IPv6:2607:f8b0:4001:c05::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3r9GzC3L66zDqM1 for ; Thu, 19 May 2016 13:39:51 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=OBBjS6r1; dkim-atps=neutral Received: by mail-ig0-x241.google.com with SMTP id jn6so6360011igb.2 for ; Wed, 18 May 2016 20:39:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ww4t992nFuSTlatvTOWGbUsij8xQgwfrV6cAyvmUFmA=; b=OBBjS6r1fJbSp1m3KXntGjoi7RbhxKXINcLJ/Oozk9ywLO47/8EbSDMaR73fQx+QEJ 2XSFS/S/rFMpGBMwMCHJlrZz9rroGAAHZd7Y3+i1i9rAXJYQAyAG4Qz+eduUpHlgZ4Jz qcV6+AhxPwdf4fv/j8yxTJLsAhlN42jcLGn2N0iWn4V8DvaYtfb4XVFcZ1WxGeO6ogx/ vEqSXjCCbRYRVTeGy8LghqgJ+ECknAXShJ0KB/63e+TIMoLmuGekkRSrzZ2pJTyCfSX5 g76GYjdIHMb0FgDGQ0sgXaIMq1jczSjTsrHhks5eBNy5B/mJEuyw/wIctBzOllX83st6 hqTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ww4t992nFuSTlatvTOWGbUsij8xQgwfrV6cAyvmUFmA=; b=Kz4zklNHwEmwL+IRjTY7rhR6cVsw7ympmtej74aaMBtrHCgzmkZtpKh+504bs1NwBQ 1/Lz6ugYBm2hrkP/kcgrEyBUtL+hjopmVCx8B7HmEMeQa/w+SM/+Sw5bGZ7dQ57KKgui 3Kac8gAoFGtz27prDYpjWM8IKXxK3D/B9FrCQmNA5RebO6/ujQhmtQkvxfufGRwxYi71 h/EfgQXKN95x+vkuiyREAwmgY8Y2jdY3oDvryQL+Kc21a34QoYFHMaitb7NM5x1G2Zn3 ZV+ny2ez097FNSKzbmoWL6qAk6pJYiPIvwLuhacOeHUrwRJNJnL66piPws3N6tc0B/lo 2jng== X-Gm-Message-State: AOPr4FXfRegbSjnvplnchPd4IC5cHvEaoJe++qO5q9KifBavgHjfq5YbGOZro/a8NynCEQ== X-Received: by 10.50.6.15 with SMTP id w15mr1075851igw.91.1463629189298; Wed, 18 May 2016 20:39:49 -0700 (PDT) Received: from localhost ([106.38.0.83]) by smtp.gmail.com with ESMTPSA id 31sm3678237iot.10.2016.05.18.20.39.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 May 2016 20:39:48 -0700 (PDT) From: Boqun Feng To: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 2/4] rcutorture: Use vmlinux as the fallback kernel image Date: Thu, 19 May 2016 11:42:22 +0800 Message-Id: <1463629344-20471-3-git-send-email-boqun.feng@gmail.com> X-Mailer: git-send-email 2.8.0 In-Reply-To: <1463629344-20471-1-git-send-email-boqun.feng@gmail.com> References: <1463629344-20471-1-git-send-email-boqun.feng@gmail.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Boqun Feng , Lai Jiangshan , Josh Triplett , Steven Rostedt , Mathieu Desnoyers , "Paul E. McKenney" MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" vmlinux 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 --- tools/testing/selftests/rcutorture/bin/functions.sh | 10 ++++------ 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 () { # identify_boot_image qemu-cmd # # Returns the relative path to the kernel build image. This will be -# arch//boot/bzImage unless overridden with the TORTURE_BOOT_IMAGE -# environment variable. +# arch//boot/bzImage or vmlinux if bzImage is not a target for the +# architecture, unless overridden with the TORTURE_BOOT_IMAGE environment +# variable. identify_boot_image () { if test -n "$TORTURE_BOOT_IMAGE" then @@ -110,11 +111,8 @@ identify_boot_image () { qemu-system-x86_64|qemu-system-i386) echo arch/x86/boot/bzImage ;; - qemu-system-ppc64) - echo arch/powerpc/boot/bzImage - ;; *) - echo "" + echo vmlinux ;; esac 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 4109f306d855..46cb6bc098bd 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 then # Rerunning previous test, so use that test's kernel. 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/.config $resdir # for kvm-recheck.sh elif kvm-build.sh $config_template $builddir $T @@ -110,7 +111,7 @@ then if test -n "$BOOT_IMAGE" then cp $builddir/$BOOT_IMAGE $resdir - KERNEL=$resdir/bzImage + KERNEL=$resdir/${BOOT_IMAGE##*/} else echo No identifiable boot image, not running KVM, see $resdir. echo Do the torture scripts know about your architecture?