From nobody Mon Feb 9 19:52:39 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=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 170.10.133.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=1659971741; cv=none; d=zohomail.com; s=zohoarc; b=WgAFTPvIQK4H+4RXgzzGlHOj96EiU65uar7AYPlxCjikWlY1qwpN6zu+xTckEFt1g7Za6ENTRXT9UfsJkYjw+S0cR2aT1bs3hrWPnaqHXBRfRTfW3G6JaFCjiA8WwKaCd+NYoO14R0jOiiiSv65Ftpc27QBv+2PSH6iCN6UXnBk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659971741; 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=HykxrTkSDuk8E5Toh43GHuy6uHbLOXBnTi1N1iTdEBo=; b=g6DsYDNqLMwOAVIR7S/MUWRZqz10G/3Bb7q72qTwiPQW7w725eGishP+469DwZh9juIJGp42IYaEbFXMMMK5q5EctOeBQceGVYa6gypJUbFw2hp8HqT+63nG6CmiNsDZ3U1Q9l8z4SuJxe8M37xoTZRWh77uPXEzeZRXl25MlGg= 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=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: 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 1659971741184108.44766682409227; Mon, 8 Aug 2022 08:15:41 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-620-8C6Xd_fOOV2MIbDrDhtSSg-1; Mon, 08 Aug 2022 11:15:36 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AF66D2919EC4; Mon, 8 Aug 2022 15:15:29 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9C7042026D4C; Mon, 8 Aug 2022 15:15:29 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 75F001946A4F; Mon, 8 Aug 2022 15:15:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 714811946A49 for ; Mon, 8 Aug 2022 15:15:15 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 3EFE72166B29; Mon, 8 Aug 2022 15:15:15 +0000 (UTC) Received: from avogadro.lan (unknown [10.39.192.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id 708B52166B26; Mon, 8 Aug 2022 15:15:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659971740; 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=HykxrTkSDuk8E5Toh43GHuy6uHbLOXBnTi1N1iTdEBo=; b=B0c3pH0OCE9LqGaPShd07MCxkp+jzkjTr8c49COr5sy2R7CcWHa6tGKv9+RulOEc54DiGo jYnGpsYxhaqWjfbyFWFo0QZ6A7oQ1jmIFTVdc31Z0SuVmGewIHuyLJZDaKpZSIB5ke/g04 0+BEpUVIZtMjDQO8fJc77uJXqaTmeKk= X-MC-Unique: 8C6Xd_fOOV2MIbDrDhtSSg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Paolo Bonzini To: libvir-list@redhat.com Subject: [PATCH v2 4/7] tests: convert x86_64 tests to query-cpus-fast Date: Mon, 8 Aug 2022 17:15:05 +0200 Message-Id: <20220808151508.74044-5-pbonzini@redhat.com> In-Reply-To: <20220808151508.74044-1-pbonzini@redhat.com> References: <20220808151508.74044-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pkrempa@redhat.com, phrdina@redhat.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1659971742545100001 Content-Type: text/plain; charset="utf-8" All supported versions of QEMU include the query-cpus-fast QMP command. In preparation for dropping support for the old "query-cpus" commands, convert the JSON output for x86 tests to the new format, and drop the "halted" field from the expected output as it is not available anymore. The CPU properties were obtained from the query-hotpluggable-cpus output in tests/qemumonitorjsondata. CPU, thread_id, and qom_path are renamed respectively to cpu-index, qom-path and thread-id, while nip and halted are removed. Signed-off-by: Paolo Bonzini --- ...json-cpuinfo-x86-basic-pluggable-cpus.json | 65 ++++++++++++------- ...nitorjson-cpuinfo-x86-basic-pluggable.data | 5 -- ...onitorjson-cpuinfo-x86-node-full-cpus.json | 16 ++--- ...qemumonitorjson-cpuinfo-x86-node-full.data | 2 - tests/qemumonitorjsontest.c | 4 +- 5 files changed, 48 insertions(+), 44 deletions(-) diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-basic-pl= uggable-cpus.json b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-b= asic-pluggable-cpus.json index 7a4973195c..c4250dae1d 100644 --- a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-basic-pluggable= -cpus.json +++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-basic-pluggable= -cpus.json @@ -3,47 +3,62 @@ { "arch": "x86", "current": true, - "CPU": 0, - "qom_path": "/machine/unattached/device[0]", - "pc": -2130415978, - "halted": true, - "thread_id": 518291 + "cpu-index": 0, + "props": { + "core-id": 0, + "thread-id": 0, + "socket-id": 0 + }, + "qom-path": "/machine/unattached/device[0]", + "thread-id": 518291 }, { "arch": "x86", "current": false, - "CPU": 1, - "qom_path": "/machine/unattached/device[2]", - "pc": -2130415978, - "halted": true, - "thread_id": 518292 + "cpu-index": 1, + "props": { + "core-id": 1, + "thread-id": 0, + "socket-id": 0 + }, + "qom-path": "/machine/unattached/device[2]", + "thread-id": 518292 }, { "arch": "x86", "current": false, - "CPU": 2, - "qom_path": "/machine/unattached/device[3]", - "pc": -2130415978, - "halted": true, - "thread_id": 518294 + "cpu-index": 2, + "props": { + "core-id": 1, + "thread-id": 1, + "socket-id": 0 + }, + "qom-path": "/machine/unattached/device[3]", + "thread-id": 518294 }, { "arch": "x86", "current": false, - "CPU": 3, - "qom_path": "/machine/unattached/device[4]", - "pc": -2130415978, - "halted": true, - "thread_id": 518295 + "cpu-index": 3, + "props": { + "core-id": 0, + "thread-id": 0, + "socket-id": 1 + }, + "qom-path": "/machine/unattached/device[4]", + "thread-id": 518295 }, { "arch": "x86", "current": false, - "CPU": 4, - "qom_path": "/machine/unattached/device[5]", - "pc": -2130415978, - "halted": true, - "thread_id": 518296 + "cpu-index": 4, + "props": { + "core-id": 0, + "thread-id": 1, + "socket-id": 1 + }, + "qom-path": "/machine/unattached/device[5]", + "thread-id": 518296 } ], "id": "libvirt-22" diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-basic-pl= uggable.data b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-basic-= pluggable.data index 9a1788d947..93cefb9dd2 100644 --- a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-basic-pluggable= .data +++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-basic-pluggable= .data @@ -7,7 +7,6 @@ type=3D'qemu64-x86_64-cpu' qom_path=3D'/machine/unattached/device[0]' topology: socket=3D'0' core=3D'0' thread=3D'0' vcpus=3D'1' - halted [vcpu libvirt-id=3D'1'] online=3Dyes hotpluggable=3Dno @@ -17,7 +16,6 @@ type=3D'qemu64-x86_64-cpu' qom_path=3D'/machine/unattached/device[2]' topology: socket=3D'0' core=3D'0' thread=3D'1' vcpus=3D'1' - halted [vcpu libvirt-id=3D'2'] online=3Dyes hotpluggable=3Dno @@ -27,7 +25,6 @@ type=3D'qemu64-x86_64-cpu' qom_path=3D'/machine/unattached/device[3]' topology: socket=3D'0' core=3D'1' thread=3D'0' vcpus=3D'1' - halted [vcpu libvirt-id=3D'3'] online=3Dyes hotpluggable=3Dno @@ -37,7 +34,6 @@ type=3D'qemu64-x86_64-cpu' qom_path=3D'/machine/unattached/device[4]' topology: socket=3D'0' core=3D'1' thread=3D'1' vcpus=3D'1' - halted [vcpu libvirt-id=3D'4'] online=3Dyes hotpluggable=3Dno @@ -47,7 +43,6 @@ type=3D'qemu64-x86_64-cpu' qom_path=3D'/machine/unattached/device[5]' topology: socket=3D'1' core=3D'0' thread=3D'0' vcpus=3D'1' - halted [vcpu libvirt-id=3D'5'] online=3Dno hotpluggable=3Dyes diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-node-ful= l-cpus.json b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-node-fu= ll-cpus.json index 6b39efa69c..a384512330 100644 --- a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-node-full-cpus.= json +++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-node-full-cpus.= json @@ -9,11 +9,9 @@ "node-id": 0, "socket-id": 0 }, - "CPU": 0, - "qom_path": "/machine/unattached/device[0]", - "pc": 1048956, - "halted": true, - "thread_id": 2033724 + "cpu-index": 0, + "qom-path": "/machine/unattached/device[0]", + "thread-id": 2033724 }, { "arch": "x86", @@ -24,11 +22,9 @@ "node-id": 1, "socket-id": 0 }, - "CPU": 1, - "qom_path": "/machine/unattached/device[2]", - "pc": 1037318, - "halted": true, - "thread_id": 2033725 + "cpu-index": 1, + "qom-path": "/machine/unattached/device[2]", + "thread-id": 2033725 } ], "id": "libvirt-21" diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-node-ful= l.data b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-node-full.da= ta index 0f7dbf1349..070ea084e7 100644 --- a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-node-full.data +++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-node-full.data @@ -7,7 +7,6 @@ type=3D'Broadwell-x86_64-cpu' qom_path=3D'/machine/unattached/device[0]' topology: socket=3D'0' core=3D'0' thread=3D'0' node=3D'0' vcpus=3D'1' - halted [vcpu libvirt-id=3D'1'] online=3Dyes hotpluggable=3Dno @@ -17,7 +16,6 @@ type=3D'Broadwell-x86_64-cpu' qom_path=3D'/machine/unattached/device[2]' topology: socket=3D'0' core=3D'0' thread=3D'1' node=3D'1' vcpus=3D'1' - halted [vcpu libvirt-id=3D'2'] online=3Dno hotpluggable=3Dyes diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 56620f16a6..0001df7bb3 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -3114,9 +3114,9 @@ mymain(void) DO_TEST_CPU_DATA("full"); DO_TEST_CPU_DATA("ecx"); =20 - DO_TEST_CPU_INFO("x86-basic-pluggable", 8); + DO_TEST_CPU_INFO_FAST("x86-basic-pluggable", 8); DO_TEST_CPU_INFO_FAST("x86-full", 11); - DO_TEST_CPU_INFO("x86-node-full", 8); + DO_TEST_CPU_INFO_FAST("x86-node-full", 8); DO_TEST_CPU_INFO_FAST("x86-dies", 16); =20 DO_TEST_CPU_INFO_FAST("ppc64-basic", 24); --=20 2.37.1