From nobody Tue Feb 10 02:50:02 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=1659963992; cv=none; d=zohomail.com; s=zohoarc; b=WlURHfRxgayVEvXmqqZ0KxtubwelABJiDpVH08QIkqHiSZqbNCWM+KlAm8b9I2q6LeGNKcm9Q5lMXNTWNb1vV/HOM98vBgwzRjezjhs1xiGZBOz07I2zUNoMFaPopqodpCD0cETOy8a1Rk1dZIByAuRzEAPrcQkPTrcWUX7l8ZE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659963992; h=Content-Type:Content-Transfer-Encoding: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=F2KvWfbCFWdfXmtI2nWIFkafY4SLXRS/9VXXdon5jOL+qSp46SBexbhKfkt0M5pkNGVQ7hTN3gKW0AyHh4BerqjxwlCTxvw5je7zgM/GL3HelrtIcFCfTGbji4pugNhcnPuST99nH4iYCL3z2vi+nWD4ohGbgsn/fvE9RTln+50= 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 1659963992062141.8186083266413; Mon, 8 Aug 2022 06:06:32 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-590-XYp4RlYFNsasAKL_Iu8KFA-1; Mon, 08 Aug 2022 09:06:28 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 40C73811766; Mon, 8 Aug 2022 13:06:23 +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 2EB61492CA2; Mon, 8 Aug 2022 13:06:23 +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 0BEC21946A4F; Mon, 8 Aug 2022 13:06:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 36CA91946A49 for ; Mon, 8 Aug 2022 13:06:22 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 2A2564010D27; Mon, 8 Aug 2022 13:06:22 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 26D47404D883 for ; Mon, 8 Aug 2022 13:06:22 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0E1BE811E84 for ; Mon, 8 Aug 2022 13:06:22 +0000 (UTC) Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-300-yvG3n5UxPqOcWsBR1EJ-ug-1; Mon, 08 Aug 2022 09:06:19 -0400 Received: by mail-ej1-f71.google.com with SMTP id sc31-20020a1709078a1f00b0073096c2b4e1so2387679ejc.22 for ; Mon, 08 Aug 2022 06:06:19 -0700 (PDT) Received: from goa-sendmail ([93.56.169.144]) by smtp.gmail.com with ESMTPSA id h7-20020aa7c607000000b0043d7ff1e3bcsm4611648edq.72.2022.08.08.06.06.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Aug 2022 06:06:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659963990; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=b/g2bIMQ0ILkEZCBlAE+YC5IaJnJqNdxorpBI+ObYlmiFIPzid8Uvf9Xr5MyeBcQXPxzZA XGDeLkBwfoQNm1knbyMQZclBwm72tAkoinqVDV7RHd+zGF7Kle78Pb1Ot0IJWevQY0Pelw zylxTZJJOPwgC9V+FVLodtXA+/1xq54= X-MC-Unique: XYp4RlYFNsasAKL_Iu8KFA-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: yvG3n5UxPqOcWsBR1EJ-ug-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc; bh=HykxrTkSDuk8E5Toh43GHuy6uHbLOXBnTi1N1iTdEBo=; b=WKmE/VxUWuNZZa2vb++56SHUtvnvPStSFhJnAim5oOwozylSbRO9N92kKkcIHDyELv UzQt/kav6GBr4rJ6dkdzwQJ/tlddf3UIdSyEStffJyh1Dr8iimvR6VpF3vQGbyDyocRY F/z9TrSWvuoC/BIGcKcq8fkzXXC+KZcx3UZANzOnbc09Mapkzj6SwUUC3ulntRmCutTo hs87JY6Qqaxm7lE+gYv30jTVTdKxq92XxGBeWPMwWHpHnUwsMdeAsan0yvuoJOhhlPVF CKNmCX2bedDfUpCViduNnNJ72g8ogNN43bY76kfGxh2xnSYrPsxAcxwdAYuMYx8jVsNZ I3jQ== X-Gm-Message-State: ACgBeo1PwgqxI0vvFI+SFPN2sFszu/McPf/aVSPP8EEyL0OryBwi4KTt llZYHZXO13RxEhaEmy51AOtoKOEOH4IRFic+9RKo1HO7EByJreetqZ4Z6vXNVPBu1OzXTK0/lxY EOL1+ZEhTYk10K8g6r9LKfNhWMRzFduvJu8SHYjcMUToT3Idj5gROuFZ7Q8/6WRxDED3QY+g= X-Received: by 2002:a05:6402:2b8d:b0:43a:5410:a9fc with SMTP id fj13-20020a0564022b8d00b0043a5410a9fcmr18187860edb.99.1659963978290; Mon, 08 Aug 2022 06:06:18 -0700 (PDT) X-Google-Smtp-Source: AA6agR7jABxnvXKoazTWIAPck1guQAu47dbZ5uedk7t95SXqvOgRjMoWQv5FjJ6U4gkfv0KSYFOd2w== X-Received: by 2002:a05:6402:2b8d:b0:43a:5410:a9fc with SMTP id fj13-20020a0564022b8d00b0043a5410a9fcmr18187838edb.99.1659963977923; Mon, 08 Aug 2022 06:06:17 -0700 (PDT) From: Paolo Bonzini To: libvir-list@redhat.com Subject: [PATCH 4/7] tests: convert x86_64 tests to query-cpus-fast Date: Mon, 8 Aug 2022 15:06:05 +0200 Message-Id: <20220808130608.61257-5-pbonzini@redhat.com> In-Reply-To: <20220808130608.61257-1-pbonzini@redhat.com> References: <20220808130608.61257-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 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: 1659963992962100005 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