From nobody Thu Mar 28 16:46:28 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=1652453057; cv=none; d=zohomail.com; s=zohoarc; b=CQLlUD4mXuPP4mr96Wd/RNR+yrgdXHOMtltbrTjjBKT0Z+JaIqnrNrqG5owHeU1vF+1jyO7MvVaODY+yueZS5AS2fDBbePseRD+1w+fvk/npBblnjDbV3DSslZPPSdZLi8Ao9SvUvA5oncpVQyBxJI3emMfvrmiTQSOJlYmfvPU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652453057; 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=gB7l09gmfEhqpUsHfiQchBsDQWzWbJP8w+Jl3NWiTP4=; b=J/mYKiypYduSfc/YxZnAfqvdlNxX2BY485k4EjETqJ7r+0pYcMq+e6+LEsPRJOcCPRr/iM4X0sTVlbPmQkRUOlagr2vYlUbwGJT98OlzFrIsdd3t1W0PeEOJAeT5bIGeceaM7qkS+FIQlHxjAl0H/frH7rXhxOmLofKRqAEzET0= 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 1652453057497377.3222048630787; Fri, 13 May 2022 07:44:17 -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-170-CDnNlOLpP3yvLDbI_WeAig-1; Fri, 13 May 2022 10:44:13 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 22BC218019E7; Fri, 13 May 2022 14:44:11 +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 CCFFC416156; Fri, 13 May 2022 14:44:10 +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 82E561932207; Fri, 13 May 2022 14:44:10 +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 75949193222E for ; Fri, 13 May 2022 14:44:09 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 65611C27E84; Fri, 13 May 2022 14:44:09 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.192.172]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C7731C1914E for ; Fri, 13 May 2022 14:44:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652453056; 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=gB7l09gmfEhqpUsHfiQchBsDQWzWbJP8w+Jl3NWiTP4=; b=Eo/HURnxc9FnA7/VpE3ewqQTfAfwbCehD7cGwJ5tUjYDZ1+JP+z6Dc18hqAnOdqWCQrjKJ 2BIiEHmwvtJV5NPKm21Yiw93OxKQHouLNfbHiYes8/XnivkjOUHeHRA8VKkdQM3lYwekh4 sMGlWKS9JQz3Pb2oWzWfyabB5q29dh8= X-MC-Unique: CDnNlOLpP3yvLDbI_WeAig-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 1/3] tests: Update smm=on test Date: Fri, 13 May 2022 16:44:03 +0200 Message-Id: <20220513144405.864210-2-abologna@redhat.com> In-Reply-To: <20220513144405.864210-1-abologna@redhat.com> References: <20220513144405.864210-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 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 2.85 on 10.11.54.10 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1652453060273100005 Content-Type: text/plain; charset="utf-8" Use DO_TEST_CAPS_LATEST() instead of hardcoding capabilities and add the xml2xml part, which was missing; finally, rename it to accomodate the complementary smm=3Doff test that we're about to introduce. Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- ...args =3D> machine-smm-on.x86_64-latest.args} | 16 ++++++---------- tests/qemuxml2argvdata/machine-smm-on.xml | 17 +++++++++++++++++ tests/qemuxml2argvtest.c | 7 +------ .../machine-smm-on.x86_64-latest.xml} | 19 ++++++++++++------- tests/qemuxml2xmltest.c | 1 + 5 files changed, 37 insertions(+), 23 deletions(-) rename tests/qemuxml2argvdata/{machine-smm-opt.args =3D> machine-smm-on.x8= 6_64-latest.args} (52%) create mode 100644 tests/qemuxml2argvdata/machine-smm-on.xml rename tests/{qemuxml2argvdata/machine-smm-opt.xml =3D> qemuxml2xmloutdata= /machine-smm-on.x86_64-latest.xml} (53%) diff --git a/tests/qemuxml2argvdata/machine-smm-opt.args b/tests/qemuxml2ar= gvdata/machine-smm-on.x86_64-latest.args similarity index 52% rename from tests/qemuxml2argvdata/machine-smm-opt.args rename to tests/qemuxml2argvdata/machine-smm-on.x86_64-latest.args index 39fb447320..6fde375523 100644 --- a/tests/qemuxml2argvdata/machine-smm-opt.args +++ b/tests/qemuxml2argvdata/machine-smm-on.x86_64-latest.args @@ -6,14 +6,15 @@ LOGNAME=3Dtest \ XDG_DATA_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.local/share \ XDG_CACHE_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.cache \ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -QEMU_AUDIO_DRV=3Dnone \ /usr/bin/qemu-system-x86_64 \ -name guest=3DQEMUGuest1,debug-threads=3Don \ -S \ --object secret,id=3DmasterKey0,format=3Draw,file=3D/tmp/lib/domain--1-QEMU= Guest1/master-key.aes \ --machine q35,usb=3Doff,smm=3Don,dump-guest-core=3Doff \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tm= p/lib/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine q35,usb=3Doff,smm=3Don,dump-guest-core=3Doff,memory-backend=3Dpc.= ram \ -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 \ @@ -26,11 +27,6 @@ QEMU_AUDIO_DRV=3Dnone \ -no-shutdown \ -no-acpi \ -boot strict=3Don \ --device i82801b11-bridge,id=3Dpci.1,bus=3Dpcie.0,addr=3D0x1e \ --device pci-bridge,chassis_nr=3D2,id=3Dpci.2,bus=3Dpci.1,addr=3D0x0 \ --device ioh3420,port=3D8,chassis=3D3,id=3Dpci.3,bus=3Dpcie.0,addr=3D0x1 \ --device virtio-scsi-pci,id=3Dscsi0,bus=3Dpci.2,addr=3D0x1 \ --drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-scs= i0-0-0-0 \ --device scsi-hd,bus=3Dscsi0.0,channel=3D0,scsi-id=3D0,lun=3D0,drive=3Ddriv= e-scsi0-0-0-0,id=3Dscsi0-0-0-0,bootindex=3D1 \ --device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.2,addr=3D0x2 \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/machine-smm-on.xml b/tests/qemuxml2argv= data/machine-smm-on.xml new file mode 100644 index 0000000000..e24608343a --- /dev/null +++ b/tests/qemuxml2argvdata/machine-smm-on.xml @@ -0,0 +1,17 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 1 + + hvm + + + + + + /usr/bin/qemu-system-x86_64 + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 829550fbfe..c0c18ef1dc 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1061,12 +1061,7 @@ mymain(void) driver.config->dumpGuestCore =3D true; DO_TEST_NOCAPS("machine-core-off"); driver.config->dumpGuestCore =3D false; - DO_TEST("machine-smm-opt", - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_ICH9_AHCI, - QEMU_CAPS_VIRTIO_SCSI); + DO_TEST_CAPS_LATEST("machine-smm-on"); DO_TEST("machine-vmport-opt", QEMU_CAPS_MACHINE_VMPORT_OPT); DO_TEST_NOCAPS("default-kvm-host-arch"); diff --git a/tests/qemuxml2argvdata/machine-smm-opt.xml b/tests/qemuxml2xml= outdata/machine-smm-on.x86_64-latest.xml similarity index 53% rename from tests/qemuxml2argvdata/machine-smm-opt.xml rename to tests/qemuxml2xmloutdata/machine-smm-on.x86_64-latest.xml index 053bb5c25f..7c7df9e06d 100644 --- a/tests/qemuxml2argvdata/machine-smm-opt.xml +++ b/tests/qemuxml2xmloutdata/machine-smm-on.x86_64-latest.xml @@ -11,18 +11,23 @@ + + qemu64 + destroy restart destroy /usr/bin/qemu-system-x86_64 - - - -
- - - + + +
+ + + + +