From nobody Mon Feb 9 22:20:07 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1636388287; cv=none; d=zohomail.com; s=zohoarc; b=URtv9xH2dS40iImo4iYLUwf64Y/5uIkX1i7Gt1cU+zczF/VCsurHsnDQAKcTDPg0bVDjrgvXNdtCFm4ryn7JMJNAJI5f/Nd87Y+ZuVe222okmwv6vSx6c49whtOaAdbT1ChvEVJ7N+QoAtoosrd3bK44qB5Cyroo+etjR6W3KOE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1636388287; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=y6zrXawNuyqiVyJ30mXD2GbOXw3akV02RKQxe7ID2q4=; b=g5VCSe/bPBDBHy0Djg9G1leACrJcHklnz3PlvBnq5WwIVX4xReaCsFiS60MrtHydDyc4qBgSUALiJetpIgxzniHYTU9xGw+CdS9zVhudF47QIkPU9n7MYtnxfPpyVGfbPMXVa6qtxJ/5hurEwjGIwMlN9rZSqXXwP/X9T4TWLdY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1636388287707218.82828168961566; Mon, 8 Nov 2021 08:18:07 -0800 (PST) Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-322-H1kVlhjLOVWwPIDn1rBEFw-1; Mon, 08 Nov 2021 11:18:05 -0500 Received: by mail-wm1-f69.google.com with SMTP id v10-20020a1cf70a000000b00318203a6bd1so66227wmh.6 for ; Mon, 08 Nov 2021 08:18:05 -0800 (PST) Return-Path: Return-Path: Received: from x1w.. (46.red-193-152-127.dynamicip.rima-tde.net. [193.152.127.46]) by smtp.gmail.com with ESMTPSA id n7sm17009343wra.37.2021.11.08.08.18.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Nov 2021 08:18:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636388286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=y6zrXawNuyqiVyJ30mXD2GbOXw3akV02RKQxe7ID2q4=; b=ULRu3RLIB2lj6g+YFsiqJGzPLzxtmiUJy4fs4KqDqbeGfVSGcn+mMEjl4cEqiVBGKxfjE3 2RWDGOFuBNjusuD33R3T59r0YclaVi7HNURw1KG5coIGVzN7Ghg/12tBnuJGqvfjqGln6l G4By6aacnNRjopYhPzee+XJXh2A7u88= X-MC-Unique: H1kVlhjLOVWwPIDn1rBEFw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=y6zrXawNuyqiVyJ30mXD2GbOXw3akV02RKQxe7ID2q4=; b=Ca0n4DZBGeiWDFlKqHr4uIPwAhe0/PMal7cmJxjGjK3yVjSrWYULj9b9dHblzWFrBL wqcW05RIakO3NFr65YsEwO8bxrZBVuxdcTmRqk/Mjx0OdRxawUVTps/rV7bL478pvPxe A09ciI/DtmFCdMF0+5pmVc2zCU0sQ3NmHZ8NLheoCPFlj8pDZPqqo6sRe5UxsMjWm1Ys Lrj44T9Ery22Q6+c4ogymCFgC6rPlBJkfbMDcyIOS+qmEHTBKkGNMaIYET5CrizqxAor 7Re0p56Azzg+d9zyWym1SDo4J1CF45yn9r/go4zDuWTGhKprIulRsyGCrnZ1ihBN/OiB KI3Q== X-Gm-Message-State: AOAM533qTnY5WECa+KVUSoDb/FyMPX73gKR0H0/adCfD22GCtBDbTep4 RnsK9XzqDbRPwnf3Ea8sDxNZ65i4evlgDwqOLtOTSEYKJzA1TE2AQe9Wro2oj+lxCMYdzmhaHBt JvzQz/KGC5Z+tsA== X-Received: by 2002:a5d:6151:: with SMTP id y17mr345717wrt.275.1636388283880; Mon, 08 Nov 2021 08:18:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJzEeKeZb3TcTYwVYViy2tBtU5eKsZUrCow4QVSzJ4P+3w6Vg1LbbaMc1xXq44U2KKNspGctUQ== X-Received: by 2002:a5d:6151:: with SMTP id y17mr345694wrt.275.1636388283726; Mon, 08 Nov 2021 08:18:03 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , Wainer dos Santos Moschetta , Willian Rampazzo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 4/9] tests/avocado: Make pick_default_qemu_bin() more generic Date: Mon, 8 Nov 2021 17:17:34 +0100 Message-Id: <20211108161739.1371503-5-philmd@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211108161739.1371503-1-philmd@redhat.com> References: <20211108161739.1371503-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1636388289197100001 From: Philippe Mathieu-Daud=C3=A9 Make pick_default_qemu_bin() generic to find qemu-system or qemu-user binaries. Reviewed-by: Willian Rampazzo Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20211105143416.148332-3-f4bug@amsat.org> --- tests/avocado/avocado_qemu/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado= _qemu/__init__.py index a495e106d03..984c554e7d6 100644 --- a/tests/avocado/avocado_qemu/__init__.py +++ b/tests/avocado/avocado_qemu/__init__.py @@ -45,7 +45,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_prefix=3D'qemu-system-', arch=3DNone): """ Picks the path of a QEMU binary, starting either in the current working directory or in the source tree root directory. @@ -64,7 +64,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_prefix + arch) if is_readable_executable_file(qemu_bin_relative_path): return qemu_bin_relative_path =20 @@ -179,14 +179,14 @@ def _get_unique_tag_val(self, tag_name): return vals.pop() return None =20 - def setUp(self): + def setUp(self, bin_prefix): self.arch =3D self.params.get('arch', default=3Dself._get_unique_tag_val('ar= ch')) =20 self.cpu =3D self.params.get('cpu', default=3Dself._get_unique_tag_val('cpu= ')) =20 - default_qemu_bin =3D pick_default_qemu_bin(arch=3Dself.arch) + default_qemu_bin =3D pick_default_qemu_bin(bin_prefix, arch=3Dself= .arch) self.qemu_bin =3D self.params.get('qemu_bin', default=3Ddefault_qemu_bin) if self.qemu_bin is None: @@ -214,7 +214,7 @@ class Test(QemuBaseTest): def setUp(self): self._vms =3D {} =20 - super().setUp() + super().setUp('qemu-system-') =20 self.machine =3D self.params.get('machine', default=3Dself._get_unique_tag_val(= 'machine')) --=20 2.31.1