[libvirt PATCH 0/2] tests: Sync and simplify some ppc64 tests

Inspired by https://www.redhat.com/archives/libvir-list/2020-November/msg01057.html Andrea Bolognani (2): tests: Sync some ppc64 tests tests: Simplify some ppc64 tests .../memory-hotplug-nvdimm-ppc64.args | 6 +-- ...ory-hotplug-nvdimm-ppc64.ppc64-latest.args | 38 ------------------- .../memory-hotplug-nvdimm-ppc64.xml | 8 +--- .../memory-hotplug-ppc64-nonuma.args | 7 +--- .../memory-hotplug-ppc64-nonuma.xml | 14 +++++-- tests/qemuxml2argvtest.c | 4 +- .../memory-hotplug-nvdimm-ppc64.xml | 8 +--- .../memory-hotplug-ppc64-nonuma.xml | 1 + tests/qemuxml2xmltest.c | 5 +++ 9 files changed, 26 insertions(+), 65 deletions(-) delete mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.ppc64-= latest.args create mode 120000 tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml --=20 2.26.2

On a Thursday in 2020, Andrea Bolognani wrote:
Inspired by
https://www.redhat.com/archives/libvir-list/2020-November/msg01057.html
Andrea Bolognani (2): tests: Sync some ppc64 tests tests: Simplify some ppc64 tests
.../memory-hotplug-nvdimm-ppc64.args | 6 +-- ...ory-hotplug-nvdimm-ppc64.ppc64-latest.args | 38 ------------------- .../memory-hotplug-nvdimm-ppc64.xml | 8 +--- .../memory-hotplug-ppc64-nonuma.args | 7 +--- .../memory-hotplug-ppc64-nonuma.xml | 14 +++++-- tests/qemuxml2argvtest.c | 4 +- .../memory-hotplug-nvdimm-ppc64.xml | 8 +--- .../memory-hotplug-ppc64-nonuma.xml | 1 + tests/qemuxml2xmltest.c | 5 +++ 9 files changed, 26 insertions(+), 65 deletions(-) delete mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.ppc64-= latest.args create mode 120000 tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml
Trust, yada, yada. Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

On 12/3/20 10:44 AM, Andrea Bolognani wrote:
Inspired by
https://www.redhat.com/archives/libvir-list/2020-November/msg01057.html
Andrea Bolognani (2): tests: Sync some ppc64 tests tests: Simplify some ppc64 tests
I don't see the patches, and can't see them in the ML archives. Not sure if it's a ML hickup (I saw this cover letter landing in the ML 2 hours ago, but no other patches) or that you forgot to send the rest. Can you please try to re-send? DHB
.../memory-hotplug-nvdimm-ppc64.args | 6 +-- ...ory-hotplug-nvdimm-ppc64.ppc64-latest.args | 38 ------------------- .../memory-hotplug-nvdimm-ppc64.xml | 8 +--- .../memory-hotplug-ppc64-nonuma.args | 7 +--- .../memory-hotplug-ppc64-nonuma.xml | 14 +++++-- tests/qemuxml2argvtest.c | 4 +- .../memory-hotplug-nvdimm-ppc64.xml | 8 +--- .../memory-hotplug-ppc64-nonuma.xml | 1 + tests/qemuxml2xmltest.c | 5 +++ 9 files changed, 26 insertions(+), 65 deletions(-) delete mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.ppc64-= latest.args create mode 120000 tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml
--=20 2.26.2

On Thu, 2020-12-03 at 12:54 -0300, Daniel Henrique Barboza wrote:
On 12/3/20 10:44 AM, Andrea Bolognani wrote:
Inspired by
https://www.redhat.com/archives/libvir-list/2020-November/msg01057.html
Andrea Bolognani (2): tests: Sync some ppc64 tests tests: Simplify some ppc64 tests
I don't see the patches, and can't see them in the ML archives. Not sure if it's a ML hickup (I saw this cover letter landing in the ML 2 hours ago, but no other patches) or that you forgot to send the rest.
Can you please try to re-send?
There seems to have been a SNAFU on my side, because I just tried again and they immediately showed up on the archive :) -- Andrea Bolognani / Red Hat / Virtualization

