From nobody Mon Sep 16 19:11:27 2024 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=1683632827; cv=none; d=zohomail.com; s=zohoarc; b=BorRMNs+jHCY2tRqLeoZG63tAV8YqJcpVRoWprWCxnKaNa3szb3ZxQGKmyj7mAPJY2WlkbM0o4spy6IeyAy45n/W4AjbpQBGO3x2jxqBw+FaO3sObKHLWtHfs3hc9M0NIHZcL4BvzCz30yEoeN8O4kJFYHlkRpCvkBNr+p50otk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683632827; 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=Gfdy9ORyWvnORG7bg++hAKi9CEOGf6QGzDVNmgv2yGA=; b=B9uc3d2gUTKPDOGpC0OlvdqzkUuTT/5f7XKpg9rdjJ/cvWBW1ZjasXChu6581/7zwh+WV/zRR8ZkAHZDUik0oXxQTYktmSFx0obUtEHEJqvvuHpNBDgcPIBiOD2IgTM2H7ayGqkAbTm/oXtZq9zUesSfS+tO5SGopC29Ssqfi6c= 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 1683632827342855.0362311898951; Tue, 9 May 2023 04:47:07 -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-658-xN_U2Y8CNQa-Al3juOGNng-1; Tue, 09 May 2023 07:45:59 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 31569857E64; Tue, 9 May 2023 11:45:56 +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 1F13440C2063; Tue, 9 May 2023 11:45: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 F2BE219466DF; Tue, 9 May 2023 11:45:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 64C2519465BD for ; Tue, 9 May 2023 11:45:50 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 58CDD492C13; Tue, 9 May 2023 11:45:50 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id CED95492B09 for ; Tue, 9 May 2023 11:45:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683632826; 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=Gfdy9ORyWvnORG7bg++hAKi9CEOGf6QGzDVNmgv2yGA=; b=f0W5k4DYo3pF0DtpObnacHb0TU+lH35ZIcZlJyMdchgF9b6UgCGdVH9BzyeaT9+uniIPbe FezjCvW9moRtTBJLqKeavRmNINiTWNgbVISufJ7s3lGACPkZu71E35UkiUmQyHVNkGcOJo lRBMk7Yh3tVZq0UYvyNFU8dwfDezqlE= X-MC-Unique: xN_U2Y8CNQa-Al3juOGNng-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 3/5] qemuxml2(argv|xml)test: Modernize 'sound-device' case Date: Tue, 9 May 2023 13:45:44 +0200 Message-Id: <92cdb4d86fedab76e393a6f8e299b75b315bbb6c.1683632707.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 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.1 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: 1683632828356100001 Content-Type: text/plain; charset="utf-8" Drop the unnecessary disk definition and use x86_64 emulator. For 'qemuxml2argvtest' replace the fake-caps invocation by a 4.2.0 version-locked invocation and add a '_CAPS_LATEST' invocation. For 'qemuxml2xmltest' convert to use '_CAPS_LATEST' only. There are no sound-device relevant changes in the output files. Signed-off-by: Peter Krempa --- ...ce.args =3D> sound-device.x86_64-4.2.0.args} | 11 ++-- .../sound-device.x86_64-latest.args | 50 +++++++++++++++++++ tests/qemuxml2argvdata/sound-device.xml | 10 +--- tests/qemuxml2argvtest.c | 7 +-- ...ice.xml =3D> sound-device.x86_64-latest.xml} | 15 +++--- tests/qemuxml2xmltest.c | 7 +-- 6 files changed, 66 insertions(+), 34 deletions(-) rename tests/qemuxml2argvdata/{sound-device.args =3D> sound-device.x86_64-= 4.2.0.args} (82%) create mode 100644 tests/qemuxml2argvdata/sound-device.x86_64-latest.args rename tests/qemuxml2xmloutdata/{sound-device.xml =3D> sound-device.x86_64= -latest.xml} (83%) diff --git a/tests/qemuxml2argvdata/sound-device.args b/tests/qemuxml2argvd= ata/sound-device.x86_64-4.2.0.args similarity index 82% rename from tests/qemuxml2argvdata/sound-device.args rename to tests/qemuxml2argvdata/sound-device.x86_64-4.2.0.args index 0a9a3e5ddb..121b37ff99 100644 --- a/tests/qemuxml2argvdata/sound-device.args +++ b/tests/qemuxml2argvdata/sound-device.x86_64-4.2.0.args @@ -6,12 +6,13 @@ 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-i386 \ +/usr/bin/qemu-system-x86_64 \ -name guest=3DQEMUGuest1,debug-threads=3Don \ -S \ -object secret,id=3DmasterKey0,format=3Draw,file=3D/var/lib/libvirt/qemu/d= omain--1-QEMUGuest1/master-key.aes \ --machine pc,usb=3Doff,dump-guest-core=3Doff \ +-machine pc-i440fx-4.2,usb=3Doff,dump-guest-core=3Doff \ -accel tcg \ +-cpu qemu64 \ -m 214 \ -overcommit mem-lock=3Doff \ -smp 1,sockets=3D1,cores=3D1,threads=3D1 \ @@ -25,10 +26,7 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGu= est1/.config \ -no-shutdown \ -no-acpi \ -boot strict=3Don \ --usb \ --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 ide-hd,bus=3Dide.0,unit=3D0,drive=3Dlibvirt-1-format,id=3Dide0-0-0= ,bootindex=3D1 \ +-device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 \ -audiodev '{"id":"audio1","driver":"none"}' \ -soundhw pcspk \ -device ES1370,id=3Dsound1,audiodev=3Daudio1,bus=3Dpci.0,addr=3D0x2 \ @@ -48,4 +46,5 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGue= st1/.config \ -device hda-output,id=3Dsound7-codec2,bus=3Dsound7.0,cad=3D2,audiodev=3Dau= dio1 \ -device usb-audio,id=3Dsound8,audiodev=3Daudio1,bus=3Dusb.0,port=3D1 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x8 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/sound-device.x86_64-latest.args b/tests= /qemuxml2argvdata/sound-device.x86_64-latest.args new file mode 100644 index 0000000000..3132760fe0 --- /dev/null +++ b/tests/qemuxml2argvdata/sound-device.x86_64-latest.args @@ -0,0 +1,50 @@ +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,memory-backend=3Dpc.ram,acpi= =3Doff \ +-accel tcg \ +-cpu qemu64 \ +-m 214 \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}'= \ +-overcommit mem-lock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-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":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0= x2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-soundhw pcspk \ +-device '{"driver":"ES1370","id":"sound1","audiodev":"audio1","bus":"pci.0= ","addr":"0x2"}' \ +-device '{"driver":"sb16","id":"sound2","audiodev":"audio1"}' \ +-device '{"driver":"AC97","id":"sound3","audiodev":"audio1","bus":"pci.0",= "addr":"0x3"}' \ +-device '{"driver":"intel-hda","id":"sound4","bus":"pci.0","addr":"0x4"}' \ +-device '{"driver":"hda-duplex","id":"sound4-codec0","bus":"sound4.0","cad= ":0,"audiodev":"audio1"}' \ +-device '{"driver":"intel-hda","id":"sound5","bus":"pci.0","addr":"0x5"}' \ +-device '{"driver":"hda-micro","id":"sound5-codec0","bus":"sound5.0","cad"= :0,"audiodev":"audio1"}' \ +-device '{"driver":"hda-duplex","id":"sound5-codec1","bus":"sound5.0","cad= ":1,"audiodev":"audio1"}' \ +-device '{"driver":"hda-output","id":"sound5-codec2","bus":"sound5.0","cad= ":2,"audiodev":"audio1"}' \ +-device '{"driver":"ich9-intel-hda","id":"sound6","bus":"pci.0","addr":"0x= 6"}' \ +-device '{"driver":"hda-duplex","id":"sound6-codec0","bus":"sound6.0","cad= ":0,"audiodev":"audio1"}' \ +-device '{"driver":"ich9-intel-hda","id":"sound7","bus":"pci.0","addr":"0x= 7"}' \ +-device '{"driver":"hda-micro","id":"sound7-codec0","bus":"sound7.0","cad"= :0,"audiodev":"audio1"}' \ +-device '{"driver":"hda-duplex","id":"sound7-codec1","bus":"sound7.0","cad= ":1,"audiodev":"audio1"}' \ +-device '{"driver":"hda-output","id":"sound7-codec2","bus":"sound7.0","cad= ":2,"audiodev":"audio1"}' \ +-device '{"driver":"usb-audio","id":"sound8","audiodev":"audio1","bus":"us= b.0","port":"1"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","add= r":"0x8"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/sound-device.xml b/tests/qemuxml2argvda= ta/sound-device.xml index b9427f880a..35a60da197 100644 --- a/tests/qemuxml2argvdata/sound-device.xml +++ b/tests/qemuxml2argvdata/sound-device.xml @@ -5,20 +5,14 @@ 219100 1 - hvm - + hvm destroy restart destroy - /usr/bin/qemu-system-i386 - - - -
- + /usr/bin/qemu-system-x86_64 diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 755e8fd664..3100078b54 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1691,11 +1691,8 @@ mymain(void) QEMU_CAPS_VIRTIO_BALLOON_AUTODEFLATE); DO_TEST_NOCAPS("balloon-device-auto"); DO_TEST_NOCAPS("balloon-device-period"); - DO_TEST("sound-device", - QEMU_CAPS_HDA_DUPLEX, QEMU_CAPS_HDA_MICRO, - QEMU_CAPS_HDA_OUTPUT, - QEMU_CAPS_DEVICE_ICH9_INTEL_HDA, - QEMU_CAPS_OBJECT_USB_AUDIO); + DO_TEST_CAPS_VER("sound-device", "4.2.0"); + DO_TEST_CAPS_LATEST("sound-device"); DO_TEST_CAPS_LATEST("fs9p"); DO_TEST_CAPS_ARCH_LATEST("fs9p-ccw", "s390x"); diff --git a/tests/qemuxml2xmloutdata/sound-device.xml b/tests/qemuxml2xmlo= utdata/sound-device.x86_64-latest.xml similarity index 83% rename from tests/qemuxml2xmloutdata/sound-device.xml rename to tests/qemuxml2xmloutdata/sound-device.x86_64-latest.xml index 87d9a5524c..89f537bb01 100644 --- a/tests/qemuxml2xmloutdata/sound-device.xml +++ b/tests/qemuxml2xmloutdata/sound-device.x86_64-latest.xml @@ -5,22 +5,19 @@ 219100 1 - hvm + hvm + + qemu64 + destroy restart destroy - /usr/bin/qemu-system-i386 - - - - -
- - + /usr/bin/qemu-system-x86_64 +
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 8e9da95efb..93202e8e18 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -449,12 +449,7 @@ mymain(void) DO_TEST("net-hostdev-vfio", QEMU_CAPS_DEVICE_VFIO_PCI); DO_TEST_NOCAPS("net-midonet"); DO_TEST_NOCAPS("net-openvswitch"); - DO_TEST("sound-device", - QEMU_CAPS_DEVICE_ICH9_INTEL_HDA, - QEMU_CAPS_OBJECT_USB_AUDIO, - QEMU_CAPS_HDA_MICRO, - QEMU_CAPS_HDA_DUPLEX, - QEMU_CAPS_HDA_OUTPUT); + DO_TEST_CAPS_LATEST("sound-device"); DO_TEST_NOCAPS("watchdog"); DO_TEST_CAPS_LATEST("watchdog-q35-multiple"); DO_TEST("net-bandwidth", QEMU_CAPS_DEVICE_VGA, QEMU_CAPS_VNC); --=20 2.40.0