From nobody Wed Nov 19 00:14:28 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.48 as permitted sender) client-ip=209.85.221.48; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f48.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.48 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1613325751; cv=none; d=zohomail.com; s=zohoarc; b=lL17dc0qbvsHWGkwxl5jthN6HOoaAl25gmCw9zEBrUWdzin3MHmPoc/mALLNZYauWt/xoNtcEaaQA1/kNjOXIic3shdx3tpsC0qLpDLVY/2ahtppIBowLm07VqtYVg2OrcraewYN8sLgvrnslsTCGG3U1it5JayjMTnC3cRUibE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613325751; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xbl9/61wM37nBJWaz7/wAXPCJcp3ey0kqtBTl5rgBR4=; b=ZqAXOYZnyTil6ObPg3GdNqrkqU79QPV8Avfk22QYca0Nr7BtnQk+RXAADGA3akWgpjAN3MNPheOCcKjwRgJaYkFLqNwYNtse8aCK18etR7ncpy1dy+ks9Jnw765z3M3Cedsz/pvI2Gs3n4XEZs1BLUZ9zJFVhTUwQPMTxy2UXFo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.48 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mx.zohomail.com with SMTPS id 1613325751641655.3712349416659; Sun, 14 Feb 2021 10:02:31 -0800 (PST) Received: by mail-wr1-f48.google.com with SMTP id l12so6152515wry.2 for ; Sun, 14 Feb 2021 10:02:31 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (68.red-83-57-175.dynamicip.rima-tde.net. [83.57.175.68]) by smtp.gmail.com with ESMTPSA id u4sm19386083wrr.37.2021.02.14.10.02.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Feb 2021 10:02:29 -0800 (PST) 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=xbl9/61wM37nBJWaz7/wAXPCJcp3ey0kqtBTl5rgBR4=; b=qGzTr9/PvCuaprwZhrz3F1W4/R4yIE/+GKJtiZD8Y0jeV5DjPHVdPLXMTusB/oiOfl q/FnShDy481dTAftmHSQq3xx9BCgdGge48Ox5TjC1e+1hWdpZaWqTrXCdx8DIrCMMTNG iohrcjua+bm7zkAYSiaBtKEoytBxfg42Ve7w9M+rU3y6XfS2IkIhtYAoupZZDQWK/NwZ +zmahm8vahEDZOGQnbqaKZMdCcEhAXqhBnnUq1JCSbp3mUAZhAViuNfLhY5HH17OvxzI eHn4U6qVvjmwXFQjdneRmmzyUZb5dEtp3PbBP+89AH1ksIMtmeFJ5vKojLnffRFLCaT/ PK+A== 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=xbl9/61wM37nBJWaz7/wAXPCJcp3ey0kqtBTl5rgBR4=; b=W2YS8K4C3INaeOhT2+wJcDZ+sEde/1eJQ2svJaNqKoQaRT40gd+QqgDY0kEBTvmSRe DSHKhLS6FSPgcK5yWa0qEOyfcY9ixDio7K+6n6dYmGb+AIrnx1HH/Ybe9qgJ4p5ZjZQY qoTcLEQdlpFjN+30ffKdp+Oi885EHX0HVrokXPxKFn/xTVkDtg+BH8gMAIVVNM+Ay0JD hWGDzgtxZKCCQhxEK33/Ksw9c2KALc4K4TlQQLfWpIaysi/Cm1UvFF7Ibns081GN6s+A JH+zQXLwlzKP8toQtNsN6776aq3x0dsQ+RbJrB4rkMBQ77COFyAji+OZcPinHRPmx4O/ okaQ== X-Gm-Message-State: AOAM531jtYRu68PctrOD/MjpRy489d38NUWEgS68pmkivdE5nU0l7aEI NYBxwf7mcvq6i+FGvh5jXdE= X-Google-Smtp-Source: ABdhPJwXS2FCGdhgqLXj/yRSvfRTIPhHY70AMqN/giruUifvEZc58fbjyMGJzRAKJeK8aE3JwP2rTw== X-Received: by 2002:a05:6000:143:: with SMTP id r3mr14787333wrx.357.1613325750310; Sun, 14 Feb 2021 10:02:30 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Fredrik Noring , Laurent Vivier , Jiaxun Yang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Maciej W. Rozycki" , Thomas Huth , Aurelien Jarno , Richard Henderson , Aleksandar Rikalo , Cleber Rosa , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta Subject: [RFC PATCH 39/42] tests/acceptance: Make pick_default_qemu_bin() more generic Date: Sun, 14 Feb 2021 18:59:09 +0100 Message-Id: <20210214175912.732946-40-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210214175912.732946-1-f4bug@amsat.org> References: <20210214175912.732946-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 31b7064c0e5..e0067abca61 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -38,7 +38,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. @@ -57,7 +57,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 @@ -155,14 +155,14 @@ def _get_unique_tag_val(self, tag_name): return vals.pop() return None =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: @@ -185,7 +185,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