The ppc64 tests memory-hotplug-ppc64-nonuma memory-hotplug-nvdimm-ppc64 are not passed the same information for qemuxml2argv and qemuxml2xml tests; the former, in particular, doesn't show up at all in qemuxml2xml. Address this inconsistency. Note that one of the new output files had been introduced with 5540acb9a2bd despite not being actually used as of that commit. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- .../memory-hotplug-nvdimm-ppc64.args | 2 +- ...ory-hotplug-nvdimm-ppc64.ppc64-latest.args | 38 ---------------- tests/qemuxml2argvtest.c | 4 +- .../memory-hotplug-ppc64-nonuma.xml | 45 +++++++++++++++++++ tests/qemuxml2xmltest.c | 5 +++ 5 files changed, 54 insertions(+), 40 deletions(-) delete mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.ppc64-latest.args create mode 100644 tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args index 92e6c538fb..94bd86ada0 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args +++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args @@ -15,7 +15,7 @@ QEMU_AUDIO_DRV=none \ -realtime mlock=off \ -smp 2,sockets=2,cores=1,threads=1 \ -numa node,nodeid=0,cpus=0-1,mem=1024 \ --object memory-backend-file,id=memnvdimm0,prealloc=yes,mem-path=/tmp/nvdimm,\ +-object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,prealloc=yes,\ size=537001984 \ -device nvdimm,node=0,label-size=131072,\ uuid=49545eb3-75e1-2d0a-acdd-f0294406c99e,memdev=memnvdimm0,id=nvdimm0,slot=0 \ diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.ppc64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.ppc64-latest.args deleted file mode 100644 index e7be7216c1..0000000000 --- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.ppc64-latest.args +++ /dev/null @@ -1,38 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/tmp/lib/domain--1-QEMUGuest1 \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ -XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ -XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-ppc64 \ --name guest=QEMUGuest1,debug-threads=on \ --S \ --object secret,id=masterKey0,format=raw,\ -file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pseries,accel=tcg,usb=off,dump-guest-core=off,nvdimm=on \ --cpu POWER9 \ --m size=1048576k,slots=16,maxmem=1099511627776k \ --overcommit mem-lock=off \ --smp 2,sockets=2,dies=1,cores=1,threads=1 \ --numa node,nodeid=0,cpus=0-1,mem=1024 \ --object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,prealloc=yes,\ -size=537001984 \ --device nvdimm,node=0,label-size=131072,\ -uuid=49545eb3-75e1-2d0a-acdd-f0294406c99e,memdev=memnvdimm0,id=nvdimm0,slot=0 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,fd=1729,server,nowait \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --boot strict=on \ --device pci-ohci,id=usb,bus=pci.0,addr=0x1 \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \ --sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ -resourcecontrol=deny \ --msg timestamp=on diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 409680c84e..8c8426e699 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -3011,7 +3011,9 @@ mymain(void) DO_TEST_CAPS_LATEST("memory-hotplug-nvdimm-align"); DO_TEST_CAPS_LATEST("memory-hotplug-nvdimm-pmem"); DO_TEST_CAPS_LATEST("memory-hotplug-nvdimm-readonly"); - DO_TEST_CAPS_ARCH_LATEST("memory-hotplug-nvdimm-ppc64", "ppc64"); + DO_TEST("memory-hotplug-nvdimm-ppc64", QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, + QEMU_CAPS_OBJECT_MEMORY_FILE, + QEMU_CAPS_DEVICE_NVDIMM); DO_TEST("machine-aeskeywrap-on-caps", QEMU_CAPS_AES_KEY_WRAP, diff --git a/tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml b/tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml new file mode 100644 index 0000000000..a5905e64b5 --- /dev/null +++ b/tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml @@ -0,0 +1,45 @@ +<domain type='kvm'> + <name>QEMUGuest1</name> + <uuid>49545eb3-75e1-2d0a-acdd-f0294406c99e</uuid> + <maxMemory slots='16' unit='KiB'>4194304</maxMemory> + <memory unit='KiB'>2097152</memory> + <currentMemory unit='KiB'>2097152</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='ppc64' machine='pseries'>hvm</type> + <kernel>/media/ram/uImage</kernel> + <initrd>/media/ram/ramdisk</initrd> + <cmdline>root=/dev/ram rw console=ttyS0,115200</cmdline> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-ppc64</emulator> + <controller type='usb' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> + </controller> + <controller type='pci' index='0' model='pci-root'> + <model name='spapr-pci-host-bridge'/> + <target index='0'/> + </controller> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </memballoon> + <panic model='pseries'/> + <memory model='dimm'> + <target> + <size unit='KiB'>523264</size> + </target> + <address type='dimm' slot='0'/> + </memory> + <memory model='dimm'> + <target> + <size unit='KiB'>524287</size> + </target> + <address type='dimm' slot='1'/> + </memory> + </devices> +</domain> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index c006719dee..376464a925 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1227,6 +1227,9 @@ mymain(void) /* SVE aarch64 CPU features work on modern QEMU */ DO_TEST_CAPS_ARCH_LATEST("aarch64-features-sve", "aarch64"); + DO_TEST("memory-hotplug-ppc64-nonuma", QEMU_CAPS_KVM, QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA, + QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, + QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE); DO_TEST("memory-hotplug", NONE); DO_TEST("memory-hotplug-dimm", QEMU_CAPS_DEVICE_PC_DIMM); DO_TEST("memory-hotplug-nvdimm", QEMU_CAPS_DEVICE_NVDIMM); @@ -1237,7 +1240,9 @@ mymain(void) DO_TEST("memory-hotplug-nvdimm-readonly", QEMU_CAPS_DEVICE_NVDIMM, QEMU_CAPS_DEVICE_NVDIMM_UNARMED); DO_TEST("memory-hotplug-nvdimm-ppc64", QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, + QEMU_CAPS_OBJECT_MEMORY_FILE, QEMU_CAPS_DEVICE_NVDIMM); + DO_TEST("net-udp", NONE); DO_TEST("video-virtio-gpu-device", QEMU_CAPS_DEVICE_VIRTIO_GPU); -- 2.26.2

