From 630b229bc949f08360dbbe5ec9dbd4e4ae0d1b13 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Thu, 21 Mar 2024 10:09:33 +0100 Subject: [PATCH] qemuxmlconftest: Adapt XMLs from 'virsh-cpuset' and 'virsh-define-dev-segfault' cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rather than using 'virsh define' for the tests use the XML (or idea what the XML is testing) and use them as 'qemuxmlconftest' cases. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- tests/meson.build | 2 - .../console-compat-crash.x86_64-latest.args | 46 +++++++++++++ .../console-compat-crash.x86_64-latest.xml | 65 +++++++++++++++++++ .../console-compat-crash.xml} | 36 +--------- .../cpuset-invalid.x86_64-latest.err | 1 + tests/qemuxmlconfdata/cpuset-invalid.xml | 12 ++++ tests/qemuxmlconftest.c | 2 + tests/virsh-cpuset | 46 ------------- 8 files changed, 129 insertions(+), 81 deletions(-) create mode 100644 tests/qemuxmlconfdata/console-compat-crash.x86_64-latest.args create mode 100644 tests/qemuxmlconfdata/console-compat-crash.x86_64-latest.xml rename tests/{virsh-define-dev-segfault => qemuxmlconfdata/console-compat-crash.xml} (59%) mode change 100755 => 100644 create mode 100644 tests/qemuxmlconfdata/cpuset-invalid.x86_64-latest.err create mode 100644 tests/qemuxmlconfdata/cpuset-invalid.xml delete mode 100755 tests/virsh-cpuset diff --git a/tests/meson.build b/tests/meson.build index b70fe7732e..35e8bd53bb 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -692,8 +692,6 @@ if conf.has('WITH_LIBVIRTD') 'libvirtd-pool', 'virsh-auth', 'virsh-checkpoint', - 'virsh-cpuset', - 'virsh-define-dev-segfault', 'virsh-int-overflow', 'virsh-read-bufsiz', 'virsh-read-non-seekable', diff --git a/tests/qemuxmlconfdata/console-compat-crash.x86_64-latest.args b/tests/qemuxmlconfdata/console-compat-crash.x86_64-latest.args new file mode 100644 index 0000000000..3738d252a4 --- /dev/null +++ b/tests/qemuxmlconfdata/console-compat-crash.x86_64-latest.args @@ -0,0 +1,46 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-D \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-D/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-D/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-D/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=D,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-D/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,pcspk-audiodev=audio1,acpi=on \ +-accel kvm \ +-cpu qemu64 \ +-m size=262144k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":268435456}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid aaa3ae22-fed2-bfbd-ac02-3bea3bcfad82 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-chardev pty,id=charserial0 \ +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \ +-chardev pty,id=charserial1 \ +-device '{"driver":"isa-serial","chardev":"charserial1","id":"serial1","index":1}' \ +-chardev pty,id=charserial2 \ +-device '{"driver":"isa-serial","chardev":"charserial2","id":"serial2","index":2}' \ +-chardev pty,id=charparallel0 \ +-device '{"driver":"isa-parallel","chardev":"charparallel0","id":"parallel0"}' \ +-chardev pty,id=charparallel1 \ +-device '{"driver":"isa-parallel","chardev":"charparallel1","id":"parallel1"}' \ +-chardev pty,id=charparallel2 \ +-device '{"driver":"isa-parallel","chardev":"charparallel2","id":"parallel2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"ES1370","id":"sound1","audiodev":"audio1","bus":"pci.0","addr":"0x2"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxmlconfdata/console-compat-crash.x86_64-latest.xml b/tests/qemuxmlconfdata/console-compat-crash.x86_64-latest.xml new file mode 100644 index 0000000000..106d97b62f --- /dev/null +++ b/tests/qemuxmlconfdata/console-compat-crash.x86_64-latest.xml @@ -0,0 +1,65 @@ + + D + aaa3ae22-fed2-bfbd-ac02-3bea3bcfad82 + 262144 + 262144 + 1 + + hvm + + + + + + + qemu64 + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +