From nobody Mon Feb 9 07:23:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@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 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1608049930; cv=none; d=zohomail.com; s=zohoarc; b=Esj/kUz9lP9v33ubhNw0nErSXs3U9SBtrdqwg4KMPW5Dm1XtUEeTjRMkYz4BmdyFvGy11cH8/KLf0Pt/6/RQyyYPQCoJoJfrnMQeKj53hUwGbELmEBhDfrLYMUTv66xSILUopAB3UINYfRvpsebol9anIQC1SIOOAqeAPohGxeY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608049930; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=MCVvu2htwRGSkNnw2hfrg6eJydcnB2nKhGbbwvNj5JY=; b=Jxi47giqEs4+Ny5fxh1mNhBp0q2akO2QbZVEkkgISN4L5Y3njfu3ZdSjj5p4uQdW17RnihPHvYNfGg1tgQKtme1udrvLF4274muccCH1NV0uEp09/m1gteAgUoL7rILH6+JpiGd7Iv/+Xd672AUARYBzhwzFGszmxvULYM3HGgQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1608049930096720.7311304922586; Tue, 15 Dec 2020 08:32:10 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-496-iYBosArNPlKZ5WI-vs1-wQ-1; Tue, 15 Dec 2020 11:25:55 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8A44D1005D7D; Tue, 15 Dec 2020 16:25:41 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 60E6A10023B9; Tue, 15 Dec 2020 16:25:41 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 2C92E4E58F; Tue, 15 Dec 2020 16:25:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0BFGPQgT025661 for ; Tue, 15 Dec 2020 11:25:26 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1E4F75D9E4; Tue, 15 Dec 2020 16:25:26 +0000 (UTC) Received: from work.redhat.com (ovpn-114-20.ams2.redhat.com [10.36.114.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 534985D9D7; Tue, 15 Dec 2020 16:25:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608049627; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=MCVvu2htwRGSkNnw2hfrg6eJydcnB2nKhGbbwvNj5JY=; b=YQjX/KiIoMSXWFt1f188Z4wKgwy55TOqx2lEvR9QpZ/xYCREMFb4egsBJvMKAyLhUXPOwW mx0o16RghaeL15o4fr7cuCDTaTfb159tJmDGalbZi18lThOzkGzxIkBSlNsAZRVuhlYSso 1Uy3ZJoh6e7bp6T13L37tMpzAPz/rtM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608049927; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=MCVvu2htwRGSkNnw2hfrg6eJydcnB2nKhGbbwvNj5JY=; b=iGG2SY49BERFtij97bNgL6nlKRSAfHtcXGYtz3vBbsmqW7Xg4oup1HwqLhiHja2eKGMuLD JwIcSZEH+uhMHabeSXpBzAtuOJYYfM4dIFnxcND9+BEFGHyefvph9yNuwTFFI58iJ0udHc vqKv8HmphHPPWxHAl5ZeVKFsU2YaQRI= X-MC-Unique: iYBosArNPlKZ5WI-vs1-wQ-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 08/29] cpu-gather: Move qemu detection to new script Date: Tue, 15 Dec 2020 17:24:54 +0100 Message-Id: <20201215162515.53742-9-twiederh@redhat.com> In-Reply-To: <20201215162515.53742-1-twiederh@redhat.com> References: <20201215162515.53742-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake --- tests/cputestdata/cpu-gather.py | 17 +++++++++++++++++ tests/cputestdata/cpu-gather.sh | 8 -------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/tests/cputestdata/cpu-gather.py b/tests/cputestdata/cpu-gather= .py index db2348b460..7f9479f78d 100755 --- a/tests/cputestdata/cpu-gather.py +++ b/tests/cputestdata/cpu-gather.py @@ -77,9 +77,25 @@ def main(): metavar=3D"PATH", help=3D"Path to 'cpuid' utility. " "If unset, the first executable 'cpuid' in $PATH is used.") + parser.add_argument( + "--path-to-qemu", + metavar=3D"PATH", + help=3D"Path to qemu. " + "If unset, will try '/usr/bin/qemu-system-x86_64', " + "'/usr/bin/qemu-kvm', and '/usr/libexec/qemu-kvm'.") =20 args =3D parser.parse_args() =20 + if not args.path_to_qemu: + args.path_to_qemu =3D "qemu-system-x86_64" + search =3D [ + "/usr/bin/qemu-system-x86_64", + "/usr/bin/qemu-kvm", + "/usr/libexec/qemu-kvm"] + for f in search: + if os.path.isfile(f): + args.path_to_qemu =3D f + name =3D gather_name(args) print("model name\t: {}".format(name)) =20 @@ -97,6 +113,7 @@ def main(): =20 print(end=3D"", flush=3DTrue) os.environ["CPU_GATHER_PY"] =3D "true" + os.environ["qemu"] =3D args.path_to_qemu subprocess.check_call("./cpu-gather.sh") =20 =20 diff --git a/tests/cputestdata/cpu-gather.sh b/tests/cputestdata/cpu-gather= .sh index 427b81a64b..4b4ac1a47c 100755 --- a/tests/cputestdata/cpu-gather.sh +++ b/tests/cputestdata/cpu-gather.sh @@ -5,14 +5,6 @@ if [ -z "${CPU_GATHER_PY}" ]; then exit 1 fi =20 -qemu=3Dqemu-system-x86_64 -for cmd in /usr/bin/$qemu /usr/bin/qemu-kvm /usr/libexec/qemu-kvm; do - if [[ -x $cmd ]]; then - qemu=3D$cmd - break - fi -done - qom_get() { path=3D'/machine/unattached/device[0]' --=20 2.26.2