From nobody Sun Dec 22 06:02:20 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1706127204007189.7978885772992; Wed, 24 Jan 2024 12:13:24 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 6584F1A80; Wed, 24 Jan 2024 15:13:22 -0500 (EST) Received: from lists.libvirt.org.85.43.8.in-addr.arpa (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id A93F11A7B; Wed, 24 Jan 2024 14:40:49 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id A5E0D191D; Wed, 24 Jan 2024 14:38:14 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id EA37218DD for ; Wed, 24 Jan 2024 14:38:02 -0500 (EST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-314-EDrTTdjLNLO6KIM84Undmw-1; Wed, 24 Jan 2024 14:38:00 -0500 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9826E8350E3 for ; Wed, 24 Jan 2024 19:38:00 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.45.226.130]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F40BB492BC6 for ; Wed, 24 Jan 2024 19:37:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 X-MC-Unique: EDrTTdjLNLO6KIM84Undmw-1 From: Andrea Bolognani To: devel@lists.libvirt.org Subject: [PATCH 06/33] tests: Add minimal cases for many architectures Date: Wed, 24 Jan 2024 20:37:26 +0100 Message-ID: <20240124193753.1265454-7-abologna@redhat.com> In-Reply-To: <20240124193753.1265454-1-abologna@redhat.com> References: <20240124193753.1265454-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: R4TPMHTGEQDAM3QKAU2KYROXIHFXQWB7 X-Message-ID-Hash: R4TPMHTGEQDAM3QKAU2KYROXIHFXQWB7 X-MailFrom: abologna@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8"; x-default="true" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1706127205531100001 We currently have a single test case called "minimal", which suffers from two big flaws: * it's limited to the x86_64/pc machine type; * it explicitly enables a number of devices. Add several test cases, one for each of the architectures and machine types that we have good support for. Unlike the existing one, they're *really* minimal: no devices or controllers at all are present in the input XML. So the new test cases demonstrate exactly what devices and controller libvirt will decide to add automatically. Note that we use the ABI_UPDATE variant of the test macros because, in some cases, the behavior for new guests is not the same as that for existing ones due to backward compatibility concerns, and we specifically care about the former. Signed-off-by: Andrea Bolognani Reviewed-by: Peter Krempa --- .../aarch64-virt-minimal.aarch64-latest.args | 31 ++++++++++++ .../aarch64-virt-minimal.aarch64-latest.xml | 26 ++++++++++ .../qemuxmlconfdata/aarch64-virt-minimal.xml | 12 +++++ .../ppc64-pseries-minimal.ppc64-latest.args | 33 ++++++++++++ .../ppc64-pseries-minimal.ppc64-latest.xml | 33 ++++++++++++ .../qemuxmlconfdata/ppc64-pseries-minimal.xml | 12 +++++ .../riscv64-virt-minimal.riscv64-latest.args | 33 ++++++++++++ .../riscv64-virt-minimal.riscv64-latest.xml | 33 ++++++++++++ .../qemuxmlconfdata/riscv64-virt-minimal.xml | 12 +++++ .../s390x-ccw-minimal.s390x-latest.args | 32 ++++++++++++ .../s390x-ccw-minimal.s390x-latest.xml | 27 ++++++++++ tests/qemuxmlconfdata/s390x-ccw-minimal.xml | 12 +++++ .../x86_64-pc-minimal.x86_64-latest.args | 33 ++++++++++++ .../x86_64-pc-minimal.x86_64-latest.xml | 31 ++++++++++++ tests/qemuxmlconfdata/x86_64-pc-minimal.xml | 12 +++++ .../x86_64-q35-minimal.x86_64-latest.args | 38 ++++++++++++++ .../x86_64-q35-minimal.x86_64-latest.xml | 50 +++++++++++++++++++ tests/qemuxmlconfdata/x86_64-q35-minimal.xml | 12 +++++ tests/qemuxmlconftest.c | 7 +++ 19 files changed, 479 insertions(+) create mode 100644 tests/qemuxmlconfdata/aarch64-virt-minimal.aarch64-late= st.args create mode 100644 tests/qemuxmlconfdata/aarch64-virt-minimal.aarch64-late= st.xml create mode 100644 tests/qemuxmlconfdata/aarch64-virt-minimal.xml create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-minimal.ppc64-lates= t.args create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-minimal.ppc64-lates= t.xml create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-minimal.xml create mode 100644 tests/qemuxmlconfdata/riscv64-virt-minimal.riscv64-late= st.args create mode 100644 tests/qemuxmlconfdata/riscv64-virt-minimal.riscv64-late= st.xml create mode 100644 tests/qemuxmlconfdata/riscv64-virt-minimal.xml create mode 100644 tests/qemuxmlconfdata/s390x-ccw-minimal.s390x-latest.ar= gs create mode 100644 tests/qemuxmlconfdata/s390x-ccw-minimal.s390x-latest.xml create mode 100644 tests/qemuxmlconfdata/s390x-ccw-minimal.xml create mode 100644 tests/qemuxmlconfdata/x86_64-pc-minimal.x86_64-latest.a= rgs create mode 100644 tests/qemuxmlconfdata/x86_64-pc-minimal.x86_64-latest.x= ml create mode 100644 tests/qemuxmlconfdata/x86_64-pc-minimal.xml create mode 100644 tests/qemuxmlconfdata/x86_64-q35-minimal.x86_64-latest.= args create mode 100644 tests/qemuxmlconfdata/x86_64-q35-minimal.x86_64-latest.= xml create mode 100644 tests/qemuxmlconfdata/x86_64-q35-minimal.xml diff --git a/tests/qemuxmlconfdata/aarch64-virt-minimal.aarch64-latest.args= b/tests/qemuxmlconfdata/aarch64-virt-minimal.aarch64-latest.args new file mode 100644 index 0000000000..51a196e03e --- /dev/null +++ b/tests/qemuxmlconfdata/aarch64-virt-minimal.aarch64-latest.args @@ -0,0 +1,31 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/var/lib/libvirt/qemu/domain--1-guest \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/var/lib/libvirt/qemu/domain--1-guest/.local/share \ +XDG_CACHE_HOME=3D/var/lib/libvirt/qemu/domain--1-guest/.cache \ +XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-guest/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=3Dguest,debug-threads=3Don \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/va= r/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ +-machine virt,usb=3Doff,gic-version=3D2,dump-guest-core=3Doff,memory-backe= nd=3Dmach-virt.ram,acpi=3Doff \ +-accel tcg \ +-cpu cortex-a15 \ +-m size=3D4194304k \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":4294= 967296}' \ +-overcommit mem-lock=3Doff \ +-smp 4,sockets=3D4,cores=3D1,threads=3D1 \ +-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ +-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 \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxmlconfdata/aarch64-virt-minimal.aarch64-latest.xml = b/tests/qemuxmlconfdata/aarch64-virt-minimal.aarch64-latest.xml new file mode 100644 index 0000000000..25b415d390 --- /dev/null +++ b/tests/qemuxmlconfdata/aarch64-virt-minimal.aarch64-latest.xml @@ -0,0 +1,26 @@ + + guest + 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 + 4194304 + 4194304 + 4 + + hvm + + + + + + + cortex-a15 + + + destroy + restart + destroy + + /usr/bin/qemu-system-aarch64 + + + diff --git a/tests/qemuxmlconfdata/aarch64-virt-minimal.xml b/tests/qemuxml= confdata/aarch64-virt-minimal.xml new file mode 100644 index 0000000000..5b44c14131 --- /dev/null +++ b/tests/qemuxmlconfdata/aarch64-virt-minimal.xml @@ -0,0 +1,12 @@ + + guest + 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 + 4194304 + 4 + + hvm + + + /usr/bin/qemu-system-aarch64 + + diff --git a/tests/qemuxmlconfdata/ppc64-pseries-minimal.ppc64-latest.args = b/tests/qemuxmlconfdata/ppc64-pseries-minimal.ppc64-latest.args new file mode 100644 index 0000000000..5039957a47 --- /dev/null +++ b/tests/qemuxmlconfdata/ppc64-pseries-minimal.ppc64-latest.args @@ -0,0 +1,33 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/var/lib/libvirt/qemu/domain--1-guest \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/var/lib/libvirt/qemu/domain--1-guest/.local/share \ +XDG_CACHE_HOME=3D/var/lib/libvirt/qemu/domain--1-guest/.cache \ +XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-guest/.config \ +/usr/bin/qemu-system-ppc64 \ +-name guest=3Dguest,debug-threads=3Don \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/va= r/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ +-machine pseries,usb=3Doff,dump-guest-core=3Doff,memory-backend=3Dppc_spap= r.ram \ +-accel tcg \ +-cpu POWER9 \ +-m size=3D4194304k \ +-object '{"qom-type":"memory-backend-ram","id":"ppc_spapr.ram","size":4294= 967296}' \ +-overcommit mem-lock=3Doff \ +-smp 4,sockets=3D4,cores=3D1,threads=3D1 \ +-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ +-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":"qemu-xhci","id":"usb","bus":"pci.0","addr":"0x1"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","add= r":"0x2"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxmlconfdata/ppc64-pseries-minimal.ppc64-latest.xml b= /tests/qemuxmlconfdata/ppc64-pseries-minimal.ppc64-latest.xml new file mode 100644 index 0000000000..bdb6b1e03d --- /dev/null +++ b/tests/qemuxmlconfdata/ppc64-pseries-minimal.ppc64-latest.xml @@ -0,0 +1,33 @@ + + guest + 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 + 4194304 + 4194304 + 4 + + hvm + + + + POWER9 + + + destroy + restart + destroy + + /usr/bin/qemu-system-ppc64 + +
+ + + + + +