From nobody Tue Feb 10 15:45:05 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.49 as permitted sender) client-ip=209.85.128.49; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f49.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.49 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1615849732; cv=none; d=zohomail.com; s=zohoarc; b=Tn6kxQAppRqbhdUCb6Bfdibh1f2AxTj6Hk51HVON4Xop038PZz9heJt1ccuUQA4pYsQtFeKW6L6DTNC5mJ2HnKpLoVIuX+uKzjXujqyu6lm1iXrmg5LVx4OLI0/PCX3w07z9iYr7BhtQK+vwSqHz0fh63CtCSWUrq4qiTOJEhcI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615849732; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=4tUMWakslWwBjVs/0HfBBNZUO07+acnd7bqh9wtAzCw=; b=Ty9+CtPav0oir4ZmmCrhqFsxCxWYYCiM1gnz/DkiyuW+zDOGMgyOn77Tqv2gVhMt6Cz15Ek4SuyXTVoIxRJ8JBr8rJ+XPVy812S6BObBCt+1/hbJKlQx/s+6c0F8elOEaxdpDSg+vG4e9nAHUei1Sd0b5HEAQc4QFxmLNUQtxEo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.49 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mx.zohomail.com with SMTPS id 1615849732825475.8321961054713; Mon, 15 Mar 2021 16:08:52 -0700 (PDT) Received: by mail-wm1-f49.google.com with SMTP id r10-20020a05600c35cab029010c946c95easo392794wmq.4 for ; Mon, 15 Mar 2021 16:08:52 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (17.red-88-21-201.staticip.rima-tde.net. [88.21.201.17]) by smtp.gmail.com with ESMTPSA id r11sm20380080wrm.26.2021.03.15.16.08.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 16:08:50 -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=4tUMWakslWwBjVs/0HfBBNZUO07+acnd7bqh9wtAzCw=; b=Pfp4mXSB6BRs6AyUQcrqNueIcckZSnAqKC6YhbHReVFjWbLSlYTTgLFw3UqpVZqofJ 9fQwxPAfZv2vp73qHoqQwx1FfWB6Ph1m05Hd/LE4hNzFpWmUTViP1m4eo0OTNPZUmiNC FQ9AZde3MVcT8z1Yc+KrGDawf7OnLF640Q9VcKIm2y8G53jpQpAqG4q81ZhtyEl0odDO wpABsIoRO6plAQ9ryRWMgszHPhv7IvfXzE5eO5VauiMf5BsS4FTZN5TCC1eF/Lex0qfq rjTQrc9AZ0QHUO3XjxFyWlTPyTIipSlZccZbXbwHr0NVYDeQONlj6/DfF2xyQN8P3Vii Cmng== 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=4tUMWakslWwBjVs/0HfBBNZUO07+acnd7bqh9wtAzCw=; b=sph2uTY3Wgvpxqm2S4VlfKZm7kA0P2GOQP8Ej3Qhd33IriqypvU+KH/0AGKClKt4Ft OQPZLu7/mynHk7YwdWQgigsQ66M7rvJ43tFtfYQjBMSiOftxiW6bEoIxbxdlr56dq4bA FhGYxzkQwRQxq+Xjb0DTqsQCAXnVLKmltdaU3/2ARhvhSe05iuDM4qKjM/EB8heX6pJL 3b3OkXgx2F8Cjwj5Cvb2YrntkPIHUaAZ1L+rHPIQjVmcNdSG/QZsCcG6mHvOhSxO3sjr 3JLXxfjmT+azVnOb/d9nuCKr45StQhCZgbwPDdG1xub5ouPF75ThyQr9FI9oareBcPqy zgLg== X-Gm-Message-State: AOAM5307sgIYkwPwyXjN5kWshKcndne+ChQCy1lTfK2Qd2guRJIVduTz M+UUrqciGp1zWkSLLAjFSIs= X-Google-Smtp-Source: ABdhPJwdtclBfiy7VjSzlPh5aFxVBpqF8KAyTx6Geszb6/CHdKeZ/m4+P27DNdagmYJgGXaXcMC1Vw== X-Received: by 2002:a1c:7407:: with SMTP id p7mr1774110wmc.51.1615849731136; Mon, 15 Mar 2021 16:08:51 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Willian Rampazzo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 2/5] tests/acceptance: Make pick_default_qemu_bin() more generic Date: Tue, 16 Mar 2021 00:08:35 +0100 Message-Id: <20210315230838.2973103-3-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210315230838.2973103-1-f4bug@amsat.org> References: <20210315230838.2973103-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) Make pick_default_qemu_bin() generic to find qemu-system or qemu-user binaries. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/avocado_qemu/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_qemu/__init__.py index 4f814047176..08b3fa1124f 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -48,7 +48,7 @@ def is_readable_executable_file(path): return os.path.isfile(path) and os.access(path, os.R_OK | os.X_OK) =20 =20 -def pick_default_qemu_bin(arch=3DNone): +def pick_default_qemu_bin(bin_fmt, arch=3DNone): """ Picks the path of a QEMU binary, starting either in the current working directory or in the source tree root directory. @@ -67,7 +67,7 @@ def pick_default_qemu_bin(arch=3DNone): # qemu binary path does not match arch for powerpc, handle it if 'ppc64le' in arch: arch =3D 'ppc64' - qemu_bin_relative_path =3D "./qemu-system-%s" % arch + qemu_bin_relative_path =3D os.path.join(".", bin_fmt % arch) if is_readable_executable_file(qemu_bin_relative_path): return qemu_bin_relative_path =20 @@ -187,14 +187,14 @@ def require_accelerator(self, accelerator): self.cancel("%s accelerator does not seem to be " "available" % accelerator) =20 - def setUp(self): + def setUp(self, bin_fmt): self.arch =3D self.params.get('arch', default=3Dself._get_unique_tag_val('ar= ch')) =20 self.machine =3D self.params.get('machine', default=3Dself._get_unique_tag_val(= 'machine')) =20 - default_qemu_bin =3D pick_default_qemu_bin(arch=3Dself.arch) + default_qemu_bin =3D pick_default_qemu_bin(bin_fmt, arch=3Dself.ar= ch) self.qemu_bin =3D self.params.get('qemu_bin', default=3Ddefault_qemu_bin) if self.qemu_bin is None: @@ -217,7 +217,7 @@ def fetch_asset(self, name, class Test(QemuBaseTest): def setUp(self): self._vms =3D {} - super(Test, self).setUp() + super(Test, self).setUp("qemu-system-%s") =20 def _new_vm(self, *args): self._sd =3D tempfile.TemporaryDirectory(prefix=3D"avo_qemu_sock_") --=20 2.26.2