From nobody Mon Feb 9 05:19:19 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=1687438970; cv=none; d=zohomail.com; s=zohoarc; b=FWPxymIep08+Uzf3cD1sYUiYDmIX8cgvd8tOWGP6ATGfbgnf/FAXl3rl5105CE4Pj5D8GZK5xqxEayvZVDRaR67PIDDWkixcUA+uDGzHDDJMf0MCVwzd/Fbfwy9dDJLDa2ClcNVcfirYGqV8KpCEgXzZNhpr3T/8JmbAOXuFOfE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1687438970; 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=aWAhjIKJCrKIwKVtVWY67kgWpXO/mrDm55AfdS2T2yE=; b=Kikce2NO0EPVGOhSsBcfAejUQ15FQ9MJtuBRJAOTz48zz/b3qDb2zgkb9ppmHLsWdqOXoh1eZS3syUKCGPh6/qmR79Nm0L19Q5p0KK1bp9c1YB1A5PgR0Dy1SweOzQ7MZNQV6NDFihNppxb9wohYZBkrcYmJHBmrKK6OiwdL1kg= 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 1687438969782185.52550155388428; Thu, 22 Jun 2023 06:02:49 -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-166-K2F_DiYFNs6lGtPCjDLe8g-1; Thu, 22 Jun 2023 09:01:25 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 16A8F38117F2; Thu, 22 Jun 2023 13:00:57 +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 F28232166B32; Thu, 22 Jun 2023 13:00:56 +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 246CB19465B6; Thu, 22 Jun 2023 13:00:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 078F71946587 for ; Thu, 22 Jun 2023 12:58:31 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 02F44C478C6; Thu, 22 Jun 2023 12:58:31 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id 69EB8C1ED97 for ; Thu, 22 Jun 2023 12:58:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687438901; 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=aWAhjIKJCrKIwKVtVWY67kgWpXO/mrDm55AfdS2T2yE=; b=PBGEO1Z/3WLRtyZQYxct+VRKFuSgTlE4W+HefRRrnqu1TeA5KOM2LpRlZZ/pkHlql4/iYi k/fPMAqZil8sWXYhU343AfuiBl7M0OwraoBO/gS1/HgygKqw5mFQKYrSXfLL9/iyFEv0pc eesXROppSR2zTxKL/pkhOJverXFyQqg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687438968; 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=aWAhjIKJCrKIwKVtVWY67kgWpXO/mrDm55AfdS2T2yE=; b=IVHf4doQOpeyV3tUjOergPQ4H/RctI/jgDidjA1N+bIPDROOiqw6dgVpkeLDTuK9m/u0ea cIABidQgPrQPr51/vyn+He3uP0TPX5jnwgdZBCzkqvEZWGjSz/mAZGg0mWETEhWEHHVemN r+F+1qHv24hT2b+s8igDewKEuthMlFk= X-MC-Unique: K2F_DiYFNs6lGtPCjDLe8g-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 4/4] qemuxml2(argv|xml)test: Add case for validating proper DIMM slot validation Date: Thu, 22 Jun 2023 14:58:21 +0200 Message-Id: <4d18e86604c7ed9279651aaf5b91b05d575cbd0f.1687436914.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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 3.1 on 10.11.54.6 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) X-ZM-MESSAGEID: 1687438971124100001 Content-Type: text/plain; charset="utf-8" Add a config where both DIMM and non-DIMM devices are used so that it validates that only DIMMs require memory slots. Signed-off-by: Peter Krempa --- ...memory-hotplug-multiple.x86_64-latest.args | 46 ++++++++++ .../memory-hotplug-multiple.xml | 89 ++++++++++++++++++ tests/qemuxml2argvtest.c | 1 + .../memory-hotplug-multiple.x86_64-latest.xml | 90 +++++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 5 files changed, 227 insertions(+) create mode 100644 tests/qemuxml2argvdata/memory-hotplug-multiple.x86_64-l= atest.args create mode 100644 tests/qemuxml2argvdata/memory-hotplug-multiple.xml create mode 100644 tests/qemuxml2xmloutdata/memory-hotplug-multiple.x86_64= -latest.xml diff --git a/tests/qemuxml2argvdata/memory-hotplug-multiple.x86_64-latest.a= rgs b/tests/qemuxml2argvdata/memory-hotplug-multiple.x86_64-latest.args new file mode 100644 index 0000000000..ad1dad01ac --- /dev/null +++ b/tests/qemuxml2argvdata/memory-hotplug-multiple.x86_64-latest.args @@ -0,0 +1,46 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1 \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/va= r/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=3Doff,dump-guest-core=3Doff,nvdimm=3Don,acpi=3Doff \ +-accel kvm \ +-cpu qemu64 \ +-m size=3D2095104k,slots=3D2,maxmem=3D1099511627776k \ +-overcommit mem-lock=3Doff \ +-smp 2,sockets=3D2,dies=3D1,cores=3D1,threads=3D1 \ +-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":21453864= 96}' \ +-numa node,nodeid=3D0,cpus=3D0-1,memdev=3Dram-node0 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server=3Don,wait=3Doff \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot strict=3Don \ +-device '{"driver":"pci-bridge","chassis_nr":1,"id":"pci.1","bus":"pci.0",= "addr":"0x3"}' \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0= x2"}' \ +-object '{"qom-type":"memory-backend-ram","id":"memdimm1","size":536870912= }' \ +-device '{"driver":"pc-dimm","node":0,"memdev":"memdimm1","id":"dimm1","sl= ot":1}' \ +-object '{"qom-type":"memory-backend-ram","id":"memvirtiomem0","reserve":f= alse,"size":1073741824}' \ +-device '{"driver":"virtio-mem-pci","node":0,"block-size":2097152,"request= ed-size":536870912,"memdev":"memvirtiomem0","id":"virtiomem0","bus":"pci.0"= ,"addr":"0x2"}' \ +-object '{"qom-type":"memory-backend-file","id":"memvirtiomem1","mem-path"= :"/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1","reserve":false,"size":21474= 83648,"host-nodes":[1,2,3],"policy":"bind"}' \ +-device '{"driver":"virtio-mem-pci","node":0,"block-size":2097152,"request= ed-size":1073741824,"memdev":"memvirtiomem1","prealloc":true,"memaddr":5637= 144576,"id":"virtiomem1","bus":"pci.1","addr":"0x1"}' \ +-object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/= tmp/nvdimm","prealloc":true,"size":536870912}' \ +-device '{"driver":"nvdimm","node":0,"memdev":"memnvdimm0","id":"nvdimm0",= "slot":0}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","no= de-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw= ","file":"libvirt-1-storage"}' \ +-device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-form= at","id":"ide0-0-0","bootindex":1}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","add= r":"0x4"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/memory-hotplug-multiple.xml b/tests/qem= uxml2argvdata/memory-hotplug-multiple.xml new file mode 100644 index 0000000000..fe0e238e85 --- /dev/null +++ b/tests/qemuxml2argvdata/memory-hotplug-multiple.xml @@ -0,0 +1,89 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 1099511627776 + 8388608 + 8388608 + 2 + + hvm + + + + qemu64 + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + +
+ + +
+ + +
+ + + + + +
+ + + +