From patchwork Tue Nov 6 16:31:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 10670797 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C833B14E2 for ; Tue, 6 Nov 2018 16:31:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B1BF5289CF for ; Tue, 6 Nov 2018 16:31:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A20D32A2C6; Tue, 6 Nov 2018 16:31:38 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 6DAB5289CF for ; Tue, 6 Nov 2018 16:31:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389244AbeKGB5f (ORCPT ); Tue, 6 Nov 2018 20:57:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50534 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388658AbeKGB5f (ORCPT ); Tue, 6 Nov 2018 20:57:35 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4E0D1307D84A for ; Tue, 6 Nov 2018 16:31:36 +0000 (UTC) Received: from doriath (ovpn-116-86.phx2.redhat.com [10.3.116.86]) by smtp.corp.redhat.com (Postfix) with ESMTP id C0EB65D757; Tue, 6 Nov 2018 16:31:34 +0000 (UTC) Date: Tue, 6 Nov 2018 11:31:33 -0500 From: Luiz Capitulino To: kvm@vger.kernel.org Cc: Paolo Bonzini Subject: [PATCH] kvm-unit-tests: really use QEMU_ACCEL Message-ID: <20181106113133.51542781@doriath> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Tue, 06 Nov 2018 16:31:36 +0000 (UTC) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP According to README.md, users can set QEMU_ACCEL to specify kvm or tcg. However, get_qemu_acceletor() uses ACCEL instead, which is wrong since ACCEL is an "internal" variable. The end result is that tests will still run if the user wants to use kvm but kvm is unavailable. Fix get_qemu_acceletor() to use QEMU_ACCEL. Signed-off-by: Luiz Capitulino --- scripts/arch-run.bash | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash index d3ca19d..0997569 100644 --- a/scripts/arch-run.bash +++ b/scripts/arch-run.bash @@ -317,13 +317,13 @@ kvm_available () get_qemu_accelerator () { - if [ "$ACCEL" = "kvm" ] && ! kvm_available; then + if [ "$QEMU_ACCEL" = "kvm" ] && ! kvm_available; then echo "KVM is needed, but not available on this host" >&2 return 2 fi - if [ "$ACCEL" ]; then - echo $ACCEL + if [ "$QEMU_ACCEL" ]; then + echo $QEMU_ACCEL elif kvm_available; then echo kvm else