From patchwork Fri Oct 26 14:15:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 989581 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42hQzD4nrZz9sLt for ; Sat, 27 Oct 2018 01:16:40 +1100 (AEDT) Received: from localhost ([::1]:60316 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gG2uk-0001yZ-4N for incoming@patchwork.ozlabs.org; Fri, 26 Oct 2018 10:16:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gG2u5-0001wb-SS for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:15:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gG2tz-0005wJ-1M for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:15:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35008) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gG2tu-0005ma-1S for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:15:47 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4C1343B46C; Fri, 26 Oct 2018 14:15:36 +0000 (UTC) Received: from magic.redhat.com (ovpn-116-212.ams2.redhat.com [10.36.116.212]) by smtp.corp.redhat.com (Postfix) with ESMTP id 07F1A60BC2; Fri, 26 Oct 2018 14:15:34 +0000 (UTC) From: Fam Zheng To: qemu-devel@nongnu.org Date: Fri, 26 Oct 2018 22:15:21 +0800 Message-Id: <20181026141529.4305-2-famz@redhat.com> In-Reply-To: <20181026141529.4305-1-famz@redhat.com> References: <20181026141529.4305-1-famz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 26 Oct 2018 14:15:36 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/9] tests: docker: update test-mingw for GTK+ 2.0 removal X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Paolo Bonzini --with-gtkabi does not exist anymore; remove it from the configure invocation. Fixes: 89d85cde75143325205e332dd97bf1bb8402d7c1 Signed-off-by: Paolo Bonzini Message-Id: <1539886203-33670-1-git-send-email-pbonzini@redhat.com> Tested-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Fam Zheng --- tests/docker/test-mingw | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/docker/test-mingw b/tests/docker/test-mingw index 7cca7e16a6..b078f22879 100755 --- a/tests/docker/test-mingw +++ b/tests/docker/test-mingw @@ -28,8 +28,7 @@ for prefix in x86_64-w64-mingw32- i686-w64-mingw32-; do --enable-vnc \ --enable-bzip2 \ --enable-guest-agent \ - --with-sdlabi=2.0 \ - --with-gtkabi=3.0 + --with-sdlabi=2.0 install_qemu make clean From patchwork Fri Oct 26 14:15:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 989586 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42hR341kNVz9sLt for ; Sat, 27 Oct 2018 01:20:00 +1100 (AEDT) Received: from localhost ([::1]:60328 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gG2xx-0004S0-Jj for incoming@patchwork.ozlabs.org; Fri, 26 Oct 2018 10:19:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gG2u7-0001yR-JU for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:16:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gG2u6-00062x-Jm for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:15:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41406) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gG2u6-0005qV-9c for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:15:58 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2AEB088E4A; Fri, 26 Oct 2018 14:15:41 +0000 (UTC) Received: from magic.redhat.com (ovpn-116-212.ams2.redhat.com [10.36.116.212]) by smtp.corp.redhat.com (Postfix) with ESMTP id EA3A5605FA; Fri, 26 Oct 2018 14:15:36 +0000 (UTC) From: Fam Zheng To: qemu-devel@nongnu.org Date: Fri, 26 Oct 2018 22:15:22 +0800 Message-Id: <20181026141529.4305-3-famz@redhat.com> In-Reply-To: <20181026141529.4305-1-famz@redhat.com> References: <20181026141529.4305-1-famz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 26 Oct 2018 14:15:41 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/9] tests/vm: Extract the kvm_available() handy function X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-2-f4bug@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Fam Zheng --- scripts/qemu.py | 4 ++++ tests/vm/basevm.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/qemu.py b/scripts/qemu.py index f099ce7278..9fc0be4828 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py @@ -26,6 +26,10 @@ import tempfile LOG = logging.getLogger(__name__) +def kvm_available(target_arch=None): + return os.access("/dev/kvm", os.R_OK | os.W_OK) + + #: Maps machine types to the preferred console device types CONSOLE_DEV_TYPES = { r'^clipper$': 'isa-serial', diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index cafbc6b3a5..834bc90cc1 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -18,7 +18,7 @@ import logging import time import datetime sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "scripts")) -from qemu import QEMUMachine +from qemu import QEMUMachine, kvm_available import subprocess import hashlib import optparse @@ -72,7 +72,7 @@ class BaseVM(object): "-serial", "file:%s" % os.path.join(self._tmpdir, "serial.out")] if vcpus: self._args += ["-smp", str(vcpus)] - if os.access("/dev/kvm", os.R_OK | os.W_OK): + if kvm_available(): self._args += ["-enable-kvm"] else: logging.info("KVM not available, not using -enable-kvm") From patchwork Fri Oct 26 14:15:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 989582 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42hQzK5RQNz9sLt for ; Sat, 27 Oct 2018 01:16:45 +1100 (AEDT) Received: from localhost ([::1]:60318 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gG2up-00020d-4V for incoming@patchwork.ozlabs.org; Fri, 26 Oct 2018 10:16:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gG2u7-0001yN-Hy for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:16:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gG2u6-00063K-NB for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:15:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57238) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gG2u6-0005tQ-Da for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:15:58 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1D54A96DB; Fri, 26 Oct 2018 14:15:46 +0000 (UTC) Received: from magic.redhat.com (ovpn-116-212.ams2.redhat.com [10.36.116.212]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4370160BD6; Fri, 26 Oct 2018 14:15:41 +0000 (UTC) From: Fam Zheng To: qemu-devel@nongnu.org Date: Fri, 26 Oct 2018 22:15:23 +0800 Message-Id: <20181026141529.4305-4-famz@redhat.com> In-Reply-To: <20181026141529.4305-1-famz@redhat.com> References: <20181026141529.4305-1-famz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 26 Oct 2018 14:15:46 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 3/9] tests/vm: Do not abuse parallelism when KVM is not available X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-3-f4bug@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 834bc90cc1..2bd32dc6ce 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -196,6 +196,13 @@ class BaseVM(object): return self._guest.qmp(*args, **kwargs) def parse_args(vm_name): + + def get_default_jobs(): + if kvm_available(): + return multiprocessing.cpu_count() / 2 + else: + return 1 + parser = optparse.OptionParser( description="VM test utility. Exit codes: " "0 = success, " @@ -208,7 +215,7 @@ def parse_args(vm_name): help="image file name") parser.add_option("--force", "-f", action="store_true", help="force build image even if image exists") - parser.add_option("--jobs", type=int, default=multiprocessing.cpu_count() / 2, + parser.add_option("--jobs", type=int, default=get_default_jobs(), help="number of virtual CPUs") parser.add_option("--verbose", "-V", action="store_true", help="Pass V=1 to builds within the guest") From patchwork Fri Oct 26 14:15:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 989588 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42hR600w95z9sDr for ; Sat, 27 Oct 2018 01:22:32 +1100 (AEDT) Received: from localhost ([::1]:60354 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gG30P-0006k2-Me for incoming@patchwork.ozlabs.org; Fri, 26 Oct 2018 10:22:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gG2u7-0001yM-GO for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:16:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gG2u6-000636-Kd for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:15:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33910) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gG2u6-0005ve-AV for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:15:58 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BDE6B300271C; Fri, 26 Oct 2018 14:15:49 +0000 (UTC) Received: from magic.redhat.com (ovpn-116-212.ams2.redhat.com [10.36.116.212]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4364060BBF; Fri, 26 Oct 2018 14:15:46 +0000 (UTC) From: Fam Zheng To: qemu-devel@nongnu.org Date: Fri, 26 Oct 2018 22:15:24 +0800 Message-Id: <20181026141529.4305-5-famz@redhat.com> In-Reply-To: <20181026141529.4305-1-famz@redhat.com> References: <20181026141529.4305-1-famz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Fri, 26 Oct 2018 14:15:49 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 4/9] tests/vm: Do not use the -smp option with a single cpu X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-4-f4bug@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 2bd32dc6ce..9415e7c33a 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -70,7 +70,7 @@ class BaseVM(object): "-device", "virtio-net-pci,netdev=vnet", "-vnc", "127.0.0.1:0,to=20", "-serial", "file:%s" % os.path.join(self._tmpdir, "serial.out")] - if vcpus: + if vcpus and vcpus > 1: self._args += ["-smp", str(vcpus)] if kvm_available(): self._args += ["-enable-kvm"] From patchwork Fri Oct 26 14:15:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 989585 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42hR312Fw2z9sLt for ; Sat, 27 Oct 2018 01:19:57 +1100 (AEDT) Received: from localhost ([::1]:60327 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gG2xu-0004Q3-Se for incoming@patchwork.ozlabs.org; Fri, 26 Oct 2018 10:19:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gG2u7-0001yJ-Ei for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:16:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gG2u6-00062b-DV for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:15:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46656) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gG2u6-0005yw-6K for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:15:58 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 07B3230BB53D; Fri, 26 Oct 2018 14:15:55 +0000 (UTC) Received: from magic.redhat.com (ovpn-116-212.ams2.redhat.com [10.36.116.212]) by smtp.corp.redhat.com (Postfix) with ESMTP id EB6A2605FA; Fri, 26 Oct 2018 14:15:50 +0000 (UTC) From: Fam Zheng To: qemu-devel@nongnu.org Date: Fri, 26 Oct 2018 22:15:25 +0800 Message-Id: <20181026141529.4305-6-famz@redhat.com> In-Reply-To: <20181026141529.4305-1-famz@redhat.com> References: <20181026141529.4305-1-famz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Fri, 26 Oct 2018 14:15:55 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 5/9] tests/vm: Display remaining seconds to wait for a VM to start X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-5-f4bug@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 9415e7c33a..81a1cb05dd 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -177,11 +177,14 @@ class BaseVM(object): def wait_ssh(self, seconds=300): starttime = datetime.datetime.now() + endtime = starttime + datetime.timedelta(seconds=seconds) guest_up = False - while (datetime.datetime.now() - starttime).total_seconds() < seconds: + while datetime.datetime.now() < endtime: if self.ssh("exit 0") == 0: guest_up = True break + seconds = (endtime - datetime.datetime.now()).total_seconds() + logging.debug("%ds before timeout", seconds) time.sleep(1) if not guest_up: raise Exception("Timeout while waiting for guest ssh") From patchwork Fri Oct 26 14:15:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 989584 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42hR1K2v4Nz9sLt for ; Sat, 27 Oct 2018 01:18:29 +1100 (AEDT) Received: from localhost ([::1]:60323 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gG2wV-00039L-0b for incoming@patchwork.ozlabs.org; Fri, 26 Oct 2018 10:18:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gG2u9-00020A-KU for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:16:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gG2u8-00066D-Qy for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:16:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49976) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gG2u8-00065A-HV for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:16:00 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C599930020CB; Fri, 26 Oct 2018 14:15:59 +0000 (UTC) Received: from magic.redhat.com (ovpn-116-212.ams2.redhat.com [10.36.116.212]) by smtp.corp.redhat.com (Postfix) with ESMTP id D5725605FA; Fri, 26 Oct 2018 14:15:55 +0000 (UTC) From: Fam Zheng To: qemu-devel@nongnu.org Date: Fri, 26 Oct 2018 22:15:26 +0800 Message-Id: <20181026141529.4305-7-famz@redhat.com> In-Reply-To: <20181026141529.4305-1-famz@redhat.com> References: <20181026141529.4305-1-famz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Fri, 26 Oct 2018 14:15:59 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 6/9] tests/vm: Add a BaseVM::arch property X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé The 'arch' property gives a hint on which architecture the guest image runs. This can be use to select the correct QEMU binary path. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-6-f4bug@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 4 +++- tests/vm/centos | 1 + tests/vm/freebsd | 1 + tests/vm/netbsd | 1 + tests/vm/openbsd | 1 + tests/vm/ubuntu.i386 | 1 + 6 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 81a1cb05dd..b2e0de2022 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -42,6 +42,8 @@ class BaseVM(object): BUILD_SCRIPT = "" # The guest name, to be overridden by subclasses name = "#base" + # The guest architecture, to be overridden by subclasses + arch = "#arch" def __init__(self, debug=False, vcpus=None): self._guest = None self._tmpdir = os.path.realpath(tempfile.mkdtemp(prefix="vm-test-", @@ -151,7 +153,7 @@ class BaseVM(object): "-device", "virtio-blk,drive=drive0,bootindex=0"] args += self._data_args + extra_args logging.debug("QEMU args: %s", " ".join(args)) - qemu_bin = os.environ.get("QEMU", "qemu-system-x86_64") + qemu_bin = os.environ.get("QEMU", "qemu-system-" + self.arch) guest = QEMUMachine(binary=qemu_bin, args=args) try: guest.launch() diff --git a/tests/vm/centos b/tests/vm/centos index afd560c564..daa2dbca03 100755 --- a/tests/vm/centos +++ b/tests/vm/centos @@ -19,6 +19,7 @@ import time class CentosVM(basevm.BaseVM): name = "centos" + arch = "x86_64" BUILD_SCRIPT = """ set -e; cd $(mktemp -d); diff --git a/tests/vm/freebsd b/tests/vm/freebsd index b6983127d0..19a3729172 100755 --- a/tests/vm/freebsd +++ b/tests/vm/freebsd @@ -18,6 +18,7 @@ import basevm class FreeBSDVM(basevm.BaseVM): name = "freebsd" + arch = "x86_64" BUILD_SCRIPT = """ set -e; rm -rf /var/tmp/qemu-test.* diff --git a/tests/vm/netbsd b/tests/vm/netbsd index a4e25820d5..fac6a7ce51 100755 --- a/tests/vm/netbsd +++ b/tests/vm/netbsd @@ -18,6 +18,7 @@ import basevm class NetBSDVM(basevm.BaseVM): name = "netbsd" + arch = "x86_64" BUILD_SCRIPT = """ set -e; rm -rf /var/tmp/qemu-test.* diff --git a/tests/vm/openbsd b/tests/vm/openbsd index 52500ee52b..cfe0572c59 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -18,6 +18,7 @@ import basevm class OpenBSDVM(basevm.BaseVM): name = "openbsd" + arch = "x86_64" BUILD_SCRIPT = """ set -e; rm -rf /var/tmp/qemu-test.* diff --git a/tests/vm/ubuntu.i386 b/tests/vm/ubuntu.i386 index 3f6ed48b74..1b7e1ab8f0 100755 --- a/tests/vm/ubuntu.i386 +++ b/tests/vm/ubuntu.i386 @@ -19,6 +19,7 @@ import time class UbuntuX86VM(basevm.BaseVM): name = "ubuntu.i386" + arch = "i386" BUILD_SCRIPT = """ set -e; cd $(mktemp -d); From patchwork Fri Oct 26 14:15:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 989590 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42hR8r4xK8z9sDr for ; Sat, 27 Oct 2018 01:25:00 +1100 (AEDT) Received: from localhost ([::1]:60369 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gG32o-0000zB-6b for incoming@patchwork.ozlabs.org; Fri, 26 Oct 2018 10:24:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gG2uE-00024p-Su for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:16:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gG2uE-0006Bz-1d for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:16:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55102) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gG2uD-0006BA-QA for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:16:05 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1FAE03B3C1; Fri, 26 Oct 2018 14:16:05 +0000 (UTC) Received: from magic.redhat.com (ovpn-116-212.ams2.redhat.com [10.36.116.212]) by smtp.corp.redhat.com (Postfix) with ESMTP id C0B0F60BBE; Fri, 26 Oct 2018 14:16:00 +0000 (UTC) From: Fam Zheng To: qemu-devel@nongnu.org Date: Fri, 26 Oct 2018 22:15:27 +0800 Message-Id: <20181026141529.4305-8-famz@redhat.com> In-Reply-To: <20181026141529.4305-1-famz@redhat.com> References: <20181026141529.4305-1-famz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 26 Oct 2018 14:16:05 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 7/9] tests/vm: Let kvm_available() work in cross environments X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-7-f4bug@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Fam Zheng --- scripts/qemu.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/qemu.py b/scripts/qemu.py index 9fc0be4828..bcd24aad82 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py @@ -27,6 +27,8 @@ LOG = logging.getLogger(__name__) def kvm_available(target_arch=None): + if target_arch and target_arch != os.uname()[4]: + return False return os.access("/dev/kvm", os.R_OK | os.W_OK) From patchwork Fri Oct 26 14:15:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 989591 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42hR8t0Kl2z9sDr for ; Sat, 27 Oct 2018 01:25:02 +1100 (AEDT) Received: from localhost ([::1]:60370 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gG32p-00010i-Kx for incoming@patchwork.ozlabs.org; Fri, 26 Oct 2018 10:24:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gG2uH-00026u-8j for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:16:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gG2uF-0006DD-FV for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:16:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48730) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gG2uF-0006Cn-82 for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:16:07 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 89CE33002893; Fri, 26 Oct 2018 14:16:06 +0000 (UTC) Received: from magic.redhat.com (ovpn-116-212.ams2.redhat.com [10.36.116.212]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6BA0560BD1; Fri, 26 Oct 2018 14:16:05 +0000 (UTC) From: Fam Zheng To: qemu-devel@nongnu.org Date: Fri, 26 Oct 2018 22:15:28 +0800 Message-Id: <20181026141529.4305-9-famz@redhat.com> In-Reply-To: <20181026141529.4305-1-famz@redhat.com> References: <20181026141529.4305-1-famz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Fri, 26 Oct 2018 14:16:06 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 8/9] tests/vm: Do not use -enable-kvm if HOST != TARGET architecture X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-8-f4bug@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index b2e0de2022..9f4794898a 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -74,7 +74,7 @@ class BaseVM(object): "-serial", "file:%s" % os.path.join(self._tmpdir, "serial.out")] if vcpus and vcpus > 1: self._args += ["-smp", str(vcpus)] - if kvm_available(): + if kvm_available(self.arch): self._args += ["-enable-kvm"] else: logging.info("KVM not available, not using -enable-kvm") From patchwork Fri Oct 26 14:15:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 989583 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42hQzp5yRDz9sLt for ; Sat, 27 Oct 2018 01:17:10 +1100 (AEDT) Received: from localhost ([::1]:60319 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gG2vD-0002Dj-SP for incoming@patchwork.ozlabs.org; Fri, 26 Oct 2018 10:17:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gG2uO-0002BR-Qt for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:16:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gG2uK-0006HH-BA for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:16:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41754) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gG2uK-0006GS-5F for qemu-devel@nongnu.org; Fri, 26 Oct 2018 10:16:12 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7396E88E50; Fri, 26 Oct 2018 14:16:11 +0000 (UTC) Received: from magic.redhat.com (ovpn-116-212.ams2.redhat.com [10.36.116.212]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7716E620A0; Fri, 26 Oct 2018 14:16:07 +0000 (UTC) From: Fam Zheng To: qemu-devel@nongnu.org Date: Fri, 26 Oct 2018 22:15:29 +0800 Message-Id: <20181026141529.4305-10-famz@redhat.com> In-Reply-To: <20181026141529.4305-1-famz@redhat.com> References: <20181026141529.4305-1-famz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 26 Oct 2018 14:16:11 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 9/9] tests/vm: Do not abuse parallelism when HOST != TARGET architecture X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-9-f4bug@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 9f4794898a..5caf77d6b8 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -200,10 +200,10 @@ class BaseVM(object): def qmp(self, *args, **kwargs): return self._guest.qmp(*args, **kwargs) -def parse_args(vm_name): +def parse_args(vmcls): def get_default_jobs(): - if kvm_available(): + if kvm_available(vmcls.arch): return multiprocessing.cpu_count() / 2 else: return 1 @@ -216,7 +216,7 @@ def parse_args(vm_name): "3 = test command failed") parser.add_option("--debug", "-D", action="store_true", help="enable debug output") - parser.add_option("--image", "-i", default="%s.img" % vm_name, + parser.add_option("--image", "-i", default="%s.img" % vmcls.name, help="image file name") parser.add_option("--force", "-f", action="store_true", help="force build image even if image exists") @@ -237,7 +237,7 @@ def parse_args(vm_name): def main(vmcls): try: - args, argv = parse_args(vmcls.name) + args, argv = parse_args(vmcls) if not argv and not args.build_qemu and not args.build_image: print("Nothing to do?") return 1