From patchwork Thu Mar 29 11:20:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?THVrw6HFoSBEb2t0b3I=?= X-Patchwork-Id: 10315015 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0CFDA60383 for ; Thu, 29 Mar 2018 11:21:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F75B2A245 for ; Thu, 29 Mar 2018 11:21:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 045062A24A; Thu, 29 Mar 2018 11:21:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A4A392A245 for ; Thu, 29 Mar 2018 11:21:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752300AbeC2LVT (ORCPT ); Thu, 29 Mar 2018 07:21:19 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:51416 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752154AbeC2LVS (ORCPT ); Thu, 29 Mar 2018 07:21:18 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 34BF742709F8 for ; Thu, 29 Mar 2018 11:21:18 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 763B7215CDC5; Thu, 29 Mar 2018 11:21:17 +0000 (UTC) From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Doktor?= To: kvm@vger.kernel.org, ldoktor@redhat.com, mreitz@redhat.com, kwolf@redhat.com Subject: [PATCH v2 1/1] qemu-iotests: Use ppc64 qemu_arch on ppc64le host Date: Thu, 29 Mar 2018 13:20:53 +0200 Message-Id: <20180329112053.5399-2-ldoktor@redhat.com> In-Reply-To: <20180329112053.5399-1-ldoktor@redhat.com> References: <20180329112053.5399-1-ldoktor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Thu, 29 Mar 2018 11:21:18 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Thu, 29 Mar 2018 11:21:18 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'ldoktor@redhat.com' RCPT:'' Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The qemu target does not always correspond to the host machine type. For example ppc64le machine target is ppc64. Let's introduce "qemu_arch" variable to store the matching qemu architecture related to the current architecture and use it when auto-detecting the default qemu binary. Signed-off-by: Lukáš Doktor --- tests/qemu-iotests/check | 4 ++-- tests/qemu-iotests/common.config | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index ec8033350d..aa94c6c7ea 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -538,8 +538,8 @@ if [ -z "$QEMU_PROG" ] then if [ -x "$build_iotests/qemu" ]; then export QEMU_PROG="$build_iotests/qemu" - elif [ -x "$build_root/$arch-softmmu/qemu-system-$arch" ]; then - export QEMU_PROG="$build_root/$arch-softmmu/qemu-system-$arch" + elif [ -x "$build_root/${qemu_arch}-softmmu/qemu-system-${qemu_arch}" ]; then + export QEMU_PROG="$build_root/${qemu_arch}-softmmu/qemu-system-${qemu_arch}" else pushd "$build_root" > /dev/null for binary in *-softmmu/qemu-system-* diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config index cdcda54546..102aa6878a 100644 --- a/tests/qemu-iotests/common.config +++ b/tests/qemu-iotests/common.config @@ -23,6 +23,7 @@ PATH=".:$PATH" HOSTOS=`uname -s` arch=`uname -m` +[[ "$arch" =~ "ppc64" ]] && qemu_arch=ppc64 || qemu_arch="$arch" export PWD=`pwd`