From nobody Fri Dec 19 17:38:08 2025 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=1679064964; cv=none; d=zohomail.com; s=zohoarc; b=j0HE+gGRN5HDWOVQQSlyqXdu/JYovw1INnIASCLEKGCNeLCJ2bbVMDCRPu5vWeXUqqflxl9iarKTJLwb1UPFhGPONS0uAQQFlUeE2lPwfJLNRpYEjIPkj823mxNqarYyag0gRQOLeZiad5+3ZhGvGHph0fD7qIFs/TT8c3YPruU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1679064964; 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=qzjuXwewJnfvIOwRNFQPVrBHUTt5sKUbfnXieSZvQQU=; b=S0tlZ6BXQq1PvZIgmVLXdwR9ma3Aa6wzH1Ui5So+RLaXT4v3c2AJC/iw7nx8GI5P15q6LBuJFsBm9szGIsI9UVd1wygRgxOpvISlMp1U3FgYSGdpCoX3vE+vXPab21OJo3Uh5DCr5WSKIIMrgYDRqLMDm9/IMpUMvNtHxeA8LhQ= 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 1679064964104708.3496314130206; Fri, 17 Mar 2023 07:56:04 -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-627-sScDJleXMr226Sb437e0wg-1; Fri, 17 Mar 2023 10:55:27 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 457D387B2D3; Fri, 17 Mar 2023 14:55:19 +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 258351410F29; Fri, 17 Mar 2023 14:55:19 +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 05DED1946A4D; Fri, 17 Mar 2023 14:55:19 +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 9CCE31946587 for ; Thu, 16 Mar 2023 16:13:23 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 80ADF2166B29; Thu, 16 Mar 2023 16:13:23 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 414C02166B26 for ; Thu, 16 Mar 2023 16:13:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679064963; 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=qzjuXwewJnfvIOwRNFQPVrBHUTt5sKUbfnXieSZvQQU=; b=DQECGgg0W4FWc0vFL8RKYhL3+IlbHRG8PdU52NTgUw4DyhB6lNAtdGROJ1qCCeI3uj4/oQ YDtaLyMl0194CXsb9V9WPpOdRUNuQvvq8xr3m/dBup5iylMhvaN1h+iQ/YVwQT1D++1ISF 3ZNJNW9qev76A6o/A2+0T3fwFvFRlFM= X-MC-Unique: sScDJleXMr226Sb437e0wg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 20/24] qemuxml2(argv|xml): Convert "hvf-x86_64-q35-headless" test case to real capapilities Date: Thu, 16 Mar 2023 17:11:49 +0100 Message-Id: <70bb661db0fd036d58e5ed4c1e7e06d586da9610.1678982996.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 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: 1679064966134100003 Content-Type: text/plain; charset="utf-8" Rather than using fake data and faking the host use the newly introduced support for test variants to test the OSX HVF qemu version with real data. Signed-off-by: Peter Krempa --- .../hvf-x86_64-q35-headless.args | 50 ----------------- ...hvf-x86_64-q35-headless.x86_64-latest.args | 54 +++++++++++++++++++ tests/qemuxml2argvtest.c | 8 +-- ...hvf-x86_64-q35-headless.x86_64-latest.xml} | 3 ++ tests/qemuxml2xmltest.c | 9 +--- 5 files changed, 60 insertions(+), 64 deletions(-) delete mode 100644 tests/qemuxml2argvdata/hvf-x86_64-q35-headless.args create mode 100644 tests/qemuxml2argvdata/hvf-x86_64-q35-headless.x86_64-l= atest.args rename tests/qemuxml2xmloutdata/{hvf-x86_64-q35-headless.xml =3D> hvf-x86_= 64-q35-headless.x86_64-latest.xml} (97%) diff --git a/tests/qemuxml2argvdata/hvf-x86_64-q35-headless.args b/tests/qe= muxml2argvdata/hvf-x86_64-q35-headless.args deleted file mode 100644 index f7f17ea06c..0000000000 --- a/tests/qemuxml2argvdata/hvf-x86_64-q35-headless.args +++ /dev/null @@ -1,50 +0,0 @@ -LC_ALL=3DC \ -PATH=3D/bin \ -HOME=3D/var/lib/libvirt/qemu/domain--1-test \ -USER=3Dtest \ -LOGNAME=3Dtest \ -XDG_DATA_HOME=3D/var/lib/libvirt/qemu/domain--1-test/.local/share \ -XDG_CACHE_HOME=3D/var/lib/libvirt/qemu/domain--1-test/.cache \ -XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-test/.config \ -/usr/bin/qemu-system-x86_64 \ --name guest=3Dtest,debug-threads=3Don \ --S \ --object secret,id=3DmasterKey0,format=3Draw,file=3D/var/lib/libvirt/qemu/d= omain--1-test/master-key.aes \ --machine q35,usb=3Doff,dump-guest-core=3Doff \ --accel hvf \ --m 4096 \ --overcommit mem-lock=3Doff \ --smp 2,sockets=3D2,cores=3D1,threads=3D1 \ --uuid 1b826c23-8767-47ad-a6b5-c83a88277f71 \ --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,driftfix=3Dslew \ --no-hpet \ --no-shutdown \ --boot strict=3Don \ --device pcie-root-port,port=3D8,chassis=3D1,id=3Dpci.1,bus=3Dpcie.0,multif= unction=3Don,addr=3D0x1 \ --device pcie-root-port,port=3D9,chassis=3D2,id=3Dpci.2,bus=3Dpcie.0,addr= =3D0x1.0x1 \ --device pcie-root-port,port=3D10,chassis=3D3,id=3Dpci.3,bus=3Dpcie.0,addr= =3D0x1.0x2 \ --device pcie-root-port,port=3D11,chassis=3D4,id=3Dpci.4,bus=3Dpcie.0,addr= =3D0x1.0x3 \ --device pcie-root-port,port=3D12,chassis=3D5,id=3Dpci.5,bus=3Dpcie.0,addr= =3D0x1.0x4 \ --device pcie-root-port,port=3D13,chassis=3D6,id=3Dpci.6,bus=3Dpcie.0,addr= =3D0x1.0x5 \ --device virtio-serial-pci,id=3Dvirtio-serial0,bus=3Dpci.2,addr=3D0x0 \ --blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/test.qcow2= ","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}'= \ --blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qco= w2","file":"libvirt-1-storage"}' \ --device virtio-blk-pci,bus=3Dpci.3,addr=3D0x0,drive=3Dlibvirt-1-format,id= =3Dvirtio-disk0,bootindex=3D1 \ --netdev user,id=3Dhostnet0 \ --device virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D52:54:00:9a:e6:c6= ,bus=3Dpci.1,addr=3D0x0 \ --chardev pty,id=3Dcharserial0 \ --device isa-serial,chardev=3Dcharserial0,id=3Dserial0,index=3D0 \ --chardev socket,id=3Dcharchannel0,fd=3D1729,server=3Don,wait=3Doff \ --device virtserialport,bus=3Dvirtio-serial0.0,nr=3D1,chardev=3Dcharchannel= 0,id=3Dchannel0,name=3Dorg.qemu.guest_agent.0 \ --audiodev '{"id":"audio1","driver":"none"}' \ --global ICH9-LPC.noreboot=3Doff \ --watchdog-action reset \ --device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.4,addr=3D0x0 \ --object rng-random,id=3Dobjrng0,filename=3D/dev/urandom \ --device virtio-rng-pci,rng=3Dobjrng0,id=3Drng0,bus=3Dpci.5,addr=3D0x0 \ --msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/hvf-x86_64-q35-headless.x86_64-latest.a= rgs b/tests/qemuxml2argvdata/hvf-x86_64-q35-headless.x86_64-latest.args new file mode 100644 index 0000000000..be43b61adf --- /dev/null +++ b/tests/qemuxml2argvdata/hvf-x86_64-q35-headless.x86_64-latest.args @@ -0,0 +1,54 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/var/lib/libvirt/qemu/domain--1-test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/var/lib/libvirt/qemu/domain--1-test/.local/share \ +XDG_CACHE_HOME=3D/var/lib/libvirt/qemu/domain--1-test/.cache \ +XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-test/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3Dtest,debug-threads=3Don \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/va= r/lib/libvirt/qemu/domain--1-test/master-key.aes"}' \ +-machine q35,usb=3Doff,dump-guest-core=3Doff,memory-backend=3Dpc.ram \ +-accel hvf \ +-cpu qemu64 \ +-m 4096 \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":4294967296}= ' \ +-overcommit mem-lock=3Doff \ +-smp 2,sockets=3D2,cores=3D1,threads=3D1 \ +-uuid 1b826c23-8767-47ad-a6b5-c83a88277f71 \ +-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,driftfix=3Dslew \ +-global kvm-pit.lost_tick_policy=3Ddelay \ +-no-hpet \ +-no-shutdown \ +-boot strict=3Don \ +-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus= ":"pcie.0","multifunction":true,"addr":"0x1"}' \ +-device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus= ":"pcie.0","addr":"0x1.0x1"}' \ +-device '{"driver":"pcie-root-port","port":10,"chassis":3,"id":"pci.3","bu= s":"pcie.0","addr":"0x1.0x2"}' \ +-device '{"driver":"pcie-root-port","port":11,"chassis":4,"id":"pci.4","bu= s":"pcie.0","addr":"0x1.0x3"}' \ +-device '{"driver":"pcie-root-port","port":12,"chassis":5,"id":"pci.5","bu= s":"pcie.0","addr":"0x1.0x4"}' \ +-device '{"driver":"pcie-root-port","port":13,"chassis":6,"id":"pci.6","bu= s":"pcie.0","addr":"0x1.0x5"}' \ +-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.2"= ,"addr":"0x0"}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/test.qcow2= ","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}'= \ +-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qco= w2","file":"libvirt-1-storage"}' \ +-device '{"driver":"virtio-blk-pci","bus":"pci.3","addr":"0x0","drive":"li= bvirt-1-format","id":"virtio-disk0","bootindex":1}' \ +-netdev '{"type":"user","id":"hostnet0"}' \ +-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":= "52:54:00:9a:e6:c6","bus":"pci.1","addr":"0x0"}' \ +-chardev pty,id=3Dcharserial0 \ +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","in= dex":0}' \ +-chardev socket,id=3Dcharchannel0,fd=3D1729,server=3Don,wait=3Doff \ +-device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chard= ev":"charchannel0","id":"channel0","name":"org.qemu.guest_agent.0"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=3Doff \ +-watchdog-action reset \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.4","add= r":"0x0"}' \ +-object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"= }' \ +-device '{"driver":"virtio-rng-pci","rng":"objrng0","id":"rng0","bus":"pci= .5","addr":"0x0"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 293aea60d5..404c8db879 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2878,13 +2878,7 @@ mymain(void) DO_TEST_CAPS_LATEST("devices-acpi-index"); - DO_TEST_MACOS("hvf-x86_64-q35-headless", - QEMU_CAPS_VIRTIO_PCI_TRANSITIONAL, - QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, - QEMU_CAPS_DEVICE_VIRTIO_NET, - QEMU_CAPS_DEVICE_ISA_SERIAL, - QEMU_CAPS_DEVICE_VIRTIO_RNG, - QEMU_CAPS_OBJECT_RNG_RANDOM); + DO_TEST_CAPS_ARCH_LATEST_FULL("hvf-x86_64-q35-headless", "x86_64", ARG= _CAPS_VARIANT, "+hvf", ARG_END); DO_TEST_MACOS("hvf-aarch64-virt-headless", QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_VIRTIO_PCI_TRANSITIONAL, diff --git a/tests/qemuxml2xmloutdata/hvf-x86_64-q35-headless.xml b/tests/q= emuxml2xmloutdata/hvf-x86_64-q35-headless.x86_64-latest.xml similarity index 97% rename from tests/qemuxml2xmloutdata/hvf-x86_64-q35-headless.xml rename to tests/qemuxml2xmloutdata/hvf-x86_64-q35-headless.x86_64-latest.xml index d8b8422eaf..384241ac3d 100644 --- a/tests/qemuxml2xmloutdata/hvf-x86_64-q35-headless.xml +++ b/tests/qemuxml2xmloutdata/hvf-x86_64-q35-headless.x86_64-latest.xml @@ -12,6 +12,9 @@ + + qemu64 + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 3d4c038c70..14f1104645 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1289,13 +1289,8 @@ mymain(void) DO_TEST_CAPS_LATEST("devices-acpi-index"); - DO_TEST_MACOS("hvf-x86_64-q35-headless", - QEMU_CAPS_VIRTIO_PCI_TRANSITIONAL, - QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, - QEMU_CAPS_DEVICE_VIRTIO_NET, - QEMU_CAPS_DEVICE_ISA_SERIAL, - QEMU_CAPS_DEVICE_VIRTIO_RNG, - QEMU_CAPS_OBJECT_RNG_RANDOM); + DO_TEST_CAPS_ARCH_LATEST_FULL("hvf-x86_64-q35-headless", "x86_64", ARG= _CAPS_VARIANT, "+hvf", ARG_END); + DO_TEST_MACOS("hvf-aarch64-virt-headless", QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_VIRTIO_PCI_TRANSITIONAL, --=20 2.39.2