From nobody Mon Feb 9 01:48:06 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1641462376; cv=none; d=zohomail.com; s=zohoarc; b=naO5GhXIrtgrqqmPfFV8RMCik+UuKbxWAGOdyxNeC/FwHXxtXpAtkUaO1EUjN9bCt3zkyZ7sJIBzpHiVG2GfpE0uIs/luJ/Ab7aSbo45HQ6IKeOXeOem58F6dFznih8W0et2HkWtdA2kmOeNsZQAUMjakoPmC27/q5K0rlSf4T4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641462376; 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=aCi0KfIhpoo9KyzgY2UJu9sTciuD7RwWxhIJu/CwDng=; b=NafyuFeU4D5RuSvSfV+MiwntEMDyALaRMV420y73nfHUqe54wNPNQ/cXLMp+cy0TxFVm50S//fyTl9P5xU2P8lBJTbKm8wt+fYLTK7K9UeQTIQZA5ht5zAnL4VDTj7EuXerR1/5eiQAUDt7mavYILw5eMxsrKlN/OnJvEDNP5Ng= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1641462376273173.08304768166852; Thu, 6 Jan 2022 01:46:16 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-35-uYxHcNLfMXuu6F9_-FWY3Q-1; Thu, 06 Jan 2022 04:46:11 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 85EE085B691; Thu, 6 Jan 2022 09:46:05 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EE719752D3; Thu, 6 Jan 2022 09:46:04 +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 A91FD4A7CA; Thu, 6 Jan 2022 09:46:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 2069k3rA005794 for ; Thu, 6 Jan 2022 04:46:03 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4A82A7CAD2; Thu, 6 Jan 2022 09:46:03 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 98C487D473 for ; Thu, 6 Jan 2022 09:46:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641462375; 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=aCi0KfIhpoo9KyzgY2UJu9sTciuD7RwWxhIJu/CwDng=; b=aysk1d/GJvSDjzjskQHr/SOiV4SZLt9CMm4vAo/PVQD42pjVcXyYhi7owc1BmFNjRdmusc khEX8wyZ4vKEFmYWaWML7KMP9pK6XNei/Ozp2M/2s+J97iwhKonUF2ydhGgDV0W0LKz6os UKFi0IzyD7S4hU2COEhy/3FBAcxuX38= X-MC-Unique: uYxHcNLfMXuu6F9_-FWY3Q-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 17/21] qemuxml2(xml|argv)test: Test real state of things with 'x86-kvm-32-on-64' Date: Thu, 6 Jan 2022 10:44:16 +0100 Message-Id: <9fbc93f61bce1d51cd45b77d726b7a4e281780ad.1641461748.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com 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.79 on 10.5.11.14 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: 1641462378266100003 Content-Type: text/plain; charset="utf-8" As demonstrated by the qemuxml2xmltest DO_TEST_CAPS_LATEST data based on the 'x86-kvm-32-on-64' test case the post parse CPU selection code which fills in the CPU into the definition does not have exactly the same logic as we used to have when the cpu model was picked when formatting the commandline. Change the qemuxml2argv test to use DO_TEST_CAPS_LATEST too as it doesn't really make sense to test this on fake data. This possibly shows that there's a regression/change in behaviour which happened when the CPU code was changed. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- ...gs =3D> x86-kvm-32-on-64.x86_64-latest.args} | 14 +++++----- tests/qemuxml2argvtest.c | 2 +- .../x86-kvm-32-on-64.x86_64-latest.xml | 27 +++++++++++++++++++ tests/qemuxml2xmltest.c | 2 ++ 4 files changed, 38 insertions(+), 7 deletions(-) rename tests/qemuxml2argvdata/{x86-kvm-32-on-64.args =3D> x86-kvm-32-on-64= .x86_64-latest.args} (53%) create mode 100644 tests/qemuxml2xmloutdata/x86-kvm-32-on-64.x86_64-latest= .xml diff --git a/tests/qemuxml2argvdata/x86-kvm-32-on-64.args b/tests/qemuxml2a= rgvdata/x86-kvm-32-on-64.x86_64-latest.args similarity index 53% rename from tests/qemuxml2argvdata/x86-kvm-32-on-64.args rename to tests/qemuxml2argvdata/x86-kvm-32-on-64.x86_64-latest.args index fdfd506495..fe326b6943 100644 --- a/tests/qemuxml2argvdata/x86-kvm-32-on-64.args +++ b/tests/qemuxml2argvdata/x86-kvm-32-on-64.x86_64-latest.args @@ -6,25 +6,27 @@ LOGNAME=3Dtest \ XDG_DATA_HOME=3D/tmp/lib/domain--1-kvm/.local/share \ XDG_CACHE_HOME=3D/tmp/lib/domain--1-kvm/.cache \ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-kvm/.config \ -QEMU_AUDIO_DRV=3Dnone \ /usr/bin/qemu-system-x86_64 \ -name guest=3Dkvm,debug-threads=3Don \ -S \ --object secret,id=3DmasterKey0,format=3Draw,file=3D/tmp/lib/domain--1-kvm/= master-key.aes \ --machine pc,usb=3Doff,dump-guest-core=3Doff \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tm= p/lib/domain--1-kvm/master-key.aes"}' \ +-machine pc-i440fx-6.2,usb=3Doff,dump-guest-core=3Doff,memory-backend=3Dpc= .ram \ -accel kvm \ --cpu qemu32 \ +-cpu qemu64 \ -m 4096 \ --realtime mlock=3Doff \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":4294967296}= ' \ +-overcommit mem-lock=3Doff \ -smp 1,sockets=3D1,cores=3D1,threads=3D1 \ -uuid d091ea82-29e6-2e34-3005-f02617b36e87 \ -display none \ -no-user-config \ -nodefaults \ --chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-kvm/monitor.soc= k,server=3Don,wait=3Doff \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server=3Don,wait=3Doff \ -mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ -rtc base=3Dutc \ -no-shutdown \ -no-acpi \ -boot strict=3Don \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-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 127f050058..46df0e935e 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1127,7 +1127,7 @@ mymain(void) QEMU_CAPS_MACHINE_VMPORT_OPT); DO_TEST_NOCAPS("default-kvm-host-arch"); DO_TEST_NOCAPS("default-qemu-host-arch"); - DO_TEST_NOCAPS("x86-kvm-32-on-64"); + DO_TEST_CAPS_LATEST("x86-kvm-32-on-64"); DO_TEST_NOCAPS("boot-cdrom"); DO_TEST_NOCAPS("boot-network"); DO_TEST_NOCAPS("boot-floppy"); diff --git a/tests/qemuxml2xmloutdata/x86-kvm-32-on-64.x86_64-latest.xml b/= tests/qemuxml2xmloutdata/x86-kvm-32-on-64.x86_64-latest.xml new file mode 100644 index 0000000000..b51fb18788 --- /dev/null +++ b/tests/qemuxml2xmloutdata/x86-kvm-32-on-64.x86_64-latest.xml @@ -0,0 +1,27 @@ + + kvm + d091ea82-29e6-2e34-3005-f02617b36e87 + 4194304 + 4194304 + 1 + + hvm + + + + qemu64 + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 4ea1ee5e0f..6c4e39ad5f 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1332,6 +1332,8 @@ mymain(void) DO_TEST("riscv64-virt-pci", QEMU_CAPS_OBJECT_GPEX); + DO_TEST_CAPS_LATEST("x86-kvm-32-on-64"); + DO_TEST_CAPS_LATEST("virtio-transitional"); DO_TEST_CAPS_LATEST("virtio-non-transitional"); --=20 2.31.1