From nobody Thu May 16 02:43:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1584368273; cv=none; d=zohomail.com; s=zohoarc; b=Mm7830nvsEe/zElg8TtDhZIoURNlBuIE60R4iC/OLS7fALalB1dg7ybajprmpNh0IhEsqQsN8zyFlhnw5iyCptyhJvqG9hVrTjJotQol1AcCh+4RxbxkWa9bnPgY8icTe2iRgrODnY8FtVQUMdApcoYw2uMqa2h+zcH7AyJF6XA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584368273; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=/vxkV2Te8iGjgNy+cJ8kGOruGpellTdHd7q7m0cCP78=; b=VgcgX6KzcotoRPlrt7E64XL7d17tEYfNMOL6k/IN6pqDV754zSRsGdv1/XyJ62atZerWwRH7uL56AGX9qBpZJDWmy6HGjfyq6YvosVf1gmlYpSlamMMjCdpBgC6gtHNlBEDJmkHpXdbsyST7qO4TWP/C4pZ1XEtL0CFWtJS6Lwo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1584368273986599.6672320468739; Mon, 16 Mar 2020 07:17:53 -0700 (PDT) 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-191-916JvxJNNPKeKQ3-c8Jffg-1; Mon, 16 Mar 2020 10:17:50 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4575A19067E7; Mon, 16 Mar 2020 14:17:43 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5AE4628984; Mon, 16 Mar 2020 14:17: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 AC89A18095FF; Mon, 16 Mar 2020 14:17:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02GEHYhq018284 for ; Mon, 16 Mar 2020 10:17:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1F8B496F97; Mon, 16 Mar 2020 14:17:34 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.36.112.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id CE66A96FA9; Mon, 16 Mar 2020 14:17:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584368272; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=/vxkV2Te8iGjgNy+cJ8kGOruGpellTdHd7q7m0cCP78=; b=TiLBw/d2S3a1G6+Uw9OowzbNGGQDimRrus8YvAE6ktvrqKm6c0zKomOBUYtRqxvi7o9SXz 9fWSWlI9x6c5yvRk7xGsX374cT4Kjk4Gm70kM1mJORl7/tc3PzdDqJ+hhtxt3v/E7Dkk91 bOgzsIIn+QXoaSr6AJVguunc6nooO+o= X-MC-Unique: 916JvxJNNPKeKQ3-c8Jffg-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH] tests: validate parsing of CPUs with dies > 1 Date: Mon, 16 Mar 2020 14:16:52 +0000 Message-Id: <20200316141652.1686526-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Peter Krempa 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.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Add sample data files for validating handling of a QEMU guest started with: -smp 7,maxcpus=3D16,sockets=3D2,dies=3D2,cores=3D2,threads=3D2 Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- ...qemumonitorjson-cpuinfo-x86-dies-cpus.json | 95 ++++++++++ ...umonitorjson-cpuinfo-x86-dies-hotplug.json | 171 ++++++++++++++++++ .../qemumonitorjson-cpuinfo-x86-dies.data | 108 +++++++++++ tests/qemumonitorjsontest.c | 1 + 4 files changed, 375 insertions(+) create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-d= ies-cpus.json create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-d= ies-hotplug.json create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-d= ies.data diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-dies-cpu= s.json b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-dies-cpus.js= on new file mode 100644 index 0000000000..f90e4ba175 --- /dev/null +++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-dies-cpus.json @@ -0,0 +1,95 @@ +{ + "return": [ + { + "arch": "x86", + "thread-id": 1538346, + "props": { + "core-id": 0, + "thread-id": 0, + "die-id": 0, + "socket-id": 0 + }, + "qom-path": "/machine/unattached/device[0]", + "cpu-index": 0, + "target": "x86_64" + }, + { + "arch": "x86", + "thread-id": 1538347, + "props": { + "core-id": 0, + "thread-id": 1, + "die-id": 0, + "socket-id": 0 + }, + "qom-path": "/machine/unattached/device[2]", + "cpu-index": 1, + "target": "x86_64" + }, + { + "arch": "x86", + "thread-id": 1538348, + "props": { + "core-id": 1, + "thread-id": 0, + "die-id": 0, + "socket-id": 0 + }, + "qom-path": "/machine/unattached/device[3]", + "cpu-index": 2, + "target": "x86_64" + }, + { + "arch": "x86", + "thread-id": 1538349, + "props": { + "core-id": 1, + "thread-id": 1, + "die-id": 0, + "socket-id": 0 + }, + "qom-path": "/machine/unattached/device[4]", + "cpu-index": 3, + "target": "x86_64" + }, + { + "arch": "x86", + "thread-id": 1538350, + "props": { + "core-id": 0, + "thread-id": 0, + "die-id": 1, + "socket-id": 0 + }, + "qom-path": "/machine/unattached/device[5]", + "cpu-index": 4, + "target": "x86_64" + }, + { + "arch": "x86", + "thread-id": 1538351, + "props": { + "core-id": 0, + "thread-id": 1, + "die-id": 1, + "socket-id": 0 + }, + "qom-path": "/machine/unattached/device[6]", + "cpu-index": 5, + "target": "x86_64" + }, + { + "arch": "x86", + "thread-id": 1538352, + "props": { + "core-id": 1, + "thread-id": 0, + "die-id": 1, + "socket-id": 0 + }, + "qom-path": "/machine/unattached/device[7]", + "cpu-index": 6, + "target": "x86_64" + } + ] +} diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-dies-hot= plug.json b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-dies-hotp= lug.json new file mode 100644 index 0000000000..294f470b91 --- /dev/null +++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-dies-hotplug.js= on @@ -0,0 +1,171 @@ +{ + "return": [ + { + "props": { + "core-id": 1, + "thread-id": 1, + "die-id": 1, + "socket-id": 1 + }, + "vcpus-count": 1, + "type": "host-x86_64-cpu" + }, + { + "props": { + "core-id": 1, + "thread-id": 0, + "die-id": 1, + "socket-id": 1 + }, + "vcpus-count": 1, + "type": "host-x86_64-cpu" + }, + { + "props": { + "core-id": 0, + "thread-id": 1, + "die-id": 1, + "socket-id": 1 + }, + "vcpus-count": 1, + "type": "host-x86_64-cpu" + }, + { + "props": { + "core-id": 0, + "thread-id": 0, + "die-id": 1, + "socket-id": 1 + }, + "vcpus-count": 1, + "type": "host-x86_64-cpu" + }, + { + "props": { + "core-id": 1, + "thread-id": 1, + "die-id": 0, + "socket-id": 1 + }, + "vcpus-count": 1, + "type": "host-x86_64-cpu" + }, + { + "props": { + "core-id": 1, + "thread-id": 0, + "die-id": 0, + "socket-id": 1 + }, + "vcpus-count": 1, + "type": "host-x86_64-cpu" + }, + { + "props": { + "core-id": 0, + "thread-id": 1, + "die-id": 0, + "socket-id": 1 + }, + "vcpus-count": 1, + "type": "host-x86_64-cpu" + }, + { + "props": { + "core-id": 0, + "thread-id": 0, + "die-id": 0, + "socket-id": 1 + }, + "vcpus-count": 1, + "type": "host-x86_64-cpu" + }, + { + "props": { + "core-id": 1, + "thread-id": 1, + "die-id": 1, + "socket-id": 0 + }, + "vcpus-count": 1, + "type": "host-x86_64-cpu" + }, + { + "props": { + "core-id": 1, + "thread-id": 0, + "die-id": 1, + "socket-id": 0 + }, + "vcpus-count": 1, + "qom-path": "/machine/unattached/device[7]", + "type": "host-x86_64-cpu" + }, + { + "props": { + "core-id": 0, + "thread-id": 1, + "die-id": 1, + "socket-id": 0 + }, + "vcpus-count": 1, + "qom-path": "/machine/unattached/device[6]", + "type": "host-x86_64-cpu" + }, + { + "props": { + "core-id": 0, + "thread-id": 0, + "die-id": 1, + "socket-id": 0 + }, + "vcpus-count": 1, + "qom-path": "/machine/unattached/device[5]", + "type": "host-x86_64-cpu" + }, + { + "props": { + "core-id": 1, + "thread-id": 1, + "die-id": 0, + "socket-id": 0 + }, + "vcpus-count": 1, + "qom-path": "/machine/unattached/device[4]", + "type": "host-x86_64-cpu" + }, + { + "props": { + "core-id": 1, + "thread-id": 0, + "die-id": 0, + "socket-id": 0 + }, + "vcpus-count": 1, + "qom-path": "/machine/unattached/device[3]", + "type": "host-x86_64-cpu" + }, + { + "props": { + "core-id": 0, + "thread-id": 1, + "die-id": 0, + "socket-id": 0 + }, + "vcpus-count": 1, + "qom-path": "/machine/unattached/device[2]", + "type": "host-x86_64-cpu" + }, + { + "props": { + "core-id": 0, + "thread-id": 0, + "die-id": 0, + "socket-id": 0 + }, + "vcpus-count": 1, + "qom-path": "/machine/unattached/device[0]", + "type": "host-x86_64-cpu" + } + ] +} diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-dies.dat= a b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-dies.data new file mode 100644 index 0000000000..9dfca1e625 --- /dev/null +++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-dies.data @@ -0,0 +1,108 @@ +[vcpu libvirt-id=3D'0'] + online=3Dyes + hotpluggable=3Dno + thread-id=3D'1538346' + enable-id=3D'1' + query-cpus-id=3D'0' + type=3D'host-x86_64-cpu' + qom_path=3D'/machine/unattached/device[0]' + topology: socket=3D'0' core=3D'0' thread=3D'0' vcpus=3D'1' +[vcpu libvirt-id=3D'1'] + online=3Dyes + hotpluggable=3Dno + thread-id=3D'1538347' + enable-id=3D'2' + query-cpus-id=3D'1' + type=3D'host-x86_64-cpu' + qom_path=3D'/machine/unattached/device[2]' + topology: socket=3D'0' core=3D'0' thread=3D'1' vcpus=3D'1' +[vcpu libvirt-id=3D'2'] + online=3Dyes + hotpluggable=3Dno + thread-id=3D'1538348' + enable-id=3D'3' + query-cpus-id=3D'2' + type=3D'host-x86_64-cpu' + qom_path=3D'/machine/unattached/device[3]' + topology: socket=3D'0' core=3D'1' thread=3D'0' vcpus=3D'1' +[vcpu libvirt-id=3D'3'] + online=3Dyes + hotpluggable=3Dno + thread-id=3D'1538349' + enable-id=3D'4' + query-cpus-id=3D'3' + type=3D'host-x86_64-cpu' + qom_path=3D'/machine/unattached/device[4]' + topology: socket=3D'0' core=3D'1' thread=3D'1' vcpus=3D'1' +[vcpu libvirt-id=3D'4'] + online=3Dyes + hotpluggable=3Dno + thread-id=3D'1538350' + enable-id=3D'5' + query-cpus-id=3D'4' + type=3D'host-x86_64-cpu' + qom_path=3D'/machine/unattached/device[5]' + topology: socket=3D'0' core=3D'0' thread=3D'0' vcpus=3D'1' +[vcpu libvirt-id=3D'5'] + online=3Dyes + hotpluggable=3Dno + thread-id=3D'1538351' + enable-id=3D'6' + query-cpus-id=3D'5' + type=3D'host-x86_64-cpu' + qom_path=3D'/machine/unattached/device[6]' + topology: socket=3D'0' core=3D'0' thread=3D'1' vcpus=3D'1' +[vcpu libvirt-id=3D'6'] + online=3Dyes + hotpluggable=3Dno + thread-id=3D'1538352' + enable-id=3D'7' + query-cpus-id=3D'6' + type=3D'host-x86_64-cpu' + qom_path=3D'/machine/unattached/device[7]' + topology: socket=3D'0' core=3D'1' thread=3D'0' vcpus=3D'1' +[vcpu libvirt-id=3D'7'] + online=3Dno + hotpluggable=3Dyes + type=3D'host-x86_64-cpu' + topology: socket=3D'0' core=3D'1' thread=3D'1' vcpus=3D'1' +[vcpu libvirt-id=3D'8'] + online=3Dno + hotpluggable=3Dyes + type=3D'host-x86_64-cpu' + topology: socket=3D'1' core=3D'0' thread=3D'0' vcpus=3D'1' +[vcpu libvirt-id=3D'9'] + online=3Dno + hotpluggable=3Dyes + type=3D'host-x86_64-cpu' + topology: socket=3D'1' core=3D'0' thread=3D'1' vcpus=3D'1' +[vcpu libvirt-id=3D'10'] + online=3Dno + hotpluggable=3Dyes + type=3D'host-x86_64-cpu' + topology: socket=3D'1' core=3D'1' thread=3D'0' vcpus=3D'1' +[vcpu libvirt-id=3D'11'] + online=3Dno + hotpluggable=3Dyes + type=3D'host-x86_64-cpu' + topology: socket=3D'1' core=3D'1' thread=3D'1' vcpus=3D'1' +[vcpu libvirt-id=3D'12'] + online=3Dno + hotpluggable=3Dyes + type=3D'host-x86_64-cpu' + topology: socket=3D'1' core=3D'0' thread=3D'0' vcpus=3D'1' +[vcpu libvirt-id=3D'13'] + online=3Dno + hotpluggable=3Dyes + type=3D'host-x86_64-cpu' + topology: socket=3D'1' core=3D'0' thread=3D'1' vcpus=3D'1' +[vcpu libvirt-id=3D'14'] + online=3Dno + hotpluggable=3Dyes + type=3D'host-x86_64-cpu' + topology: socket=3D'1' core=3D'1' thread=3D'0' vcpus=3D'1' +[vcpu libvirt-id=3D'15'] + online=3Dno + hotpluggable=3Dyes + type=3D'host-x86_64-cpu' + topology: socket=3D'1' core=3D'1' thread=3D'1' vcpus=3D'1' diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 0a6760a794..ba60a97e7c 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -3235,6 +3235,7 @@ mymain(void) DO_TEST_CPU_INFO("x86-full", 11); DO_TEST_CPU_INFO("x86-node-full", 8); DO_TEST_CPU_INFO_FAST("x86-full-fast", 11); + DO_TEST_CPU_INFO_FAST("x86-dies", 16); =20 DO_TEST_CPU_INFO("ppc64-basic", 24); DO_TEST_CPU_INFO("ppc64-hotplug-1", 24); --=20 2.24.1