On 12/3/20 2:04 PM, Andrea Bolognani wrote:
The ppc64 tests
memory-hotplug-ppc64-nonuma memory-hotplug-nvdimm-ppc64
are not passed the same information for qemuxml2argv and qemuxml2xml tests; the former, in particular, doesn't show up at all in qemuxml2xml. Address this inconsistency.
Note that one of the new output files had been introduced with 5540acb9a2bd despite not being actually used as of that commit.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> ---
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
.../memory-hotplug-nvdimm-ppc64.args | 2 +- ...ory-hotplug-nvdimm-ppc64.ppc64-latest.args | 38 ---------------- tests/qemuxml2argvtest.c | 4 +- .../memory-hotplug-ppc64-nonuma.xml | 45 +++++++++++++++++++ tests/qemuxml2xmltest.c | 5 +++ 5 files changed, 54 insertions(+), 40 deletions(-) delete mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.ppc64-latest.args create mode 100644 tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args index 92e6c538fb..94bd86ada0 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args +++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args @@ -15,7 +15,7 @@ QEMU_AUDIO_DRV=none \ -realtime mlock=off \ -smp 2,sockets=2,cores=1,threads=1 \ -numa node,nodeid=0,cpus=0-1,mem=1024 \ --object memory-backend-file,id=memnvdimm0,prealloc=yes,mem-path=/tmp/nvdimm,\ +-object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,prealloc=yes,\ size=537001984 \ -device nvdimm,node=0,label-size=131072,\ uuid=49545eb3-75e1-2d0a-acdd-f0294406c99e,memdev=memnvdimm0,id=nvdimm0,slot=0 \ diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.ppc64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.ppc64-latest.args deleted file mode 100644 index e7be7216c1..0000000000 --- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.ppc64-latest.args +++ /dev/null @@ -1,38 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/tmp/lib/domain--1-QEMUGuest1 \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ -XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ -XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-ppc64 \ --name guest=QEMUGuest1,debug-threads=on \ --S \ --object secret,id=masterKey0,format=raw,\ -file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pseries,accel=tcg,usb=off,dump-guest-core=off,nvdimm=on \ --cpu POWER9 \ --m size=1048576k,slots=16,maxmem=1099511627776k \ --overcommit mem-lock=off \ --smp 2,sockets=2,dies=1,cores=1,threads=1 \ --numa node,nodeid=0,cpus=0-1,mem=1024 \ --object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,prealloc=yes,\ -size=537001984 \ --device nvdimm,node=0,label-size=131072,\ -uuid=49545eb3-75e1-2d0a-acdd-f0294406c99e,memdev=memnvdimm0,id=nvdimm0,slot=0 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,fd=1729,server,nowait \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --boot strict=on \ --device pci-ohci,id=usb,bus=pci.0,addr=0x1 \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \ --sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ -resourcecontrol=deny \ --msg timestamp=on diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 409680c84e..8c8426e699 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -3011,7 +3011,9 @@ mymain(void) DO_TEST_CAPS_LATEST("memory-hotplug-nvdimm-align"); DO_TEST_CAPS_LATEST("memory-hotplug-nvdimm-pmem"); DO_TEST_CAPS_LATEST("memory-hotplug-nvdimm-readonly"); - DO_TEST_CAPS_ARCH_LATEST("memory-hotplug-nvdimm-ppc64", "ppc64"); + DO_TEST("memory-hotplug-nvdimm-ppc64", QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, + QEMU_CAPS_OBJECT_MEMORY_FILE, + QEMU_CAPS_DEVICE_NVDIMM);
DO_TEST("machine-aeskeywrap-on-caps", QEMU_CAPS_AES_KEY_WRAP, diff --git a/tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml b/tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml new file mode 100644 index 0000000000..a5905e64b5 --- /dev/null +++ b/tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml @@ -0,0 +1,45 @@ +<domain type='kvm'> + <name>QEMUGuest1</name> + <uuid>49545eb3-75e1-2d0a-acdd-f0294406c99e</uuid> + <maxMemory slots='16' unit='KiB'>4194304</maxMemory> + <memory unit='KiB'>2097152</memory> + <currentMemory unit='KiB'>2097152</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='ppc64' machine='pseries'>hvm</type> + <kernel>/media/ram/uImage</kernel> + <initrd>/media/ram/ramdisk</initrd> + <cmdline>root=/dev/ram rw console=ttyS0,115200</cmdline> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-ppc64</emulator> + <controller type='usb' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> + </controller> + <controller type='pci' index='0' model='pci-root'> + <model name='spapr-pci-host-bridge'/> + <target index='0'/> + </controller> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </memballoon> + <panic model='pseries'/> + <memory model='dimm'> + <target> + <size unit='KiB'>523264</size> + </target> + <address type='dimm' slot='0'/> + </memory> + <memory model='dimm'> + <target> + <size unit='KiB'>524287</size> + </target> + <address type='dimm' slot='1'/> + </memory> + </devices> +</domain> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index c006719dee..376464a925 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1227,6 +1227,9 @@ mymain(void) /* SVE aarch64 CPU features work on modern QEMU */ DO_TEST_CAPS_ARCH_LATEST("aarch64-features-sve", "aarch64");
+ DO_TEST("memory-hotplug-ppc64-nonuma", QEMU_CAPS_KVM, QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA, + QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, + QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE); DO_TEST("memory-hotplug", NONE); DO_TEST("memory-hotplug-dimm", QEMU_CAPS_DEVICE_PC_DIMM); DO_TEST("memory-hotplug-nvdimm", QEMU_CAPS_DEVICE_NVDIMM); @@ -1237,7 +1240,9 @@ mymain(void) DO_TEST("memory-hotplug-nvdimm-readonly", QEMU_CAPS_DEVICE_NVDIMM, QEMU_CAPS_DEVICE_NVDIMM_UNARMED); DO_TEST("memory-hotplug-nvdimm-ppc64", QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, + QEMU_CAPS_OBJECT_MEMORY_FILE, QEMU_CAPS_DEVICE_NVDIMM); + DO_TEST("net-udp", NONE);
DO_TEST("video-virtio-gpu-device", QEMU_CAPS_DEVICE_VIRTIO_GPU);

We can leave out things like USB controller, memballoon device, kernel and initrd since they're not the focus of the tests. Propagating some information from the output files back to the input files makes it easier to compare them, as it reduces the resulting diff, and in the case of the qemuxml2xml test for memory-hotplug-ppc64-nonuma it allows us to convert the output file into a symlink, since in the specific case the XML doesn't change at all. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- .../memory-hotplug-nvdimm-ppc64.args | 4 +- .../memory-hotplug-nvdimm-ppc64.xml | 8 +--- .../memory-hotplug-ppc64-nonuma.args | 7 +-- .../memory-hotplug-ppc64-nonuma.xml | 14 ++++-- .../memory-hotplug-nvdimm-ppc64.xml | 8 +--- .../memory-hotplug-ppc64-nonuma.xml | 46 +------------------ 6 files changed, 17 insertions(+), 70 deletions(-) mode change 100644 => 120000 tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args index 94bd86ada0..f50444e47e 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args +++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args @@ -27,6 +27,4 @@ uuid=49545eb3-75e1-2d0a-acdd-f0294406c99e,memdev=memnvdimm0,id=nvdimm0,slot=0 \ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=control \ -rtc base=utc \ --no-shutdown \ --usb \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 +-no-shutdown diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.xml b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.xml index ae5a17d3c8..bf7df9a259 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.xml +++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.xml @@ -21,16 +21,12 @@ <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu-system-ppc64</emulator> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> - </controller> + <controller type='usb' index='0' model='none'/> <controller type='pci' index='0' model='pci-root'> <model name='spapr-pci-host-bridge'/> <target index='0'/> </controller> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </memballoon> + <memballoon model='none'/> <panic model='pseries'/> <memory model='nvdimm'> <uuid>49545eb3-75e1-2d0a-acdd-f0294406c99e</uuid> diff --git a/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.args b/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.args index 91cea9d8bf..f7f151d1ca 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.args +++ b/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.args @@ -26,9 +26,4 @@ QEMU_AUDIO_DRV=none \ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=control \ -rtc base=utc \ --no-shutdown \ --kernel /media/ram/uImage \ --initrd /media/ram/ramdisk \ --append 'root=/dev/ram rw console=ttyS0,115200' \ --usb \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 +-no-shutdown diff --git a/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.xml b/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.xml index 7c68cd6aa2..a0806c4b54 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.xml +++ b/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.xml @@ -7,9 +7,7 @@ <vcpu placement='static'>1</vcpu> <os> <type arch='ppc64' machine='pseries'>hvm</type> - <kernel>/media/ram/uImage</kernel> - <initrd>/media/ram/ramdisk</initrd> - <cmdline>root=/dev/ram rw console=ttyS0,115200</cmdline> + <boot dev='hd'/> </os> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> @@ -17,16 +15,24 @@ <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu-system-ppc64</emulator> - <memballoon model='virtio'/> + <controller type='usb' index='0' model='none'/> + <controller type='pci' index='0' model='pci-root'> + <model name='spapr-pci-host-bridge'/> + <target index='0'/> + </controller> + <memballoon model='none'/> + <panic model='pseries'/> <memory model='dimm'> <target> <size unit='KiB'>523264</size> </target> + <address type='dimm' slot='0'/> </memory> <memory model='dimm'> <target> <size unit='KiB'>524287</size> </target> + <address type='dimm' slot='1'/> </memory> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.xml b/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.xml index ecb1b83b4a..0c0b9f96fb 100644 --- a/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.xml +++ b/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.xml @@ -21,16 +21,12 @@ <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu-system-ppc64</emulator> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> - </controller> + <controller type='usb' index='0' model='none'/> <controller type='pci' index='0' model='pci-root'> <model name='spapr-pci-host-bridge'/> <target index='0'/> </controller> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </memballoon> + <memballoon model='none'/> <panic model='pseries'/> <memory model='nvdimm'> <uuid>49545eb3-75e1-2d0a-acdd-f0294406c99e</uuid> diff --git a/tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml b/tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml deleted file mode 100644 index a5905e64b5..0000000000 --- a/tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml +++ /dev/null @@ -1,45 +0,0 @@ -<domain type='kvm'> - <name>QEMUGuest1</name> - <uuid>49545eb3-75e1-2d0a-acdd-f0294406c99e</uuid> - <maxMemory slots='16' unit='KiB'>4194304</maxMemory> - <memory unit='KiB'>2097152</memory> - <currentMemory unit='KiB'>2097152</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='ppc64' machine='pseries'>hvm</type> - <kernel>/media/ram/uImage</kernel> - <initrd>/media/ram/ramdisk</initrd> - <cmdline>root=/dev/ram rw console=ttyS0,115200</cmdline> - <boot dev='hd'/> - </os> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-ppc64</emulator> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> - </controller> - <controller type='pci' index='0' model='pci-root'> - <model name='spapr-pci-host-bridge'/> - <target index='0'/> - </controller> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </memballoon> - <panic model='pseries'/> - <memory model='dimm'> - <target> - <size unit='KiB'>523264</size> - </target> - <address type='dimm' slot='0'/> - </memory> - <memory model='dimm'> - <target> - <size unit='KiB'>524287</size> - </target> - <address type='dimm' slot='1'/> - </memory> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml b/tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml new file mode 120000 index 0000000000..0822e409b4 --- /dev/null +++ b/tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/memory-hotplug-ppc64-nonuma.xml \ No newline at end of file -- 2.26.2

On 12/3/20 2:04 PM, Andrea Bolognani wrote:
We can leave out things like USB controller, memballoon device, kernel and initrd since they're not the focus of the tests.
Propagating some information from the output files back to the input files makes it easier to compare them, as it reduces the resulting diff, and in the case of the qemuxml2xml test for memory-hotplug-ppc64-nonuma it allows us to convert the output file into a symlink, since in the specific case the XML doesn't change at all.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> ---
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
.../memory-hotplug-nvdimm-ppc64.args | 4 +- .../memory-hotplug-nvdimm-ppc64.xml | 8 +--- .../memory-hotplug-ppc64-nonuma.args | 7 +-- .../memory-hotplug-ppc64-nonuma.xml | 14 ++++-- .../memory-hotplug-nvdimm-ppc64.xml | 8 +--- .../memory-hotplug-ppc64-nonuma.xml | 46 +------------------ 6 files changed, 17 insertions(+), 70 deletions(-) mode change 100644 => 120000 tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args index 94bd86ada0..f50444e47e 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args +++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args @@ -27,6 +27,4 @@ uuid=49545eb3-75e1-2d0a-acdd-f0294406c99e,memdev=memnvdimm0,id=nvdimm0,slot=0 \ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=control \ -rtc base=utc \ --no-shutdown \ --usb \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 +-no-shutdown diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.xml b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.xml index ae5a17d3c8..bf7df9a259 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.xml +++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.xml @@ -21,16 +21,12 @@ <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu-system-ppc64</emulator> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> - </controller> + <controller type='usb' index='0' model='none'/> <controller type='pci' index='0' model='pci-root'> <model name='spapr-pci-host-bridge'/> <target index='0'/> </controller> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </memballoon> + <memballoon model='none'/> <panic model='pseries'/> <memory model='nvdimm'> <uuid>49545eb3-75e1-2d0a-acdd-f0294406c99e</uuid> diff --git a/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.args b/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.args index 91cea9d8bf..f7f151d1ca 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.args +++ b/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.args @@ -26,9 +26,4 @@ QEMU_AUDIO_DRV=none \ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=control \ -rtc base=utc \ --no-shutdown \ --kernel /media/ram/uImage \ --initrd /media/ram/ramdisk \ --append 'root=/dev/ram rw console=ttyS0,115200' \ --usb \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 +-no-shutdown diff --git a/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.xml b/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.xml index 7c68cd6aa2..a0806c4b54 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.xml +++ b/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.xml @@ -7,9 +7,7 @@ <vcpu placement='static'>1</vcpu> <os> <type arch='ppc64' machine='pseries'>hvm</type> - <kernel>/media/ram/uImage</kernel> - <initrd>/media/ram/ramdisk</initrd> - <cmdline>root=/dev/ram rw console=ttyS0,115200</cmdline> + <boot dev='hd'/> </os> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> @@ -17,16 +15,24 @@ <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu-system-ppc64</emulator> - <memballoon model='virtio'/> + <controller type='usb' index='0' model='none'/> + <controller type='pci' index='0' model='pci-root'> + <model name='spapr-pci-host-bridge'/> + <target index='0'/> + </controller> + <memballoon model='none'/> + <panic model='pseries'/> <memory model='dimm'> <target> <size unit='KiB'>523264</size> </target> + <address type='dimm' slot='0'/> </memory> <memory model='dimm'> <target> <size unit='KiB'>524287</size> </target> + <address type='dimm' slot='1'/> </memory> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.xml b/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.xml index ecb1b83b4a..0c0b9f96fb 100644 --- a/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.xml +++ b/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.xml @@ -21,16 +21,12 @@ <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu-system-ppc64</emulator> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> - </controller> + <controller type='usb' index='0' model='none'/> <controller type='pci' index='0' model='pci-root'> <model name='spapr-pci-host-bridge'/> <target index='0'/> </controller> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </memballoon> + <memballoon model='none'/> <panic model='pseries'/> <memory model='nvdimm'> <uuid>49545eb3-75e1-2d0a-acdd-f0294406c99e</uuid> diff --git a/tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml b/tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml deleted file mode 100644 index a5905e64b5..0000000000 --- a/tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml +++ /dev/null @@ -1,45 +0,0 @@ -<domain type='kvm'> - <name>QEMUGuest1</name> - <uuid>49545eb3-75e1-2d0a-acdd-f0294406c99e</uuid> - <maxMemory slots='16' unit='KiB'>4194304</maxMemory> - <memory unit='KiB'>2097152</memory> - <currentMemory unit='KiB'>2097152</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='ppc64' machine='pseries'>hvm</type> - <kernel>/media/ram/uImage</kernel> - <initrd>/media/ram/ramdisk</initrd> - <cmdline>root=/dev/ram rw console=ttyS0,115200</cmdline> - <boot dev='hd'/> - </os> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-ppc64</emulator> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> - </controller> - <controller type='pci' index='0' model='pci-root'> - <model name='spapr-pci-host-bridge'/> - <target index='0'/> - </controller> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </memballoon> - <panic model='pseries'/> - <memory model='dimm'> - <target> - <size unit='KiB'>523264</size> - </target> - <address type='dimm' slot='0'/> - </memory> - <memory model='dimm'> - <target> - <size unit='KiB'>524287</size> - </target> - <address type='dimm' slot='1'/> - </memory> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml b/tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml new file mode 120000 index 0000000000..0822e409b4 --- /dev/null +++ b/tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/memory-hotplug-ppc64-nonuma.xml \ No newline at end of file
participants (3)
-
Andrea Bolognani
-
Daniel Henrique Barboza
-
Ján Tomko