From 26d63f7864341a6ce254449209bd7b8069b4ee45 Mon Sep 17 00:00:00 2001 From: Xianglai Li Date: Wed, 28 Feb 2024 02:16:23 -0500 Subject: [PATCH 4/4] Add test cases for loongarch Add some basic test cases for loongarch. Signed-off-by: Xianglai Li --- .../capabilities/kvm-loongarch64-domcaps.xml | 167 ++++++++++++++++++ tests/data/capabilities/kvm-loongarch64.xml | 28 +++ .../virt-install-kvm-loongarch64-basic.xml | 99 +++++++++++ tests/test_cli.py | 8 + tests/utils.py | 1 + 5 files changed, 303 insertions(+) create mode 100644 tests/data/capabilities/kvm-loongarch64-domcaps.xml create mode 100644 tests/data/capabilities/kvm-loongarch64.xml create mode 100644 tests/data/cli/compare/virt-install-kvm-loongarch64-basic.xml diff --git a/tests/data/capabilities/kvm-loongarch64-domcaps.xml b/tests/data/capabilities/kvm-loongarch64-domcaps.xml new file mode 100644 index 0000000..2013da3 --- /dev/null +++ b/tests/data/capabilities/kvm-loongarch64-domcaps.xml @@ -0,0 +1,167 @@ + + /usr/bin/qemu-system-loongarch64 + kvm + virt + loongarch64 + + + + + + /obviously/fake/firmware1.fd + /obviously/fake/firmware2.fd + + rom + pflash + + + yes + no + + + no + + + + + + + off + + + + + on + off + + + + + la132 + la464 + max + + + + + file + anonymous + memfd + + + + + + disk + cdrom + floppy + lun + + + fdc + scsi + virtio + usb + sata + + + virtio + virtio-transitional + virtio-non-transitional + + + + + sdl + vnc + spice + dbus + + + + + + subsystem + + + default + mandatory + requisite + optional + + + usb + pci + scsi + + + + default + vfio + + + + + virtio + virtio-transitional + virtio-non-transitional + + + random + egd + builtin + + + + + path + handle + virtiofs + + + + + + usb + + + + + pty + unix + spicevmc + + + + + virtio + + + qemu + + + builtin + lkcf + + + + + + + + + + + + + + diff --git a/tests/data/capabilities/kvm-loongarch64.xml b/tests/data/capabilities/kvm-loongarch64.xml new file mode 100644 index 0000000..c15d4d9 --- /dev/null +++ b/tests/data/capabilities/kvm-loongarch64.xml @@ -0,0 +1,28 @@ + + + + + loongarch64 + + + + + + + hvm + + 64 + /usr/bin/qemu-system-loongarch64 + + + + + + + + + + + + + diff --git a/tests/data/cli/compare/virt-install-kvm-loongarch64-basic.xml b/tests/data/cli/compare/virt-install-kvm-loongarch64-basic.xml new file mode 100644 index 0000000..83444ba --- /dev/null +++ b/tests/data/cli/compare/virt-install-kvm-loongarch64-basic.xml @@ -0,0 +1,99 @@ + + fedora19 + 00000000-1111-2222-3333-444444444444 + + + + + + 65536 + 65536 + 2 + + hvm + + + + + + + la464 + + + + /usr/bin/qemu-system-loongarch64 + + + + + + + + + + + + + + + + + + + + + + + destroy + + + fedora19 + 00000000-1111-2222-3333-444444444444 + + + + + + 65536 + 65536 + 2 + + hvm + + + + + + + la464 + + + + /usr/bin/qemu-system-loongarch64 + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/test_cli.py b/tests/test_cli.py index 774db09..65123f5 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1179,6 +1179,14 @@ c.add_compare("--connect %(URI-KVM-AARCH64)s --osinfo fedora30 --arch aarch64 -- +##################### +# loongarch64 tests # +##################### + +c.add_compare("--osinfo fedora19 --nodisks --pxe --connect " + utils.URIs.kvm_loongarch64, "kvm-loongarch64-basic") + + + ################# # AMD sev tests # ################# diff --git a/tests/utils.py b/tests/utils.py index 5c813f6..6d91a14 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -105,6 +105,7 @@ class _URIs(object): self.kvm_ppc64le = _uri_qemu + _caps("kvm-ppc64le.xml") + _domcaps("kvm-ppc64le-domcaps.xml") self.kvm_s390x = _uri_qemu + _caps("kvm-s390x.xml") + _domcaps("kvm-s390x-domcaps.xml") self.qemu_riscv64 = _uri_qemu + _caps("qemu-riscv64.xml") + _domcaps("qemu-riscv64-domcaps.xml") + self.kvm_loongarch64 = _uri_qemu + _caps("kvm-loongarch64.xml") + _domcaps("kvm-loongarch64-domcaps.xml") -- 2.27.0