From nobody Wed Nov 5 02:38:59 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 15393917134681016.7383431077369; Fri, 12 Oct 2018 17:48:33 -0700 (PDT) Received: from localhost ([::1]:43212 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gB86R-0006wZ-6U for importer@patchew.org; Fri, 12 Oct 2018 20:48:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39767) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gB7zA-0001zU-O6 for qemu-devel@nongnu.org; Fri, 12 Oct 2018 20:40:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gB7z8-0000X5-V7 for qemu-devel@nongnu.org; Fri, 12 Oct 2018 20:40:52 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:33570) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gB7z8-0000We-On for qemu-devel@nongnu.org; Fri, 12 Oct 2018 20:40:50 -0400 Received: by mail-wr1-x441.google.com with SMTP id e4-v6so15127945wrs.0 for ; Fri, 12 Oct 2018 17:40:50 -0700 (PDT) Received: from x1.local (62.red-88-24-165.staticip.rima-tde.net. [88.24.165.62]) by smtp.gmail.com with ESMTPSA id 140-v6sm4046496wmx.34.2018.10.12.17.40.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Oct 2018 17:40:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=c6jWv9l/XqV+/M4KwyJhECJLwXVN+sEFIFriaWjLRI8=; b=nGOm6aEQ+GCE/w7fg1sbdHoBhaMMHY7PXNyCDg3gxe8J/Y3qiZVQdFRJ3PHnnWRSuz aqPmdFK1xcQAyWTC5aueeWl5mGXDt2MY7Ns9Y87Ux+WVq5WN75b+m8Nx9PrB/okKodN9 +T4DRIWXouMRleTg7Gb2kwQHcxB5dGO8o5UA7ckOBJnWK/1/yDSQRBzLdBhyt1hREHKY kKM3CIDpnkeS3lYz8Swff0Gk88pkjXFwrNI7L3d0oxS25zLLx3xBQFsaa3G98jcS2hHg GIuCawbhApQ3uOlp01rMPjvg1Cq9E81iEqD8iPC4Jb74FY2/JK82VpMJ3/yNGnhlN7RC 0YFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=c6jWv9l/XqV+/M4KwyJhECJLwXVN+sEFIFriaWjLRI8=; b=TLZQttMRvC/UlPMhkBrp6SI8v1QShfBTiMdEOuyM9YkvaQfeySFOGGi4EIPrbBj2ke S/4AmEq2SeDf3gpUDi5eFAOTcxCC9iGfUErIh48oeWqXgh0fVp4OS40JrCPfYXounhow sa7wEBrsKa49R2akYi3jA8+ZC0ZDm7MkM7R2WppF5q3gbI16XL5cgClcQkhNdI7/8BV5 UWEhUJMcg2bq5hGRhwBFIGgIWOWzgilpZ9imWYgyFWxKxAIIncOaR8w1wX2m12xWIS96 olTIYdf52UUfWnUw7Uf+GMsyPV4qhi48Gq/HvKr5THb/vT6gbiLb5jBGHg/KBLNx/Zzq tKMg== X-Gm-Message-State: ABuFfohRvWkV11llugMxAuyVpdrrXgv2YB1F8/uhSLqSsk6XbleHQ4Aq qX36voeL9UWzLYl3Yh3w3Lk= X-Google-Smtp-Source: ACcGV61Rtx+UiRoI+gcdTYxkjuh0z8rIPaYbBvU7Xx/qfi0XaEGxqDv0NDcEa90253ThyzE7d6+3OA== X-Received: by 2002:adf:e512:: with SMTP id j18-v6mr6831343wrm.111.1539391249796; Fri, 12 Oct 2018 17:40:49 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Fam Zheng Date: Sat, 13 Oct 2018 02:40:30 +0200 Message-Id: <20181013004034.6968-6-f4bug@amsat.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181013004034.6968-1-f4bug@amsat.org> References: <20181013004034.6968-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 Subject: [Qemu-devel] [PATCH v3 5/8] 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: Cleber Rosa , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eduardo Habkost , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 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=C3=A9 --- 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 =3D "" # The guest name, to be overridden by subclasses name =3D "#base" + # The guest architecture, to be overridden by subclasses + arch =3D "#arch" def __init__(self, debug=3DFalse, vcpus=3DNone): self._guest =3D None self._tmpdir =3D os.path.realpath(tempfile.mkdtemp(prefix=3D"vm-te= st-", @@ -151,7 +153,7 @@ class BaseVM(object): "-device", "virtio-blk,drive=3Ddrive0,bootindex=3D0"] args +=3D self._data_args + extra_args logging.debug("QEMU args: %s", " ".join(args)) - qemu_bin =3D os.environ.get("QEMU", "qemu-system-x86_64") + qemu_bin =3D os.environ.get("QEMU", "qemu-system-" + self.arch) guest =3D QEMUMachine(binary=3Dqemu_bin, args=3Dargs) 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 =20 class CentosVM(basevm.BaseVM): name =3D "centos" + arch =3D "x86_64" BUILD_SCRIPT =3D """ 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 =20 class FreeBSDVM(basevm.BaseVM): name =3D "freebsd" + arch =3D "x86_64" BUILD_SCRIPT =3D """ 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 =20 class NetBSDVM(basevm.BaseVM): name =3D "netbsd" + arch =3D "x86_64" BUILD_SCRIPT =3D """ 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 =20 class OpenBSDVM(basevm.BaseVM): name =3D "openbsd" + arch =3D "x86_64" BUILD_SCRIPT =3D """ 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 =20 class UbuntuX86VM(basevm.BaseVM): name =3D "ubuntu.i386" + arch =3D "i386" BUILD_SCRIPT =3D """ set -e; cd $(mktemp -d); --=20 2.19.1