[PATCH v2 00/25] Reuse interal rewrapping for 'args' test files

v2: - rebased on current master - added changes to nodedevmdevctltest - reworked the token for virCommandSetDryRun to avoid macro - truncated patch 17/25 to avoid getting stuck in list For full version please fetch the changes from my repository: git fetch https://gitlab.com/pipo.sk/libvirt.git test-wrap-3 Peter Krempa (25): qemuxml2argvdata: Remove unused 'args' files qemuxml2argvdata: Remove unused 'xml' files qemuxml2xmloutdata: Remove unused output XML files qemuxml2xmloutdata: Remove unused symlinks to test XML files virCommandToString: Allow stripping command path tests: storagepoolxml2argvtest: Use integrated command path stripping virCommandSetDryRun: Rework resetting of the dry run data virCommandSetDryRun: Add flags to linebreak and strip prefix from the command buffer networkxml2firewalltest: Strip path from test output via virCommandSetDryRun nwfilterxml2firewalltest: Strip path from test output via virCommandSetDryRun nwfilterebiptablestest: Strip path from test output via virCommandSetDryRun testutils: Remove unused virTestClearCommandPath virTestCompareToFile: Add possibility to skip unwrapping of input file virTestLoadFileJSON: Don't try to unwrap JSON documents virCommandToStringFull: Improve linebreaking behaviour syntax-check: Remove 90 char limit for 'argv' files qemuxml2argvtest: Use internal wrapping of command line arguments storage: Format mount options before positional arguments storagepoolxml2argvtest: Use internal wrapping of command line arguments storagevolxml2argvtest: Use internal wrapping of command line arguments networkxml2firewalltest: Use internal wrapping of command line arguments nwfilterxml2firewalldata: Use internal wrapping to wrap output files bhyvexml2argvtest: Use internal wrapping of command line arguments nodedevmdevctltest: Use internal linewrapping and variable command path stripping Remove test 'args' file rewrapping infrastructure build-aux/syntax-check.mk | 14 +- scripts/meson.build | 1 - scripts/test-wrap-argv.py | 168 ----- src/libvirt_private.syms | 3 + src/storage/storage_util.c | 8 +- src/util/vircommand.c | 129 +++- src/util/vircommand.h | 4 + src/util/vircommandpriv.h | 11 +- .../bhyvexml2argv-acpiapic.args | 3 +- .../bhyvexml2argv-acpiapic.ldargs | 3 +- ...ml2argv-addr-isa-controller-on-slot-1.args | 3 +- ...2argv-addr-isa-controller-on-slot-1.ldargs | 3 +- ...l2argv-addr-isa-controller-on-slot-31.args | 3 +- ...argv-addr-isa-controller-on-slot-31.ldargs | 3 +- ...xml2argv-addr-more-than-32-sata-disks.args | 18 +- ...l2argv-addr-more-than-32-sata-disks.ldargs | 3 +- ...hyvexml2argv-addr-multiple-sata-disks.args | 3 +- ...vexml2argv-addr-multiple-sata-disks.ldargs | 3 +- ...vexml2argv-addr-multiple-virtio-disks.args | 3 +- ...xml2argv-addr-multiple-virtio-disks.ldargs | 3 +- ...rgv-addr-no32devs-multiple-sata-disks.args | 3 +- ...v-addr-no32devs-multiple-sata-disks.ldargs | 3 +- ...l2argv-addr-no32devs-single-sata-disk.args | 3 +- ...argv-addr-no32devs-single-sata-disk.ldargs | 3 +- ...rgv-addr-non-isa-controller-on-slot-1.args | 3 +- .../bhyvexml2argv-addr-single-sata-disk.args | 3 +- ...bhyvexml2argv-addr-single-sata-disk.ldargs | 3 +- ...bhyvexml2argv-addr-single-virtio-disk.args | 3 +- ...yvexml2argv-addr-single-virtio-disk.ldargs | 3 +- .../bhyvexml2argvdata/bhyvexml2argv-base.args | 3 +- .../bhyvexml2argv-base.ldargs | 3 +- .../bhyvexml2argv-bhyveload-bootorder.args | 3 +- .../bhyvexml2argv-bhyveload-bootorder.ldargs | 3 +- .../bhyvexml2argv-bhyveload-bootorder1.args | 3 +- .../bhyvexml2argv-bhyveload-bootorder1.ldargs | 3 +- .../bhyvexml2argv-bhyveload-bootorder3.args | 3 +- .../bhyvexml2argv-bhyveload-bootorder3.ldargs | 3 +- .../bhyvexml2argv-bhyveload-explicitargs.args | 3 +- .../bhyvexml2argv-commandline.args | 5 +- .../bhyvexml2argv-commandline.ldargs | 3 +- ...gv-console-master-slave-not-specified.args | 3 +- ...-console-master-slave-not-specified.ldargs | 3 +- .../bhyvexml2argv-console.args | 3 +- .../bhyvexml2argv-console.ldargs | 3 +- .../bhyvexml2argv-cputopology.args | 3 +- .../bhyvexml2argv-cputopology.ldargs | 3 +- .../bhyvexml2argv-custom-loader.args | 3 +- .../bhyvexml2argv-disk-cdrom-grub.args | 3 +- .../bhyvexml2argv-disk-cdrom-grub.ldargs | 3 +- .../bhyvexml2argv-disk-cdrom.args | 3 +- .../bhyvexml2argv-disk-cdrom.ldargs | 3 +- .../bhyvexml2argv-disk-virtio.args | 3 +- .../bhyvexml2argv-disk-virtio.ldargs | 3 +- .../bhyvexml2argv-firmware-efi.args | 3 +- .../bhyvexml2argv-fs-9p-readonly.args | 3 +- .../bhyvexml2argv-fs-9p-readonly.ldargs | 3 +- .../bhyvexml2argv-fs-9p.args | 3 +- .../bhyvexml2argv-fs-9p.ldargs | 3 +- .../bhyvexml2argv-grub-bootorder.args | 3 +- .../bhyvexml2argv-grub-bootorder.ldargs | 3 +- .../bhyvexml2argv-grub-bootorder2.args | 3 +- .../bhyvexml2argv-grub-bootorder2.ldargs | 3 +- .../bhyvexml2argv-grub-defaults.args | 3 +- .../bhyvexml2argv-grub-defaults.ldargs | 3 +- .../bhyvexml2argv-input-xhci-tablet.args | 3 +- .../bhyvexml2argv-input-xhci-tablet.ldargs | 3 +- .../bhyvexml2argv-isa-controller.args | 3 +- .../bhyvexml2argv-isa-controller.ldargs | 3 +- .../bhyvexml2argv-localtime.args | 3 +- .../bhyvexml2argv-localtime.ldargs | 3 +- .../bhyvexml2argv-macaddr.args | 3 +- .../bhyvexml2argv-macaddr.ldargs | 3 +- .../bhyvexml2argvdata/bhyvexml2argv-msrs.args | 3 +- .../bhyvexml2argv-msrs.ldargs | 3 +- .../bhyvexml2argv-net-e1000.args | 3 +- .../bhyvexml2argv-net-e1000.ldargs | 3 +- .../bhyvexml2argv-serial-grub-nocons.args | 3 +- .../bhyvexml2argv-serial-grub-nocons.ldargs | 3 +- .../bhyvexml2argv-serial-grub.args | 3 +- .../bhyvexml2argv-serial-grub.ldargs | 3 +- .../bhyvexml2argv-serial.args | 3 +- .../bhyvexml2argv-serial.ldargs | 3 +- .../bhyvexml2argv-sound.args | 3 +- .../bhyvexml2argv-sound.ldargs | 3 +- .../bhyvexml2argvdata/bhyvexml2argv-uefi.args | 3 +- .../bhyvexml2argv-vnc-autoport.args | 3 +- .../bhyvexml2argv-vnc-password.args | 3 +- .../bhyvexml2argv-vnc-resolution.args | 3 +- .../bhyvexml2argv-vnc-vgaconf-io.args | 3 +- .../bhyvexml2argv-vnc-vgaconf-off.args | 3 +- .../bhyvexml2argv-vnc-vgaconf-on.args | 3 +- .../bhyvexml2argvdata/bhyvexml2argv-vnc.args | 3 +- .../bhyvexml2argv-wired.args | 3 +- .../bhyvexml2argv-wired.ldargs | 3 +- tests/bhyvexml2argvtest.c | 8 +- tests/commanddata/test26.log | 2 +- tests/commandtest.c | 5 +- tests/networkxml2firewalltest.c | 9 +- ...19_36ea_4111_8f0a_8c9a70e21366-define.argv | 5 +- ...019_36ea_4111_8f0a_8c9a70e21366-start.argv | 5 +- ...39_495e_4243_ad9f_beb3f14c23d9-define.argv | 5 +- ...d39_495e_4243_ad9f_beb3f14c23d9-start.argv | 5 +- ...16_1ca8_49ac_b176_871d16c13076-define.argv | 5 +- ...916_1ca8_49ac_b176_871d16c13076-start.argv | 5 +- tests/nodedevmdevctldata/mdevctl-create.argv | 4 +- .../mdevctl-list-defined.argv | 5 +- tests/nodedevmdevctldata/mdevctl-stop.argv | 4 +- .../nodedevmdevctldata/mdevctl-undefine.argv | 4 +- tests/nodedevmdevctltest.c | 35 +- tests/nwfilterebiptablestest.c | 35 +- .../comment-linux.args | 9 +- .../target-linux.args | 81 +-- tests/nwfilterxml2firewalltest.c | 151 +++-- .../aarch64-aavmf-virtio-mmio.args | 3 +- tests/qemuxml2argvdata/aarch64-acpi-uefi.args | 9 +- .../aarch64-cpu-passthrough.args | 3 +- ...fault-cpu-kvm-virt-4.2.aarch64-latest.args | 21 +- ...fault-cpu-tcg-virt-4.2.aarch64-latest.args | 21 +- .../aarch64-features-sve.aarch64-latest.args | 9 +- tests/qemuxml2argvdata/aarch64-gic-host.args | 3 +- .../aarch64-gic-none-tcg.args | 3 +- tests/qemuxml2argvdata/aarch64-gic-v2.args | 3 +- tests/qemuxml2argvdata/aarch64-gic-v3.args | 3 +- .../aarch64-kvm-32-on-64.args | 3 +- .../aarch64-noacpi-nouefi.args | 3 +- .../qemuxml2argvdata/aarch64-noacpi-uefi.args | 9 +- ...arch64-os-firmware-efi.aarch64-latest.args | 25 +- .../qemuxml2argvdata/aarch64-pci-serial.args | 3 +- .../aarch64-tpm.aarch64-latest.args | 9 +- .../aarch64-traditional-pci.args | 6 +- .../aarch64-usb-controller-nec-xhci.args | 3 +- .../aarch64-usb-controller-qemu-xhci.args | 3 +- .../aarch64-video-default.args | 3 +- .../aarch64-video-virtio-gpu-pci.args | 12 +- .../aarch64-virt-2.6-virtio-pci-default.args | 9 +- .../aarch64-virt-default-nic.args | 3 +- .../aarch64-virt-graphics.aarch64-latest.args | 43 +- .../aarch64-virt-headless.aarch64-latest.args | 43 +- .../qemuxml2argvdata/aarch64-virt-virtio.args | 3 +- .../aarch64-virtio-pci-default.args | 12 +- .../aarch64-virtio-pci-manual-addresses.args | 12 +- tests/qemuxml2argvdata/acpi-table.args | 3 +- .../arm-vexpressa9-basic.args | 6 +- .../arm-vexpressa9-nodevs.args | 3 +- .../arm-vexpressa9-virtio.args | 6 +- tests/qemuxml2argvdata/arm-virt-virtio.args | 3 +- tests/qemuxml2argvdata/audio-alsa-best.args | 3 +- .../audio-alsa-best.x86_64-latest.args | 17 +- tests/qemuxml2argvdata/audio-alsa-full.args | 29 - .../audio-alsa-full.x86_64-latest.args | 18 +- .../qemuxml2argvdata/audio-alsa-minimal.args | 3 +- .../audio-alsa-minimal.x86_64-latest.args | 12 +- .../audio-coreaudio-best.args | 3 +- .../audio-coreaudio-best.x86_64-latest.args | 17 +- .../audio-coreaudio-full.args | 29 - .../audio-coreaudio-full.x86_64-latest.args | 18 +- .../audio-coreaudio-minimal.args | 3 +- ...audio-coreaudio-minimal.x86_64-latest.args | 12 +- .../audio-default-nographics.args | 3 +- ...udio-default-nographics.x86_64-latest.args | 12 +- tests/qemuxml2argvdata/audio-default-sdl.args | 3 +- .../audio-default-sdl.x86_64-latest.args | 12 +- .../qemuxml2argvdata/audio-default-spice.args | 3 +- .../audio-default-spice.x86_64-latest.args | 12 +- tests/qemuxml2argvdata/audio-default-vnc.args | 3 +- .../audio-default-vnc.x86_64-latest.args | 12 +- tests/qemuxml2argvdata/audio-file-best.args | 3 +- .../audio-file-best.x86_64-latest.args | 17 +- tests/qemuxml2argvdata/audio-file-full.args | 29 - .../audio-file-full.x86_64-latest.args | 18 +- .../qemuxml2argvdata/audio-file-minimal.args | 3 +- .../audio-file-minimal.x86_64-latest.args | 12 +- .../audio-jack-full.x86_64-latest.args | 19 +- .../audio-jack-minimal.x86_64-latest.args | 12 +- .../audio-many-backends.x86_64-latest.args | 12 +- tests/qemuxml2argvdata/audio-none-best.args | 3 +- .../audio-none-best.x86_64-latest.args | 17 +- tests/qemuxml2argvdata/audio-none-full.args | 29 - .../audio-none-full.x86_64-latest.args | 17 +- .../qemuxml2argvdata/audio-none-minimal.args | 3 +- .../audio-none-minimal.x86_64-latest.args | 12 +- tests/qemuxml2argvdata/audio-oss-best.args | 3 +- .../audio-oss-best.x86_64-latest.args | 18 +- tests/qemuxml2argvdata/audio-oss-full.args | 31 - .../audio-oss-full.x86_64-latest.args | 19 +- tests/qemuxml2argvdata/audio-oss-minimal.args | 3 +- .../audio-oss-minimal.x86_64-latest.args | 12 +- .../audio-pulseaudio-best.args | 3 +- .../audio-pulseaudio-best.x86_64-latest.args | 18 +- .../audio-pulseaudio-full.args | 29 - .../audio-pulseaudio-full.x86_64-latest.args | 19 +- .../audio-pulseaudio-minimal.args | 3 +- ...udio-pulseaudio-minimal.x86_64-latest.args | 12 +- tests/qemuxml2argvdata/audio-sdl-best.args | 3 +- .../audio-sdl-best.x86_64-latest.args | 17 +- tests/qemuxml2argvdata/audio-sdl-full.args | 30 - .../audio-sdl-full.x86_64-latest.args | 18 +- tests/qemuxml2argvdata/audio-sdl-minimal.args | 3 +- .../audio-sdl-minimal.x86_64-latest.args | 12 +- tests/qemuxml2argvdata/audio-spice-best.args | 3 +- .../audio-spice-best.x86_64-latest.args | 17 +- tests/qemuxml2argvdata/audio-spice-full.args | 29 - .../audio-spice-full.x86_64-latest.args | 17 +- .../qemuxml2argvdata/audio-spice-minimal.args | 3 +- .../audio-spice-minimal.x86_64-latest.args | 12 +- tests/qemuxml2argvdata/autoindex.args | 15 +- .../qemuxml2argvdata/balloon-ccw-deflate.args | 3 +- .../qemuxml2argvdata/balloon-device-auto.args | 3 +- .../balloon-device-deflate-off.args | 3 +- .../balloon-device-deflate.args | 3 +- .../balloon-device-period.args | 3 +- tests/qemuxml2argvdata/balloon-device.args | 3 +- .../balloon-mmio-deflate.args | 3 +- tests/qemuxml2argvdata/bios-nvram-secure.args | 9 +- tests/qemuxml2argvdata/bios-nvram.args | 6 +- tests/qemuxml2argvdata/bios.args | 3 +- .../blkdeviotune-group-num.x86_64-4.1.0.args | 24 +- .../blkdeviotune-group-num.x86_64-latest.args | 28 +- .../blkdeviotune-max-length.x86_64-4.1.0.args | 26 +- ...blkdeviotune-max-length.x86_64-latest.args | 28 +- .../blkdeviotune-max.x86_64-4.1.0.args | 23 +- .../blkdeviotune-max.x86_64-latest.args | 28 +- tests/qemuxml2argvdata/blkiotune-device.args | 3 +- tests/qemuxml2argvdata/blkiotune.args | 3 +- tests/qemuxml2argvdata/boot-cdrom.args | 3 +- tests/qemuxml2argvdata/boot-complex.args | 15 +- tests/qemuxml2argvdata/boot-floppy-q35.args | 3 +- tests/qemuxml2argvdata/boot-floppy.args | 3 +- .../boot-menu-disable-drive.args | 3 +- tests/qemuxml2argvdata/boot-menu-disable.args | 3 +- .../boot-menu-enable-with-timeout.args | 3 +- tests/qemuxml2argvdata/boot-menu-enable.args | 3 +- tests/qemuxml2argvdata/boot-multi.args | 3 +- tests/qemuxml2argvdata/boot-network.args | 3 +- tests/qemuxml2argvdata/boot-order.args | 12 +- tests/qemuxml2argvdata/boot-strict.args | 15 +- tests/qemuxml2argvdata/channel-guestfwd.args | 3 +- tests/qemuxml2argvdata/channel-spicevmc.args | 9 +- .../channel-unix-guestfwd.x86_64-2.5.0.args | 6 +- .../channel-unix-guestfwd.x86_64-latest.args | 6 +- .../qemuxml2argvdata/channel-virtio-auto.args | 24 +- .../channel-virtio-autoadd.args | 24 +- .../channel-virtio-autoassign.args | 24 +- .../channel-virtio-default.args | 9 +- .../channel-virtio-state.args | 12 +- .../qemuxml2argvdata/channel-virtio-unix.args | 28 +- tests/qemuxml2argvdata/channel-virtio.args | 6 +- tests/qemuxml2argvdata/chardev-reconnect.args | 9 +- tests/qemuxml2argvdata/clock-catchup.args | 3 +- tests/qemuxml2argvdata/clock-france.args | 3 +- tests/qemuxml2argvdata/clock-hpet-off.args | 3 +- .../clock-localtime-basis-localtime.args | 3 +- tests/qemuxml2argvdata/clock-localtime.args | 3 +- tests/qemuxml2argvdata/clock-realtime.args | 3 +- .../clock-timer-armvtimer.aarch64-latest.args | 9 +- .../clock-timer-hyperv-rtc.args | 3 +- tests/qemuxml2argvdata/clock-utc.args | 3 +- tests/qemuxml2argvdata/clock-variable.args | 3 +- tests/qemuxml2argvdata/console-compat-2.xml | 103 --- .../qemuxml2argvdata/console-compat-auto.args | 3 +- .../console-compat-chardev.args | 3 +- tests/qemuxml2argvdata/console-compat.args | 3 +- tests/qemuxml2argvdata/console-sclp.args | 3 +- .../qemuxml2argvdata/console-virtio-ccw.args | 6 +- .../qemuxml2argvdata/console-virtio-many.args | 3 +- .../qemuxml2argvdata/console-virtio-s390.args | 3 +- .../console-virtio-unix.x86_64-2.5.0.args | 3 +- .../console-virtio-unix.x86_64-latest.args | 6 +- tests/qemuxml2argvdata/console-virtio.args | 3 +- tests/qemuxml2argvdata/controller-order.args | 21 +- .../controller-virtio-scsi.x86_64-latest.args | 51 +- tests/qemuxml2argvdata/cpu-Haswell-noTSX.args | 3 +- tests/qemuxml2argvdata/cpu-Haswell.args | 3 +- tests/qemuxml2argvdata/cpu-Haswell2.args | 3 +- tests/qemuxml2argvdata/cpu-Haswell3.args | 3 +- ...u-Icelake-Server-pconfig.x86_64-3.1.0.args | 6 +- ...-Icelake-Server-pconfig.x86_64-latest.args | 6 +- tests/qemuxml2argvdata/cpu-cache-disable.args | 3 +- .../qemuxml2argvdata/cpu-cache-disable2.args | 3 +- .../qemuxml2argvdata/cpu-cache-disable3.args | 6 +- .../cpu-cache-emulate-l3.args | 3 +- .../cpu-cache-passthrough.args | 3 +- .../cpu-cache-passthrough2.args | 3 +- .../cpu-check-default-none.args | 3 +- .../cpu-check-default-none2.args | 3 +- .../cpu-check-default-partial.args | 6 +- .../cpu-check-default-partial2.args | 3 +- tests/qemuxml2argvdata/cpu-check-none.args | 3 +- tests/qemuxml2argvdata/cpu-eoi-disabled.args | 3 +- tests/qemuxml2argvdata/cpu-eoi-enabled.args | 3 +- tests/qemuxml2argvdata/cpu-exact1.args | 3 +- .../cpu-exact2-nofallback.args | 6 +- tests/qemuxml2argvdata/cpu-exact2.args | 6 +- tests/qemuxml2argvdata/cpu-fallback.args | 3 +- tests/qemuxml2argvdata/cpu-host-kvmclock.args | 3 +- .../qemuxml2argvdata/cpu-host-model-cmt.args | 6 +- .../cpu-host-model-cmt.x86_64-4.0.0.args | 11 +- .../cpu-host-model-fallback.args | 6 +- .../cpu-host-model-vendor.args | 6 +- tests/qemuxml2argvdata/cpu-host-model.args | 6 +- .../cpu-host-passthrough-features.args | 3 +- .../cpu-host-passthrough.args | 3 +- .../qemuxml2argvdata/cpu-hotplug-startup.args | 3 +- tests/qemuxml2argvdata/cpu-kvmclock.args | 3 +- tests/qemuxml2argvdata/cpu-minimum1.args | 6 +- tests/qemuxml2argvdata/cpu-minimum2.args | 6 +- .../cpu-no-removed-features.args | 3 +- tests/qemuxml2argvdata/cpu-numa-disjoint.args | 3 +- .../qemuxml2argvdata/cpu-numa-memshared.args | 11 +- .../cpu-numa-no-memory-element.args | 3 +- tests/qemuxml2argvdata/cpu-numa1.args | 3 +- tests/qemuxml2argvdata/cpu-numa2.args | 3 +- tests/qemuxml2argvdata/cpu-s390-features.args | 3 +- tests/qemuxml2argvdata/cpu-s390-zEC12.args | 3 +- tests/qemuxml2argvdata/cpu-strict1.args | 6 +- tests/qemuxml2argvdata/cpu-topology1.args | 3 +- tests/qemuxml2argvdata/cpu-topology2.args | 3 +- tests/qemuxml2argvdata/cpu-topology3.args | 3 +- .../cpu-translation.x86_64-4.0.0.args | 10 +- .../cpu-translation.x86_64-latest.args | 10 +- tests/qemuxml2argvdata/cpu-tsc-frequency.args | 7 +- .../cpu-tsc-frequency.x86_64-4.0.0.args | 10 +- .../cpu-tsc-high-frequency.x86_64-latest.args | 11 +- .../cputune-cpuset-big-id.x86_64-latest.args | 12 +- tests/qemuxml2argvdata/cputune-numatune.args | 3 +- .../qemuxml2argvdata/cputune-zero-shares.args | 3 +- tests/qemuxml2argvdata/cputune.args | 3 +- tests/qemuxml2argvdata/debug-threads.args | 3 +- .../default-kvm-host-arch.args | 3 +- .../default-qemu-host-arch.args | 3 +- ...ult-video-type-aarch64.aarch64-latest.args | 12 +- ...default-video-type-ppc64.ppc64-latest.args | 9 +- ...ult-video-type-riscv64.riscv64-latest.args | 9 +- ...default-video-type-s390x.s390x-latest.args | 16 +- .../devices-acpi-index.x86_64-latest.args | 36 +- .../disk-aio-io_uring.x86_64-latest.args | 16 +- tests/qemuxml2argvdata/disk-aio.args | 9 +- .../disk-aio.x86_64-2.12.0.args | 15 +- .../disk-aio.x86_64-latest.args | 24 +- .../disk-arm-virtio-sd.aarch64-4.0.0.args | 9 +- .../disk-arm-virtio-sd.aarch64-latest.args | 18 +- ...-backing-chains-noindex.x86_64-2.12.0.args | 45 +- ...-backing-chains-noindex.x86_64-latest.args | 196 ++---- tests/qemuxml2argvdata/disk-blockio.args | 9 +- tests/qemuxml2argvdata/disk-boot-cdrom.args | 6 +- tests/qemuxml2argvdata/disk-boot-disk.args | 6 +- .../disk-cache.x86_64-1.5.3.args | 24 +- .../disk-cache.x86_64-2.12.0.args | 36 +- .../disk-cache.x86_64-2.6.0.args | 27 +- .../disk-cache.x86_64-2.7.0.args | 36 +- .../disk-cache.x86_64-latest.args | 61 +- .../disk-cdrom-bus-other.x86_64-latest.args | 15 +- ...m-empty-network-invalid.x86_64-latest.args | 6 +- .../qemuxml2argvdata/disk-cdrom-network.args | 12 +- .../disk-cdrom-network.x86_64-2.12.0.args | 15 +- .../disk-cdrom-network.x86_64-latest.args | 25 +- tests/qemuxml2argvdata/disk-cdrom-tray.args | 12 +- .../disk-cdrom-tray.x86_64-2.12.0.args | 15 +- .../disk-cdrom-tray.x86_64-latest.args | 28 +- tests/qemuxml2argvdata/disk-cdrom.args | 3 +- .../disk-cdrom.x86_64-2.12.0.args | 9 +- .../disk-cdrom.x86_64-latest.args | 18 +- tests/qemuxml2argvdata/disk-copy_on_read.args | 15 +- .../disk-copy_on_read.x86_64-2.12.0.args | 18 +- .../disk-copy_on_read.x86_64-latest.args | 28 +- .../qemuxml2argvdata/disk-detect-zeroes.args | 36 - .../disk-detect-zeroes.x86_64-2.12.0.args | 15 +- .../disk-detect-zeroes.x86_64-latest.args | 22 +- .../disk-discard.x86_64-4.1.0.args | 15 +- .../disk-discard.x86_64-latest.args | 22 +- .../disk-error-policy-s390x.s390x-2.12.0.args | 24 +- .../disk-error-policy-s390x.s390x-latest.args | 42 +- tests/qemuxml2argvdata/disk-error-policy.args | 12 +- .../disk-error-policy.x86_64-2.12.0.args | 24 +- .../disk-error-policy.x86_64-latest.args | 39 +- .../disk-floppy-q35-2_11.x86_64-2.12.0.args | 9 +- .../disk-floppy-q35-2_11.x86_64-latest.args | 24 +- .../disk-floppy-q35-2_9.x86_64-2.12.0.args | 9 +- .../disk-floppy-q35-2_9.x86_64-latest.args | 24 +- tests/qemuxml2argvdata/disk-floppy-tray.args | 3 +- tests/qemuxml2argvdata/disk-floppy.args | 3 +- .../disk-floppy.x86_64-2.12.0.args | 6 +- .../disk-floppy.x86_64-latest.args | 24 +- tests/qemuxml2argvdata/disk-fmt-qcow.args | 6 +- tests/qemuxml2argvdata/disk-geometry.args | 6 +- tests/qemuxml2argvdata/disk-ide-split.args | 6 +- tests/qemuxml2argvdata/disk-ide-wwn.args | 6 +- tests/qemuxml2argvdata/disk-ioeventfd.args | 15 +- tests/qemuxml2argvdata/disk-iscsi.args | 7 +- .../disk-metadata-cache.x86_64-latest.args | 36 +- .../disk-network-gluster.args | 24 +- .../disk-network-gluster.x86_64-2.12.0.args | 27 +- .../disk-network-gluster.x86_64-latest.args | 38 +- .../disk-network-http.x86_64-latest.args | 55 +- .../disk-network-iscsi-modern.args | 57 +- .../qemuxml2argvdata/disk-network-iscsi.args | 35 +- .../disk-network-iscsi.x86_64-2.12.0.args | 51 +- .../disk-network-iscsi.x86_64-latest.args | 66 +- tests/qemuxml2argvdata/disk-network-nbd.args | 24 +- .../disk-network-nbd.x86_64-2.12.0.args | 27 +- .../disk-network-nbd.x86_64-latest.args | 55 +- .../disk-network-nfs.x86_64-latest.args | 36 +- .../disk-network-rbd.x86_64-2.12.0.args | 51 +- .../disk-network-rbd.x86_64-2.5.0.args | 44 +- .../disk-network-rbd.x86_64-latest.args | 76 +-- .../disk-network-sheepdog.args | 9 +- .../disk-network-sheepdog.x86_64-2.12.0.args | 12 +- .../disk-network-sheepdog.x86_64-latest.args | 22 +- .../disk-network-source-auth.args | 26 +- ...isk-network-source-auth.x86_64-2.12.0.args | 42 +- ...isk-network-source-auth.x86_64-latest.args | 55 +- ...isk-network-tlsx509-nbd.x86_64-2.12.0.args | 20 +- ...disk-network-tlsx509-nbd.x86_64-5.2.0.args | 29 +- ...isk-network-tlsx509-nbd.x86_64-latest.args | 26 +- ...sk-network-tlsx509-vxhs.x86_64-2.12.0.args | 44 +- ...isk-network-tlsx509-vxhs.x86_64-5.0.0.args | 61 +- .../disk-network-tlsx509.x86_64-2.12.0.args | 71 -- tests/qemuxml2argvdata/disk-network-vxhs.args | 10 +- tests/qemuxml2argvdata/disk-no-boot.args | 6 +- .../disk-nvme.x86_64-latest.args | 49 +- tests/qemuxml2argvdata/disk-order.args | 12 +- .../qemuxml2argvdata/disk-readonly-disk.args | 3 +- .../disk-readonly-disk.x86_64-2.12.0.args | 6 +- .../disk-readonly-disk.x86_64-latest.args | 18 +- .../disk-rotation.x86_64-latest.args | 35 +- tests/qemuxml2argvdata/disk-sata-device.args | 3 +- .../disk-scsi-device-auto.x86_64-1.5.3.args | 3 +- .../disk-scsi-device-auto.x86_64-latest.args | 21 +- .../disk-scsi-disk-split.args | 21 +- .../qemuxml2argvdata/disk-scsi-disk-vpd.args | 15 +- .../qemuxml2argvdata/disk-scsi-disk-wwn.args | 12 +- .../disk-scsi-lun-passthrough.args | 9 +- .../disk-scsi.x86_64-latest.args | 58 +- tests/qemuxml2argvdata/disk-serial.args | 9 +- .../disk-shared.x86_64-2.12.0.args | 21 +- .../disk-shared.x86_64-latest.args | 46 +- .../disk-slices.x86_64-latest.args | 81 +-- tests/qemuxml2argvdata/disk-snapshot.args | 12 +- .../disk-source-pool-mode.args | 12 +- tests/qemuxml2argvdata/disk-source-pool.args | 18 +- .../disk-transient.x86_64-latest.args | 17 +- .../disk-usb-device-removable.args | 6 +- tests/qemuxml2argvdata/disk-usb-device.args | 3 +- .../disk-vhostuser.x86_64-latest.args | 15 +- .../disk-virtio-ccw-many.args | 15 +- tests/qemuxml2argvdata/disk-virtio-ccw.args | 6 +- .../qemuxml2argvdata/disk-virtio-queues.args | 6 +- .../disk-virtio-s390-zpci.args | 6 +- tests/qemuxml2argvdata/disk-virtio-s390.args | 3 +- ...irtio-scsi-reservations.x86_64-2.12.0.args | 24 +- ...virtio-scsi-reservations.x86_64-5.2.0.args | 35 +- ...irtio-scsi-reservations.x86_64-latest.args | 32 +- tests/qemuxml2argvdata/disk-virtio.args | 12 +- .../encrypted-disk-usage.args | 17 +- tests/qemuxml2argvdata/encrypted-disk.args | 17 +- .../eoi-disabled.x86_64-2.7.0.args | 6 +- .../eoi-disabled.x86_64-4.0.0.args | 6 +- .../eoi-disabled.x86_64-latest.args | 6 +- .../eoi-enabled.x86_64-2.7.0.args | 6 +- .../eoi-enabled.x86_64-4.0.0.args | 6 +- .../eoi-enabled.x86_64-latest.args | 6 +- tests/qemuxml2argvdata/event_idx.args | 15 +- .../fd-memory-no-numa-topology.args | 3 +- .../fd-memory-numa-topology.args | 7 +- .../fd-memory-numa-topology2.args | 11 +- .../fd-memory-numa-topology3.args | 15 +- .../fips-enabled.x86_64-5.1.0.args | 12 +- .../fips-enabled.x86_64-latest.args | 12 +- tests/qemuxml2argvdata/floppy-drive-fat.args | 3 +- .../floppy-drive-fat.x86_64-2.12.0.args | 6 +- .../floppy-drive-fat.x86_64-latest.args | 12 +- tests/qemuxml2argvdata/fs9p-ccw.args | 18 +- .../fs9p-ccw.s390x-latest.args | 30 +- tests/qemuxml2argvdata/fs9p.args | 15 +- .../qemuxml2argvdata/fs9p.x86_64-latest.args | 18 +- .../genid-auto.x86_64-latest.args | 6 +- .../qemuxml2argvdata/genid.x86_64-latest.args | 6 +- ...egl-headless-rendernode.x86_64-latest.args | 12 +- .../graphics-egl-headless.args | 3 +- .../graphics-egl-headless.x86_64-latest.args | 12 +- .../graphics-sdl-fullscreen.args | 3 +- tests/qemuxml2argvdata/graphics-sdl.args | 3 +- .../graphics-spice-agent-file-xfer.args | 7 +- .../graphics-spice-agentmouse.args | 9 +- .../graphics-spice-auto-socket-cfg.args | 6 +- .../graphics-spice-auto-socket.args | 6 +- .../graphics-spice-compression.args | 8 +- .../graphics-spice-egl-headless.args | 3 +- ...pice-gl-auto-rendernode.x86_64-latest.args | 6 +- .../graphics-spice-no-args.args | 3 +- .../graphics-spice-qxl-vga.args | 6 +- .../qemuxml2argvdata/graphics-spice-sasl.args | 6 +- .../graphics-spice-socket.args | 3 +- .../graphics-spice-timeout.args | 18 +- .../graphics-spice-usb-redir.args | 12 +- tests/qemuxml2argvdata/graphics-spice.args | 9 +- .../graphics-vnc-auto-socket-cfg.args | 3 +- .../graphics-vnc-auto-socket.args | 3 +- .../graphics-vnc-egl-headless.args | 3 +- .../graphics-vnc-no-listen-attr.args | 3 +- tests/qemuxml2argvdata/graphics-vnc-none.args | 3 +- .../qemuxml2argvdata/graphics-vnc-policy.args | 3 +- .../graphics-vnc-power.x86_64-latest.args | 12 +- .../graphics-vnc-remove-generated-socket.args | 3 +- tests/qemuxml2argvdata/graphics-vnc-sasl.args | 3 +- .../graphics-vnc-socket-new-cmdline.args | 3 +- .../qemuxml2argvdata/graphics-vnc-socket.args | 3 +- .../graphics-vnc-tls-secret.x86_64-5.2.0.args | 16 +- ...graphics-vnc-tls-secret.x86_64-latest.args | 14 +- tests/qemuxml2argvdata/graphics-vnc-tls.args | 3 +- .../graphics-vnc-tls.x86_64-2.4.0.args | 3 +- .../graphics-vnc-tls.x86_64-latest.args | 9 +- .../graphics-vnc-websocket.args | 3 +- tests/qemuxml2argvdata/graphics-vnc.args | 3 +- ...tdev-mdev-display-ramfb.x86_64-latest.args | 13 +- ...play-spice-egl-headless.x86_64-latest.args | 13 +- ...ev-display-spice-opengl.x86_64-latest.args | 13 +- ...isplay-vnc-egl-headless.x86_64-latest.args | 13 +- ...ostdev-mdev-display-vnc.x86_64-latest.args | 13 +- .../hostdev-mdev-precreated.args | 7 +- .../hostdev-pci-address-device.args | 3 +- .../hostdev-pci-address-unassigned.args | 3 +- .../qemuxml2argvdata/hostdev-pci-address.args | 3 +- .../hostdev-pci-multifunction.args | 3 +- tests/qemuxml2argvdata/hostdev-scsi-boot.xml | 34 - .../hostdev-scsi-lsi.x86_64-2.8.0.args | 18 +- .../hostdev-scsi-lsi.x86_64-4.1.0.args | 32 +- .../hostdev-scsi-lsi.x86_64-latest.args | 44 +- .../hostdev-scsi-vhost-scsi-ccw.args | 9 +- .../hostdev-scsi-vhost-scsi-pci.args | 6 +- .../hostdev-scsi-vhost-scsi-pcie.args | 9 +- ...hostdev-scsi-virtio-scsi.x86_64-2.8.0.args | 43 +- ...hostdev-scsi-virtio-scsi.x86_64-4.1.0.args | 58 +- ...ostdev-scsi-virtio-scsi.x86_64-latest.args | 69 +- ...tdev-subsys-mdev-vfio-ap.s390x-latest.args | 12 +- ...ubsys-mdev-vfio-ccw-boot.s390x-latest.args | 13 +- .../hostdev-subsys-mdev-vfio-ccw.args | 7 +- .../hostdev-usb-address-device-boot.args | 6 +- .../hostdev-usb-address-device.args | 3 +- .../qemuxml2argvdata/hostdev-usb-address.args | 3 +- .../hostdev-vfio-multidomain.args | 3 +- .../hostdev-vfio-zpci-autogenerate-fids.args | 3 +- .../hostdev-vfio-zpci-autogenerate-uids.args | 3 +- .../hostdev-vfio-zpci-autogenerate.args | 3 +- .../hostdev-vfio-zpci-boundaries.args | 3 +- .../hostdev-vfio-zpci-ccw-memballoon.args | 3 +- .../hostdev-vfio-zpci-multidomain-many.args | 3 +- tests/qemuxml2argvdata/hostdev-vfio-zpci.args | 3 +- tests/qemuxml2argvdata/hostdev-vfio.args | 3 +- tests/qemuxml2argvdata/hotplug-base.args | 3 +- .../hugepages-default-2M.args | 3 +- .../hugepages-default-system-size.args | 3 +- tests/qemuxml2argvdata/hugepages-default.args | 3 +- .../qemuxml2argvdata/hugepages-memaccess.args | 23 +- .../hugepages-memaccess2.args | 23 +- .../hugepages-memaccess3.x86_64-latest.args | 18 +- tests/qemuxml2argvdata/hugepages-nodeset.args | 3 +- .../hugepages-numa-default-2M.args | 3 +- .../hugepages-numa-default-dimm.args | 7 +- .../hugepages-numa-default.args | 3 +- .../hugepages-numa-nodeset-part.args | 7 +- .../hugepages-numa-nodeset.args | 19 +- .../hugepages-nvdimm.x86_64-latest.args | 13 +- tests/qemuxml2argvdata/hugepages-shared.args | 19 +- .../hyperv-off.x86_64-4.0.0.args | 6 +- .../hyperv-off.x86_64-latest.args | 6 +- .../hyperv-panic.x86_64-4.0.0.args | 6 +- .../hyperv-panic.x86_64-latest.args | 6 +- .../hyperv-stimer-direct.x86_64-latest.args | 6 +- .../qemuxml2argvdata/hyperv.x86_64-4.0.0.args | 10 +- .../hyperv.x86_64-latest.args | 10 +- .../qemuxml2argvdata/input-usbmouse-addr.args | 3 +- tests/qemuxml2argvdata/input-usbmouse.args | 3 +- tests/qemuxml2argvdata/input-usbtablet.args | 3 +- tests/qemuxml2argvdata/input-virtio-ccw.args | 6 +- .../intel-iommu-aw-bits.x86_64-latest.args | 9 +- ...ntel-iommu-caching-mode.x86_64-latest.args | 9 +- ...ntel-iommu-device-iotlb.x86_64-latest.args | 9 +- .../intel-iommu-eim.x86_64-latest.args | 9 +- .../intel-iommu.x86_64-2.6.0.args | 6 +- .../intel-iommu.x86_64-latest.args | 6 +- .../iommu-smmuv3.aarch64-latest.args | 9 +- .../iothreads-disk-virtio-ccw.args | 9 +- tests/qemuxml2argvdata/iothreads-disk.args | 15 +- .../iothreads-ids-partial.args | 3 +- tests/qemuxml2argvdata/iothreads-ids.args | 3 +- ...othreads-virtio-scsi-ccw.s390x-latest.args | 27 +- ...othreads-virtio-scsi-pci.x86_64-5.2.0.args | 35 +- ...threads-virtio-scsi-pci.x86_64-latest.args | 32 +- tests/qemuxml2argvdata/iothreads.args | 3 +- tests/qemuxml2argvdata/kvm-features-off.args | 3 +- tests/qemuxml2argvdata/kvm-features.args | 3 +- tests/qemuxml2argvdata/kvm-pit-delay.args | 3 +- tests/qemuxml2argvdata/kvm-pit-discard.args | 3 +- .../kvmclock+eoi-disabled.x86_64-2.7.0.args | 6 +- .../kvmclock+eoi-disabled.x86_64-4.0.0.args | 6 +- .../kvmclock+eoi-disabled.x86_64-latest.args | 6 +- tests/qemuxml2argvdata/kvmclock.args | 3 +- ...v-missing-platform-info.x86_64-2.12.0.args | 10 +- .../launch-security-sev.x86_64-2.12.0.args | 10 +- .../luks-disks-source-qcow2.args | 74 +- .../luks-disks-source-qcow2.x86_64-5.2.0.args | 113 +--- ...luks-disks-source-qcow2.x86_64-latest.args | 110 +-- tests/qemuxml2argvdata/luks-disks-source.args | 63 +- tests/qemuxml2argvdata/luks-disks.args | 28 +- .../mach-virt-console-virtio.args | 3 +- .../mach-virt-serial-native.args | 3 +- .../mach-virt-serial-pci.args | 3 +- .../mach-virt-serial-usb.args | 6 +- .../machine-aeskeywrap-off-cap.args | 9 +- .../machine-aeskeywrap-off-caps.args | 9 +- .../machine-aeskeywrap-on-cap.args | 6 +- .../machine-aeskeywrap-on-caps.args | 6 +- tests/qemuxml2argvdata/machine-aliases1.args | 3 +- tests/qemuxml2argvdata/machine-aliases2.args | 3 +- tests/qemuxml2argvdata/machine-core-off.args | 3 +- tests/qemuxml2argvdata/machine-core-on.args | 3 +- .../machine-deakeywrap-off-cap.args | 9 +- .../machine-deakeywrap-off-caps.args | 9 +- .../machine-deakeywrap-on-cap.args | 6 +- .../machine-deakeywrap-on-caps.args | 6 +- .../machine-keywrap-none-caps.args | 6 +- .../machine-keywrap-none.args | 6 +- ...ine-loadparm-multiple-disks-nets-s390.args | 18 +- .../machine-loadparm-net-s390.args | 6 +- .../machine-loadparm-s390.args | 6 +- tests/qemuxml2argvdata/machine-smm-opt.args | 6 +- .../qemuxml2argvdata/machine-vmport-opt.args | 3 +- tests/qemuxml2argvdata/master-key.args | 6 +- ...memory-default-hugepage.x86_64-latest.args | 10 +- .../memfd-memory-numa.x86_64-latest.args | 10 +- .../memory-hotplug-dimm-addr.args | 7 +- .../qemuxml2argvdata/memory-hotplug-dimm.args | 7 +- ...y-hotplug-nvdimm-access.x86_64-latest.args | 15 +- ...ory-hotplug-nvdimm-align.x86_64-5.2.0.args | 15 +- ...ry-hotplug-nvdimm-align.x86_64-latest.args | 16 +- ...ory-hotplug-nvdimm-label.x86_64-5.2.0.args | 15 +- ...ry-hotplug-nvdimm-label.x86_64-latest.args | 15 +- ...mory-hotplug-nvdimm-pmem.x86_64-5.2.0.args | 15 +- ...ory-hotplug-nvdimm-pmem.x86_64-latest.args | 15 +- ...emory-hotplug-nvdimm-ppc64-abi-update.args | 9 +- .../memory-hotplug-nvdimm-ppc64.args | 9 +- ...-hotplug-nvdimm-readonly.x86_64-5.2.0.args | 15 +- ...hotplug-nvdimm-readonly.x86_64-latest.args | 15 +- .../memory-hotplug-nvdimm.x86_64-latest.args | 15 +- ...emory-hotplug-ppc64-nonuma-abi-update.args | 3 +- .../memory-hotplug-ppc64-nonuma.args | 3 +- ...mory-hotplug-virtio-pmem.x86_64-5.2.0.args | 18 +- ...ory-hotplug-virtio-pmem.x86_64-latest.args | 18 +- tests/qemuxml2argvdata/memory-hotplug.args | 3 +- tests/qemuxml2argvdata/memtune-unlimited.args | 3 +- tests/qemuxml2argvdata/memtune.args | 3 +- .../migrate-numa-unaligned.args | 12 +- tests/qemuxml2argvdata/migrate.args | 3 +- .../minimal-msg-timestamp.args | 3 +- tests/qemuxml2argvdata/minimal-sandbox.args | 6 +- tests/qemuxml2argvdata/minimal.args | 3 +- tests/qemuxml2argvdata/misc-acpi.args | 3 +- tests/qemuxml2argvdata/misc-disable-s3.args | 3 +- .../misc-disable-suspends.args | 3 +- tests/qemuxml2argvdata/misc-enable-s4.args | 3 +- tests/qemuxml2argvdata/misc-no-reboot.args | 3 +- tests/qemuxml2argvdata/misc-uuid.args | 3 +- .../mlock-off.x86_64-3.0.0.args | 6 +- .../mlock-off.x86_64-latest.args | 6 +- .../mlock-on.x86_64-3.0.0.args | 6 +- .../mlock-on.x86_64-latest.args | 6 +- tests/qemuxml2argvdata/monitor-json.args | 3 +- .../multifunction-pci-device.args | 6 +- tests/qemuxml2argvdata/name-escape.args | 23 +- tests/qemuxml2argvdata/net-client.args | 6 +- tests/qemuxml2argvdata/net-eth-hostip.args | 6 +- tests/qemuxml2argvdata/net-eth-ifname.args | 6 +- tests/qemuxml2argvdata/net-eth-names.args | 6 +- .../net-eth-unmanaged-tap.args | 6 +- tests/qemuxml2argvdata/net-eth.args | 6 +- .../net-hostdev-bootorder.args | 3 +- .../net-hostdev-multidomain.args | 3 +- .../net-hostdev-vfio-multidomain.args | 3 +- tests/qemuxml2argvdata/net-hostdev-vfio.args | 3 +- tests/qemuxml2argvdata/net-hostdev.args | 3 +- tests/qemuxml2argvdata/net-many-models.args | 18 +- tests/qemuxml2argvdata/net-mcast.args | 6 +- tests/qemuxml2argvdata/net-server.args | 6 +- tests/qemuxml2argvdata/net-udp.args | 6 +- tests/qemuxml2argvdata/net-user-addr.args | 9 +- tests/qemuxml2argvdata/net-user.args | 6 +- .../net-user.x86_64-4.0.0.args | 9 +- .../net-vdpa.x86_64-latest.args | 9 +- .../net-vhostuser-multiq.args | 18 +- tests/qemuxml2argvdata/net-vhostuser.args | 9 +- .../net-vhostuser.x86_64-2.5.0.args | 12 +- .../net-vhostuser.x86_64-latest.args | 15 +- tests/qemuxml2argvdata/net-virtio-ccw.args | 9 +- tests/qemuxml2argvdata/net-virtio-device.args | 6 +- .../net-virtio-disable-offloads.args | 8 +- tests/qemuxml2argvdata/net-virtio-netdev.args | 6 +- .../net-virtio-rxtxqueuesize.args | 6 +- tests/qemuxml2argvdata/net-virtio-s390.args | 3 +- .../net-virtio-teaming-hostdev.args | 15 +- .../qemuxml2argvdata/net-virtio-teaming.args | 15 +- tests/qemuxml2argvdata/net-virtio.args | 6 +- tests/qemuxml2argvdata/nosharepages.args | 3 +- .../numad-auto-memory-vcpu-cpuset.args | 3 +- ...o-memory-vcpu-no-cpuset-and-placement.args | 3 +- .../numad-auto-vcpu-static-numatune.args | 3 +- .../numad-static-memory-auto-vcpu.args | 3 +- tests/qemuxml2argvdata/numad.args | 3 +- .../numatune-auto-nodeset-invalid.args | 3 +- .../numatune-auto-prefer.args | 3 +- .../qemuxml2argvdata/numatune-distances.args | 3 +- .../numatune-hmat.x86_64-latest.args | 18 +- .../numatune-memnode-no-memory.args | 6 +- tests/qemuxml2argvdata/numatune-memnode.args | 12 +- .../numatune-memnode.x86_64-5.2.0.args | 15 +- .../numatune-memnode.x86_64-latest.args | 15 +- tests/qemuxml2argvdata/numatune-memory.args | 3 +- tests/qemuxml2argvdata/numatune-no-vcpu.args | 3 +- .../os-firmware-bios.x86_64-latest.args | 12 +- ...re-efi-no-enrolled-keys.x86_64-latest.args | 28 +- ...os-firmware-efi-secboot.x86_64-latest.args | 28 +- .../os-firmware-efi.x86_64-latest.args | 28 +- .../qemuxml2argvdata/pages-dimm-discard.args | 11 +- .../pages-discard-hugepages.args | 3 +- tests/qemuxml2argvdata/pages-discard.args | 3 +- tests/qemuxml2argvdata/panic-double.args | 3 +- tests/qemuxml2argvdata/panic-no-address.args | 3 +- tests/qemuxml2argvdata/panic.args | 3 +- .../parallel-parport-chardev.args | 3 +- .../parallel-tcp-chardev.args | 3 +- .../parallel-unix-chardev.x86_64-2.5.0.args | 3 +- .../parallel-unix-chardev.x86_64-latest.args | 6 +- tests/qemuxml2argvdata/pci-autoadd-addr.args | 6 +- tests/qemuxml2argvdata/pci-autoadd-idx.args | 6 +- tests/qemuxml2argvdata/pci-autofill-addr.args | 9 +- .../pci-bridge-many-disks.args | 633 ++++++------------ tests/qemuxml2argvdata/pci-bridge.args | 75 +-- tests/qemuxml2argvdata/pci-expander-bus.args | 72 +- tests/qemuxml2argvdata/pci-many.args | 174 ++--- tests/qemuxml2argvdata/pci-rom-disabled.args | 6 +- tests/qemuxml2argvdata/pci-rom.args | 12 +- .../pci-serial-dev-chardev.args | 3 +- tests/qemuxml2argvdata/pcie-expander-bus.args | 84 +-- .../pcie-root-port-model-generic.args | 6 +- .../pcie-root-port-model-ioh3420.args | 6 +- ...cie-root-port-nohotplug.x86_64-latest.args | 21 +- tests/qemuxml2argvdata/pcie-root-port.args | 9 +- tests/qemuxml2argvdata/pcie-root.args | 3 +- .../pcie-switch-downstream-port.args | 6 +- .../pcie-switch-upstream-port.args | 9 +- tests/qemuxml2argvdata/pcihole64-q35.args | 6 +- tests/qemuxml2argvdata/pcihole64.args | 3 +- tests/qemuxml2argvdata/pmu-feature-off.args | 3 +- tests/qemuxml2argvdata/pmu-feature.args | 3 +- tests/qemuxml2argvdata/ppc-dtb.args | 3 +- ...ault-cpu-kvm-pseries-2.7.ppc64-latest.args | 18 +- ...ault-cpu-kvm-pseries-3.1.ppc64-latest.args | 18 +- ...ault-cpu-kvm-pseries-4.2.ppc64-latest.args | 18 +- ...ault-cpu-tcg-pseries-2.7.ppc64-latest.args | 18 +- ...ault-cpu-tcg-pseries-3.1.ppc64-latest.args | 18 +- ...ault-cpu-tcg-pseries-4.2.ppc64-latest.args | 18 +- .../ppc64-pseries-graphics.ppc64-latest.args | 24 +- .../ppc64-pseries-headless.ppc64-latest.args | 24 +- .../ppc64-tpmproxy-single.ppc64-latest.args | 9 +- .../ppc64-tpmproxy-with-tpm.ppc64-latest.args | 9 +- .../ppc64-usb-controller-legacy.args | 3 +- .../ppc64-usb-controller-qemu-xhci.args | 3 +- .../ppc64-usb-controller.args | 3 +- tests/qemuxml2argvdata/ppce500-serial.args | 3 +- tests/qemuxml2argvdata/pseries-basic.args | 3 +- .../pseries-console-virtio.args | 3 +- .../pseries-cpu-compat-power9.args | 3 +- .../qemuxml2argvdata/pseries-cpu-compat.args | 3 +- tests/qemuxml2argvdata/pseries-cpu-exact.args | 3 +- tests/qemuxml2argvdata/pseries-cpu-le.args | 3 +- tests/qemuxml2argvdata/pseries-features.args | 7 +- .../qemuxml2argvdata/pseries-hostdevs-1.args | 3 +- .../qemuxml2argvdata/pseries-hostdevs-2.args | 3 +- .../qemuxml2argvdata/pseries-hostdevs-3.args | 3 +- .../pseries-machine-max-cpu-compat.args | 3 +- .../pseries-many-buses-1.args | 3 +- .../pseries-many-buses-2.args | 3 +- .../pseries-many-devices.args | 3 +- tests/qemuxml2argvdata/pseries-nvram.args | 3 +- .../pseries-panic-missing.args | 3 +- .../pseries-panic-no-address.args | 3 +- .../pseries-phb-default-missing.args | 3 +- .../pseries-phb-numa-node.args | 9 +- .../qemuxml2argvdata/pseries-phb-simple.args | 3 +- .../pseries-serial-native.args | 3 +- .../qemuxml2argvdata/pseries-serial-pci.args | 3 +- .../qemuxml2argvdata/pseries-serial-usb.args | 3 +- .../qemuxml2argvdata/pseries-usb-default.args | 3 +- tests/qemuxml2argvdata/pseries-usb-kbd.args | 3 +- tests/qemuxml2argvdata/pseries-usb-multi.args | 3 +- .../pseries-vio-user-assigned.args | 6 +- tests/qemuxml2argvdata/pseries-vio.args | 6 +- .../pv-spinlock-disabled.x86_64-2.7.0.args | 6 +- .../pv-spinlock-disabled.x86_64-4.0.0.args | 6 +- .../pv-spinlock-disabled.x86_64-latest.args | 6 +- .../pv-spinlock-enabled.x86_64-2.7.0.args | 6 +- .../pv-spinlock-enabled.x86_64-4.0.0.args | 6 +- .../pv-spinlock-enabled.x86_64-latest.args | 6 +- tests/qemuxml2argvdata/q35-acpi-nouefi.args | 3 +- tests/qemuxml2argvdata/q35-acpi-uefi.args | 9 +- .../q35-default-devices-only.args | 6 +- tests/qemuxml2argvdata/q35-multifunction.args | 18 +- tests/qemuxml2argvdata/q35-noacpi-nouefi.args | 3 +- .../q35-pci-force-address.args | 6 +- tests/qemuxml2argvdata/q35-pcie-autoadd.args | 27 +- tests/qemuxml2argvdata/q35-pcie.args | 27 +- .../q35-pm-disable-fallback.args | 3 +- tests/qemuxml2argvdata/q35-pm-disable.args | 3 +- tests/qemuxml2argvdata/q35-usb2-multi.args | 15 +- tests/qemuxml2argvdata/q35-usb2-reorder.args | 15 +- tests/qemuxml2argvdata/q35-usb2.args | 9 +- .../q35-virt-manager-basic.args | 31 +- tests/qemuxml2argvdata/q35-virtio-pci.args | 27 +- tests/qemuxml2argvdata/q35.args | 9 +- tests/qemuxml2argvdata/qemu-ns-alt.args | 3 +- .../qemu-ns-commandline-ns0.args | 6 +- .../qemu-ns-commandline-ns1.args | 6 +- .../qemuxml2argvdata/qemu-ns-commandline.args | 6 +- .../qemu-ns-domain-commandline-ns0.args | 6 +- .../qemu-ns-domain-commandline.args | 6 +- .../qemuxml2argvdata/qemu-ns-domain-ns0.args | 6 +- tests/qemuxml2argvdata/qemu-ns-no-env.args | 3 +- .../qemu-ns.x86_64-4.0.0.args | 12 +- .../qemu-ns.x86_64-latest.args | 12 +- .../reboot-timeout-disabled.args | 3 +- .../reboot-timeout-enabled.args | 3 +- tests/qemuxml2argvdata/restore-v2-fd.args | 3 +- tests/qemuxml2argvdata/restore-v2.args | 3 +- .../riscv64-virt-graphics.riscv64-latest.args | 24 +- .../riscv64-virt-headless.riscv64-latest.args | 24 +- tests/qemuxml2argvdata/riscv64-virt-pci.args | 9 +- tests/qemuxml2argvdata/riscv64-virt.args | 6 +- .../s390-allow-bogus-usb-controller.args | 3 +- .../s390-allow-bogus-usb-none.args | 3 +- ...t-cpu-kvm-ccw-virtio-2.7.s390x-latest.args | 9 +- ...t-cpu-kvm-ccw-virtio-4.2.s390x-latest.args | 16 +- ...t-cpu-tcg-ccw-virtio-2.7.s390x-latest.args | 9 +- ...t-cpu-tcg-ccw-virtio-4.2.s390x-latest.args | 9 +- .../qemuxml2argvdata/s390-panic-missing.args | 3 +- .../s390-panic-no-address.args | 3 +- tests/qemuxml2argvdata/s390-serial-2.args | 3 +- .../qemuxml2argvdata/s390-serial-console.args | 3 +- tests/qemuxml2argvdata/s390-serial.args | 3 +- .../s390x-ccw-graphics.s390x-latest.args | 24 +- .../s390x-ccw-headless.s390x-latest.args | 24 +- tests/qemuxml2argvdata/seclabel-dac-none.args | 3 +- .../seclabel-dynamic-baselabel.args | 3 +- .../seclabel-dynamic-labelskip.args | 3 +- .../seclabel-dynamic-override.args | 3 +- .../seclabel-dynamic-relabel.args | 3 +- tests/qemuxml2argvdata/seclabel-dynamic.args | 3 +- tests/qemuxml2argvdata/seclabel-none.args | 3 +- .../seclabel-static-labelskip.args | 3 +- .../seclabel-static-relabel.args | 3 +- tests/qemuxml2argvdata/seclabel-static.args | 3 +- .../serial-dev-chardev-iobase.args | 3 +- .../qemuxml2argvdata/serial-dev-chardev.args | 3 +- .../qemuxml2argvdata/serial-file-chardev.args | 3 +- tests/qemuxml2argvdata/serial-file-log.args | 6 +- .../qemuxml2argvdata/serial-many-chardev.args | 3 +- .../qemuxml2argvdata/serial-pty-chardev.args | 3 +- .../serial-spiceport-nospice.args | 3 +- tests/qemuxml2argvdata/serial-spiceport.args | 9 +- .../qemuxml2argvdata/serial-tcp-chardev.args | 3 +- .../serial-tcp-telnet-chardev.args | 6 +- .../serial-tcp-tlsx509-chardev-notls.args | 6 +- .../serial-tcp-tlsx509-chardev-verify.args | 12 +- .../serial-tcp-tlsx509-chardev.args | 12 +- .../serial-tcp-tlsx509-secret-chardev.args | 19 +- .../qemuxml2argvdata/serial-udp-chardev.args | 6 +- .../qemuxml2argvdata/serial-unix-chardev.args | 3 +- .../serial-unix-chardev.x86_64-latest.args | 6 +- tests/qemuxml2argvdata/serial-vc-chardev.args | 3 +- .../shmem-plain-doorbell.args | 33 +- tests/qemuxml2argvdata/shmem.args | 12 +- .../smartcard-controller.args | 3 +- .../smartcard-host-certificates-database.args | 6 +- .../smartcard-host-certificates.args | 6 +- tests/qemuxml2argvdata/smartcard-host.args | 3 +- .../smartcard-passthrough-spicevmc.args | 3 +- .../smartcard-passthrough-tcp.args | 3 +- ...artcard-passthrough-unix.x86_64-2.5.0.args | 3 +- ...rtcard-passthrough-unix.x86_64-latest.args | 6 +- tests/qemuxml2argvdata/smbios-type-fwcfg.args | 10 +- tests/qemuxml2argvdata/smbios.args | 16 +- tests/qemuxml2argvdata/smp-dies.args | 3 +- tests/qemuxml2argvdata/smp.args | 3 +- tests/qemuxml2argvdata/sound-device.args | 3 +- tests/qemuxml2argvdata/sound.args | 3 +- tests/qemuxml2argvdata/sparc-minimal.args | 12 +- .../tpm-emulator-spapr.ppc64-latest.args | 18 +- .../tpm-emulator-tpm2-enc.x86_64-latest.args | 9 +- ...pm-emulator-tpm2-pstate.x86_64-latest.args | 9 +- .../tpm-emulator-tpm2.x86_64-latest.args | 9 +- .../tpm-emulator.x86_64-latest.args | 9 +- .../tpm-passthrough-crb.x86_64-latest.args | 9 +- .../tpm-passthrough.x86_64-latest.args | 9 +- .../tseg-explicit-size.x86_64-latest.args | 12 +- .../usb-controller-default-q35.args | 3 +- .../usb-controller-explicit-q35.args | 3 +- .../usb-controller-qemu-xhci.args | 3 +- .../qemuxml2argvdata/usb-controller-xhci.args | 3 +- tests/qemuxml2argvdata/usb-controller.args | 3 +- .../usb-hub-autoadd-deluxe.args | 3 +- tests/qemuxml2argvdata/usb-hub-autoadd.args | 3 +- tests/qemuxml2argvdata/usb-hub.args | 3 +- .../qemuxml2argvdata/usb-ich9-autoassign.args | 6 +- .../qemuxml2argvdata/usb-ich9-companion.args | 6 +- .../qemuxml2argvdata/usb-ich9-ehci-addr.args | 12 +- .../qemuxml2argvdata/usb-long-port-path.args | 3 +- tests/qemuxml2argvdata/usb-none.args | 3 +- .../usb-piix3-controller.args | 3 +- .../qemuxml2argvdata/usb-port-autoassign.args | 3 +- tests/qemuxml2argvdata/usb-port-missing.args | 3 +- tests/qemuxml2argvdata/usb-ports.args | 3 +- tests/qemuxml2argvdata/usb-redir-boot.args | 6 +- .../usb-redir-filter-version.args | 11 +- tests/qemuxml2argvdata/usb-redir-filter.args | 12 +- .../usb-redir-unix.x86_64-2.5.0.args | 6 +- .../usb-redir-unix.x86_64-latest.args | 9 +- tests/qemuxml2argvdata/usb-redir.args | 6 +- .../qemuxml2argvdata/usb-xhci-autoassign.args | 3 +- tests/qemuxml2argvdata/usb1-usb2.args | 9 +- tests/qemuxml2argvdata/user-aliases-usb.args | 21 +- tests/qemuxml2argvdata/user-aliases.args | 60 +- .../vcpu-placement-static.args | 3 +- ...vhost-user-fs-fd-memory.x86_64-latest.args | 13 +- ...vhost-user-fs-hugepages.x86_64-latest.args | 25 +- ...host-user-gpu-secondary.x86_64-latest.args | 21 +- .../vhost-user-vga.x86_64-latest.args | 18 +- .../vhost-vsock-auto.x86_64-latest.args | 9 +- .../vhost-vsock-ccw-auto.s390x-latest.args | 18 +- .../vhost-vsock-ccw-iommu.s390x-latest.args | 21 +- .../vhost-vsock-ccw.s390x-latest.args | 18 +- .../vhost-vsock.x86_64-latest.args | 6 +- ...eo-bochs-display-device.x86_64-latest.args | 17 +- .../video-device-pciaddr-default.args | 9 +- tests/qemuxml2argvdata/video-invalid.xml | 30 - tests/qemuxml2argvdata/video-none-device.args | 3 +- .../video-qxl-device-vgamem.args | 9 +- ...video-qxl-device-vram64.x86_64-latest.args | 9 +- tests/qemuxml2argvdata/video-qxl-device.args | 9 +- tests/qemuxml2argvdata/video-qxl-heads.args | 12 +- .../qemuxml2argvdata/video-qxl-nodevice.args | 6 +- tests/qemuxml2argvdata/video-qxl-noheads.args | 6 +- .../video-qxl-resolution.args | 6 +- .../video-qxl-sec-device-vgamem.args | 12 +- ...o-qxl-sec-device-vram64.x86_64-latest.args | 12 +- .../video-qxl-sec-device.args | 9 +- ...eo-ramfb-display-device.x86_64-latest.args | 17 +- .../video-vga-device-vgamem.args | 6 +- tests/qemuxml2argvdata/video-vga-device.args | 6 +- .../qemuxml2argvdata/video-vga-nodevice.args | 6 +- .../qemuxml2argvdata/video-vga-qxl-heads.args | 9 +- .../video-virtio-gpu-ccw.args | 6 +- .../video-virtio-gpu-device.args | 6 +- .../video-virtio-gpu-sdl-gl.args | 6 +- .../video-virtio-gpu-secondary.args | 3 +- .../video-virtio-gpu-spice-gl.args | 6 +- .../video-virtio-gpu-virgl.args | 6 +- tests/qemuxml2argvdata/video-virtio-vga.args | 6 +- .../virtio-9p-createmode.x86_64-latest.args | 9 +- .../virtio-9p-multidevs.x86_64-latest.args | 15 +- .../virtio-input-passthrough.args | 6 +- tests/qemuxml2argvdata/virtio-input.args | 3 +- tests/qemuxml2argvdata/virtio-lun.args | 12 +- .../virtio-non-transitional.x86_64-3.1.0.args | 42 +- ...virtio-non-transitional.x86_64-latest.args | 39 +- ...-options-controller-ats.x86_64-latest.args | 6 +- ...ptions-controller-iommu.x86_64-latest.args | 12 +- ...tions-controller-packed.x86_64-latest.args | 6 +- ...virtio-options-disk-ats.x86_64-latest.args | 24 +- ...rtio-options-disk-iommu.x86_64-latest.args | 24 +- ...tio-options-disk-packed.x86_64-latest.args | 24 +- .../virtio-options-fs-ats.x86_64-latest.args | 12 +- ...virtio-options-fs-iommu.x86_64-latest.args | 12 +- ...irtio-options-fs-packed.x86_64-latest.args | 12 +- ...irtio-options-input-ats.x86_64-latest.args | 6 +- ...tio-options-input-iommu.x86_64-latest.args | 6 +- ...io-options-input-packed.x86_64-latest.args | 6 +- ...-options-memballoon-ats.x86_64-latest.args | 6 +- ...loon-freepage-reporting.x86_64-latest.args | 9 +- ...ptions-memballoon-iommu.x86_64-latest.args | 6 +- ...tions-memballoon-packed.x86_64-latest.args | 6 +- .../virtio-options-net-ats.x86_64-latest.args | 12 +- ...irtio-options-net-iommu.x86_64-latest.args | 12 +- ...rtio-options-net-packed.x86_64-latest.args | 12 +- .../virtio-options-rng-ats.x86_64-latest.args | 6 +- ...irtio-options-rng-iommu.x86_64-latest.args | 12 +- ...rtio-options-rng-packed.x86_64-latest.args | 6 +- ...irtio-options-video-ats.x86_64-latest.args | 12 +- ...tio-options-video-iommu.x86_64-latest.args | 12 +- ...io-options-video-packed.x86_64-latest.args | 12 +- .../virtio-options.x86_64-latest.args | 54 +- .../virtio-rng-builtin.x86_64-5.2.0.args | 9 +- .../virtio-rng-builtin.x86_64-latest.args | 6 +- tests/qemuxml2argvdata/virtio-rng-ccw.args | 6 +- .../qemuxml2argvdata/virtio-rng-default.args | 3 +- .../virtio-rng-egd-unix.x86_64-2.5.0.args | 3 +- .../virtio-rng-egd-unix.x86_64-5.2.0.args | 9 +- .../virtio-rng-egd-unix.x86_64-latest.args | 6 +- tests/qemuxml2argvdata/virtio-rng-egd.args | 3 +- .../qemuxml2argvdata/virtio-rng-multiple.args | 3 +- tests/qemuxml2argvdata/virtio-rng-random.args | 6 +- .../virtio-transitional.x86_64-3.1.0.args | 39 +- .../virtio-transitional.x86_64-latest.args | 33 +- tests/qemuxml2argvdata/vmcoreinfo.args | 3 +- tests/qemuxml2argvdata/watchdog-device.args | 3 +- tests/qemuxml2argvdata/watchdog-diag288.args | 3 +- tests/qemuxml2argvdata/watchdog-dump.args | 3 +- .../qemuxml2argvdata/watchdog-injectnmi.args | 3 +- tests/qemuxml2argvdata/watchdog.args | 3 +- tests/qemuxml2argvdata/x86-kvm-32-on-64.args | 3 +- ...-default-cpu-kvm-pc-4.2.x86_64-latest.args | 18 +- ...default-cpu-kvm-q35-4.2.x86_64-latest.args | 21 +- ...-default-cpu-tcg-pc-4.2.x86_64-latest.args | 18 +- ...default-cpu-tcg-q35-4.2.x86_64-latest.args | 21 +- .../x86_64-pc-graphics.x86_64-latest.args | 24 +- .../x86_64-pc-headless.x86_64-latest.args | 21 +- .../x86_64-q35-graphics.x86_64-latest.args | 27 +- .../x86_64-q35-headless.x86_64-latest.args | 24 +- tests/qemuxml2argvtest.c | 4 +- .../audio-default-nographics.xml | 1 - .../qemuxml2xmloutdata/audio-default-sdl.xml | 1 - .../audio-default-spice.xml | 1 - .../qemuxml2xmloutdata/audio-default-vnc.xml | 1 - tests/qemuxml2xmloutdata/disk-fat.xml | 37 - tests/qemuxml2xmloutdata/nographics-vga.xml | 34 - tests/qemuxml2xmloutdata/parallel-tcp.xml | 39 -- tests/qemuxml2xmloutdata/serial-dev.xml | 42 -- tests/qemuxml2xmloutdata/serial-file.xml | 42 -- tests/qemuxml2xmloutdata/serial-many.xml | 44 -- tests/qemuxml2xmloutdata/serial-pty.xml | 40 -- .../qemuxml2xmloutdata/serial-tcp-telnet.xml | 44 -- tests/qemuxml2xmloutdata/serial-tcp.xml | 44 -- tests/qemuxml2xmloutdata/serial-udp.xml | 48 -- tests/qemuxml2xmloutdata/serial-unix.xml | 42 -- tests/qemuxml2xmloutdata/serial-vc.xml | 40 -- .../tseg-old-machine-type.xml | 44 -- tests/qemuxml2xmloutdata/tseg.xml | 44 -- ...-options-memballoon-freepage-reporting.xml | 1 - tests/qemuxml2xmloutdata/virtio-options.xml | 1 - .../pool-fs-freebsd.argv | 6 +- .../pool-fs-linux.argv | 6 +- tests/storagepoolxml2argvdata/pool-fs.argv | 5 +- .../pool-logical-create.argv | 3 +- .../pool-logical-noname.argv | 3 +- .../pool-logical-nopath.argv | 3 +- .../storagepoolxml2argvdata/pool-logical.argv | 3 +- .../pool-netfs-auto-freebsd.argv | 5 +- .../pool-netfs-auto-linux.argv | 5 +- .../pool-netfs-auto.argv | 4 +- .../pool-netfs-cifs-freebsd.argv | 6 +- .../pool-netfs-cifs-linux.argv | 6 +- .../pool-netfs-cifs.argv | 6 +- .../pool-netfs-freebsd.argv | 6 +- .../pool-netfs-gluster-freebsd.argv | 7 +- .../pool-netfs-gluster-linux.argv | 7 +- .../pool-netfs-gluster.argv | 6 +- .../pool-netfs-linux.argv | 6 +- .../pool-netfs-ns-mountopts-freebsd.argv | 7 +- .../pool-netfs-ns-mountopts-linux.argv | 7 +- .../pool-netfs-ns-mountopts.argv | 6 +- .../pool-netfs-protocol-ver-freebsd.argv | 6 +- .../pool-netfs-protocol-ver-linux.argv | 7 +- .../pool-netfs-protocol-ver.argv | 6 +- tests/storagepoolxml2argvdata/pool-netfs.argv | 5 +- tests/storagepoolxml2argvtest.c | 5 +- tests/storagevolxml2argvdata/iso-input.argv | 4 +- tests/storagevolxml2argvdata/iso.argv | 4 +- .../logical-from-qcow2.argv | 4 +- tests/storagevolxml2argvdata/luks-cipher.argv | 6 +- .../luks-convert-encrypt.argv | 12 +- .../luks-convert-encrypt2fileqcow2.argv | 12 +- .../luks-convert-encrypt2fileraw.argv | 12 +- .../luks-convert-qcow2.argv | 11 +- .../storagevolxml2argvdata/luks-convert.argv | 10 +- tests/storagevolxml2argvdata/luks.argv | 3 +- tests/storagevolxml2argvdata/qcow2-1.1.argv | 4 +- .../storagevolxml2argvdata/qcow2-compat.argv | 4 +- .../qcow2-from-logical-compat.argv | 4 +- tests/storagevolxml2argvdata/qcow2-lazy.argv | 5 +- .../qcow2-luks-convert-encrypt.argv | 14 +- .../qcow2-luks-convert-encrypt2fileqcow2.argv | 12 +- .../qcow2-luks-convert-encrypt2fileraw.argv | 12 +- tests/storagevolxml2argvdata/qcow2-luks.argv | 6 +- ...ow2-nobacking-convert-prealloc-compat.argv | 4 +- .../qcow2-nobacking-prealloc-compat.argv | 5 +- .../qcow2-nocapacity-convert-prealloc.argv | 4 +- .../qcow2-nocapacity.argv | 3 +- .../qcow2-nocow-compat.argv | 5 +- .../qcow2-zerocapacity.argv | 4 +- tests/storagevolxml2argvtest.c | 6 +- tests/sysinfotest.c | 4 +- tests/testutils.c | 114 +--- tests/testutils.h | 5 +- tests/virfirewalltest.c | 40 +- tests/viriscsitest.c | 12 +- tests/virkmodtest.c | 8 +- tests/virnetdevbandwidthtest.c | 4 +- 1105 files changed, 4246 insertions(+), 9341 deletions(-) delete mode 100755 scripts/test-wrap-argv.py delete mode 100644 tests/qemuxml2argvdata/audio-alsa-full.args delete mode 100644 tests/qemuxml2argvdata/audio-coreaudio-full.args delete mode 100644 tests/qemuxml2argvdata/audio-file-full.args delete mode 100644 tests/qemuxml2argvdata/audio-none-full.args delete mode 100644 tests/qemuxml2argvdata/audio-oss-full.args delete mode 100644 tests/qemuxml2argvdata/audio-pulseaudio-full.args delete mode 100644 tests/qemuxml2argvdata/audio-sdl-full.args delete mode 100644 tests/qemuxml2argvdata/audio-spice-full.args delete mode 100644 tests/qemuxml2argvdata/console-compat-2.xml delete mode 100644 tests/qemuxml2argvdata/disk-detect-zeroes.args delete mode 100644 tests/qemuxml2argvdata/disk-network-tlsx509.x86_64-2.12.0.args delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-boot.xml delete mode 100644 tests/qemuxml2argvdata/video-invalid.xml delete mode 120000 tests/qemuxml2xmloutdata/audio-default-nographics.xml delete mode 120000 tests/qemuxml2xmloutdata/audio-default-sdl.xml delete mode 120000 tests/qemuxml2xmloutdata/audio-default-spice.xml delete mode 120000 tests/qemuxml2xmloutdata/audio-default-vnc.xml delete mode 100644 tests/qemuxml2xmloutdata/disk-fat.xml delete mode 100644 tests/qemuxml2xmloutdata/nographics-vga.xml delete mode 100644 tests/qemuxml2xmloutdata/parallel-tcp.xml delete mode 100644 tests/qemuxml2xmloutdata/serial-dev.xml delete mode 100644 tests/qemuxml2xmloutdata/serial-file.xml delete mode 100644 tests/qemuxml2xmloutdata/serial-many.xml delete mode 100644 tests/qemuxml2xmloutdata/serial-pty.xml delete mode 100644 tests/qemuxml2xmloutdata/serial-tcp-telnet.xml delete mode 100644 tests/qemuxml2xmloutdata/serial-tcp.xml delete mode 100644 tests/qemuxml2xmloutdata/serial-udp.xml delete mode 100644 tests/qemuxml2xmloutdata/serial-unix.xml delete mode 100644 tests/qemuxml2xmloutdata/serial-vc.xml delete mode 100644 tests/qemuxml2xmloutdata/tseg-old-machine-type.xml delete mode 100644 tests/qemuxml2xmloutdata/tseg.xml delete mode 120000 tests/qemuxml2xmloutdata/virtio-options-memballoon-freepage-reporting.xml delete mode 120000 tests/qemuxml2xmloutdata/virtio-options.xml -- 2.30.2

The files were added in error (audio-*) for test cases which produce an error, left over after converting to DO_TEST_CAPS_LATEST (disk-detect-zeroes), or left over after splitting test cases (disk-network-tlsx509). Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/qemuxml2argvdata/audio-alsa-full.args | 29 -------- .../audio-coreaudio-full.args | 29 -------- tests/qemuxml2argvdata/audio-file-full.args | 29 -------- tests/qemuxml2argvdata/audio-none-full.args | 29 -------- tests/qemuxml2argvdata/audio-oss-full.args | 31 -------- .../audio-pulseaudio-full.args | 29 -------- tests/qemuxml2argvdata/audio-sdl-full.args | 30 -------- tests/qemuxml2argvdata/audio-spice-full.args | 29 -------- .../qemuxml2argvdata/disk-detect-zeroes.args | 36 ---------- .../disk-network-tlsx509.x86_64-2.12.0.args | 71 ------------------- 10 files changed, 342 deletions(-) delete mode 100644 tests/qemuxml2argvdata/audio-alsa-full.args delete mode 100644 tests/qemuxml2argvdata/audio-coreaudio-full.args delete mode 100644 tests/qemuxml2argvdata/audio-file-full.args delete mode 100644 tests/qemuxml2argvdata/audio-none-full.args delete mode 100644 tests/qemuxml2argvdata/audio-oss-full.args delete mode 100644 tests/qemuxml2argvdata/audio-pulseaudio-full.args delete mode 100644 tests/qemuxml2argvdata/audio-sdl-full.args delete mode 100644 tests/qemuxml2argvdata/audio-spice-full.args delete mode 100644 tests/qemuxml2argvdata/disk-detect-zeroes.args delete mode 100644 tests/qemuxml2argvdata/disk-network-tlsx509.x86_64-2.12.0.args diff --git a/tests/qemuxml2argvdata/audio-alsa-full.args b/tests/qemuxml2argvdata/audio-alsa-full.args deleted file mode 100644 index 01fe6e2beb..0000000000 --- a/tests/qemuxml2argvdata/audio-alsa-full.args +++ /dev/null @@ -1,29 +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=alsa \ -/usr/bin/qemu-system-i386 \ --name QEMUGuest1 \ --S \ --machine pc,accel=tcg,usb=off,dump-guest-core=off \ --m 214 \ --realtime mlock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ -server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --usb \ --drive file=/dev/cdrom,format=raw,if=none,id=drive-ide0-1-0,readonly=on \ --device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,bootindex=1 diff --git a/tests/qemuxml2argvdata/audio-coreaudio-full.args b/tests/qemuxml2argvdata/audio-coreaudio-full.args deleted file mode 100644 index c4d502b889..0000000000 --- a/tests/qemuxml2argvdata/audio-coreaudio-full.args +++ /dev/null @@ -1,29 +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=coreaudio \ -/usr/bin/qemu-system-i386 \ --name QEMUGuest1 \ --S \ --machine pc,accel=tcg,usb=off,dump-guest-core=off \ --m 214 \ --realtime mlock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ -server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --usb \ --drive file=/dev/cdrom,format=raw,if=none,id=drive-ide0-1-0,readonly=on \ --device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,bootindex=1 diff --git a/tests/qemuxml2argvdata/audio-file-full.args b/tests/qemuxml2argvdata/audio-file-full.args deleted file mode 100644 index fd504f50e7..0000000000 --- a/tests/qemuxml2argvdata/audio-file-full.args +++ /dev/null @@ -1,29 +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=wav \ -/usr/bin/qemu-system-i386 \ --name QEMUGuest1 \ --S \ --machine pc,accel=tcg,usb=off,dump-guest-core=off \ --m 214 \ --realtime mlock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ -server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --usb \ --drive file=/dev/cdrom,format=raw,if=none,id=drive-ide0-1-0,readonly=on \ --device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,bootindex=1 diff --git a/tests/qemuxml2argvdata/audio-none-full.args b/tests/qemuxml2argvdata/audio-none-full.args deleted file mode 100644 index 00c6e37ccc..0000000000 --- a/tests/qemuxml2argvdata/audio-none-full.args +++ /dev/null @@ -1,29 +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-i386 \ --name QEMUGuest1 \ --S \ --machine pc,accel=tcg,usb=off,dump-guest-core=off \ --m 214 \ --realtime mlock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ -server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --usb \ --drive file=/dev/cdrom,format=raw,if=none,id=drive-ide0-1-0,readonly=on \ --device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,bootindex=1 diff --git a/tests/qemuxml2argvdata/audio-oss-full.args b/tests/qemuxml2argvdata/audio-oss-full.args deleted file mode 100644 index e6a7bb4af8..0000000000 --- a/tests/qemuxml2argvdata/audio-oss-full.args +++ /dev/null @@ -1,31 +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=oss \ -QEMU_OSS_ADC_DEV=/dev/dsp0 \ -QEMU_OSS_DAC_DEV=/dev/dsp1 \ -/usr/bin/qemu-system-i386 \ --name QEMUGuest1 \ --S \ --machine pc,accel=tcg,usb=off,dump-guest-core=off \ --m 214 \ --realtime mlock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ -server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --usb \ --drive file=/dev/cdrom,format=raw,if=none,id=drive-ide0-1-0,readonly=on \ --device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,bootindex=1 diff --git a/tests/qemuxml2argvdata/audio-pulseaudio-full.args b/tests/qemuxml2argvdata/audio-pulseaudio-full.args deleted file mode 100644 index af274e4328..0000000000 --- a/tests/qemuxml2argvdata/audio-pulseaudio-full.args +++ /dev/null @@ -1,29 +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=pa \ -/usr/bin/qemu-system-i386 \ --name QEMUGuest1 \ --S \ --machine pc,accel=tcg,usb=off,dump-guest-core=off \ --m 214 \ --realtime mlock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ -server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --usb \ --drive file=/dev/cdrom,format=raw,if=none,id=drive-ide0-1-0,readonly=on \ --device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,bootindex=1 diff --git a/tests/qemuxml2argvdata/audio-sdl-full.args b/tests/qemuxml2argvdata/audio-sdl-full.args deleted file mode 100644 index 6aca7037a8..0000000000 --- a/tests/qemuxml2argvdata/audio-sdl-full.args +++ /dev/null @@ -1,30 +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=sdl \ -SDL_AUDIODRIVER=pulseaudio \ -/usr/bin/qemu-system-i386 \ --name QEMUGuest1 \ --S \ --machine pc,accel=tcg,usb=off,dump-guest-core=off \ --m 214 \ --realtime mlock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ -server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --usb \ --drive file=/dev/cdrom,format=raw,if=none,id=drive-ide0-1-0,readonly=on \ --device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,bootindex=1 diff --git a/tests/qemuxml2argvdata/audio-spice-full.args b/tests/qemuxml2argvdata/audio-spice-full.args deleted file mode 100644 index a7a85959d6..0000000000 --- a/tests/qemuxml2argvdata/audio-spice-full.args +++ /dev/null @@ -1,29 +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=spice \ -/usr/bin/qemu-system-i386 \ --name QEMUGuest1 \ --S \ --machine pc,accel=tcg,usb=off,dump-guest-core=off \ --m 214 \ --realtime mlock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ -server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --usb \ --drive file=/dev/cdrom,format=raw,if=none,id=drive-ide0-1-0,readonly=on \ --device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,bootindex=1 diff --git a/tests/qemuxml2argvdata/disk-detect-zeroes.args b/tests/qemuxml2argvdata/disk-detect-zeroes.args deleted file mode 100644 index 6926876ffd..0000000000 --- a/tests/qemuxml2argvdata/disk-detect-zeroes.args +++ /dev/null @@ -1,36 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/tmp/lib/domain--1-test \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/tmp/lib/domain--1-test/.local/share \ -XDG_CACHE_HOME=/tmp/lib/domain--1-test/.cache \ -XDG_CONFIG_HOME=/tmp/lib/domain--1-test/.config \ -QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-x86_64 \ --name test \ --S \ --machine pc,accel=tcg,usb=off,dump-guest-core=off \ --m 1024 \ --realtime mlock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid 92d7a226-cfae-425b-a6d3-00bbf9ec5c9e \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-test/monitor.sock,\ -server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --boot menu=on \ --usb \ --drive file=/var/lib/libvirt/images/f14.img,format=qcow2,if=none,\ -id=drive-virtio-disk0,discard=unmap,detect-zeroes=unmap \ --device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\ -id=virtio-disk0,bootindex=2 \ --drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,format=raw,if=none,\ -id=drive-ide0-1-0,readonly=on,discard=ignore,detect-zeroes=on \ --device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,bootindex=1 \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/disk-network-tlsx509.x86_64-2.12.0.args b/tests/qemuxml2argvdata/disk-network-tlsx509.x86_64-2.12.0.args deleted file mode 100644 index 259f9ba575..0000000000 --- a/tests/qemuxml2argvdata/disk-network-tlsx509.x86_64-2.12.0.args +++ /dev/null @@ -1,71 +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-x86_64 \ --name guest=QEMUGuest1,debug-threads=on \ --S \ --object secret,id=masterKey0,format=raw,\ -file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pc-i440fx-2.12,accel=tcg,usb=off,dump-guest-core=off \ --cpu qemu32 \ --m 214 \ --realtime mlock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --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 \ --no-acpi \ --boot strict=on \ --device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ --object secret,id=objvirtio-disk0_tls0-secret0,\ -data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ -keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \ --object tls-creds-x509,id=objvirtio-disk0_tls0,dir=/etc/pki/libvirt-vxhs/dummy,\ -,path,endpoint=client,verify-peer=on,passwordid=objvirtio-disk0_tls0-secret0 \ --drive file.driver=vxhs,file.tls-creds=objvirtio-disk0_tls0,\ -file.vdisk-id=eb90327c-8302-4725-9e1b-4e85ed4dc251,\ -file.server.host=192.168.0.1,file.server.port=9999,format=raw,if=none,\ -id=drive-virtio-disk0,cache=none \ --device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\ -id=virtio-disk0,bootindex=1,write-cache=on,\ -serial=eb90327c-8302-4725-9e1b-4e85ed4dc251 \ --object secret,id=objvirtio-disk1_tls0-secret0,\ -data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ -keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \ --object tls-creds-x509,id=objvirtio-disk1_tls0,dir=/etc/pki/libvirt-vxhs/dummy,\ -,path,endpoint=client,verify-peer=on,passwordid=objvirtio-disk1_tls0-secret0 \ --drive file.driver=vxhs,file.tls-creds=objvirtio-disk1_tls0,\ -file.vdisk-id=eb90327c-8302-4725-9e1b-4e85ed4dc252,\ -file.server.host=192.168.0.2,file.server.port=9999,format=raw,if=none,\ -id=drive-virtio-disk1,cache=none \ --device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,\ -id=virtio-disk1,write-cache=on,serial=eb90327c-8302-4725-9e1b-4e85ed4dc252 \ --drive file.driver=vxhs,file.vdisk-id=eb90327c-8302-4725-9e1b-4e85ed4dc253,\ -file.server.host=192.168.0.3,file.server.port=9999,format=raw,if=none,\ -id=drive-virtio-disk2,cache=none \ --device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk2,\ -id=virtio-disk2,write-cache=on,serial=eb90327c-8302-4725-9e1b-4e85ed4dc252 \ --object secret,id=objvirtio-disk3_tls0-secret0,\ -data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ -keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \ --object tls-creds-x509,id=objvirtio-disk3_tls0,dir=/etc/pki/libvirt-nbd/dummy,,\ -path,endpoint=client,verify-peer=on,passwordid=objvirtio-disk3_tls0-secret0 \ --drive file.driver=nbd,file.server.type=inet,file.server.host=example.com,\ -file.server.port=1234,file.tls-creds=objvirtio-disk3_tls0,format=raw,if=none,\ -id=drive-virtio-disk3,cache=none \ --device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=drive-virtio-disk3,\ -id=virtio-disk3,write-cache=on \ --sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ -resourcecontrol=deny \ --msg timestamp=on -- 2.30.2

The files are no longer referenced by either qemuxml2argvtest or qemuxml2xmltest. Remove them. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/qemuxml2argvdata/console-compat-2.xml | 103 ------------------- tests/qemuxml2argvdata/hostdev-scsi-boot.xml | 34 ------ tests/qemuxml2argvdata/video-invalid.xml | 30 ------ 3 files changed, 167 deletions(-) delete mode 100644 tests/qemuxml2argvdata/console-compat-2.xml delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-boot.xml delete mode 100644 tests/qemuxml2argvdata/video-invalid.xml diff --git a/tests/qemuxml2argvdata/console-compat-2.xml b/tests/qemuxml2argvdata/console-compat-2.xml deleted file mode 100644 index 7b35709fa9..0000000000 --- a/tests/qemuxml2argvdata/console-compat-2.xml +++ /dev/null @@ -1,103 +0,0 @@ -<domain type='kvm'> - <name>f17</name> - <uuid>a1cd52eb-d37f-4717-fc6e-972f0774f4c9</uuid> - <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <vcpu placement='static'>1</vcpu> - <resource> - <partition>/machine</partition> - </resource> - <os> - <type arch='x86_64' machine='pc-i440fx-1.4'>hvm</type> - <boot dev='hd'/> - </os> - <features> - <acpi/> - <apic/> - <pae/> - </features> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <pm> - <suspend-to-mem enabled='yes'/> - <suspend-to-disk enabled='yes'/> - </pm> - <devices> - <emulator>/usr/bin/qemu-system-x86_64</emulator> - <disk type='file' device='disk'> - <driver name='qemu' type='qcow2' cache='none'/> - <source file='/var/lib/libvirt/images/f17.qcow2'/> - <target dev='vda' bus='virtio'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> - </disk> - <disk type='file' device='cdrom'> - <driver name='qemu' type='raw' cache='none'/> - <source file='/home/user/tmp/Fedora-17-x86_64-Live-KDE.iso'/> - <target dev='hdc' bus='ide'/> - <readonly/> - <address type='drive' controller='0' bus='1' target='0' unit='0'/> - </disk> - <controller type='ide' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> - </controller> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <controller type='virtio-serial' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> - </controller> - <interface type='network'> - <mac address='52:54:00:ea:35:6f'/> - <source network='default'/> - <bandwidth> - <inbound average='4000' peak='8000' floor='200' burst='1024'/> - <outbound average='4000' peak='8000' burst='1024'/> - </bandwidth> - <model type='virtio'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> - </interface> - <serial type='pty'> - <target type='isa-serial' port='0'/> - </serial> - <serial type='pty'> - <target port='0'/> - </serial> - <serial type='tcp'> - <source mode='bind' host='0.0.0.0' service='2445'/> - <protocol type='raw'/> - <target port='1'/> - </serial> - <console type='pty'> - <target type='serial' port='0'/> - </console> - <channel type='unix'> - <source mode='bind' path='/var/lib/libvirt/qemu/f17x86_64.agent'/> - <target type='virtio' name='org.qemu.guest_agent.0'/> - <address type='virtio-serial' controller='0' bus='0' port='1'/> - </channel> - <input type='tablet' bus='usb'> - <address type='usb' bus='0' port='1'/> - </input> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'> - <listen type='address' address='0.0.0.0'/> - </graphics> - <sound model='ich6'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> - </sound> - <video> - <model type='cirrus' vram='16384' heads='1' primary='yes'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </video> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> - </memballoon> - </devices> - <seclabel type='static' model='dac' relabel='no'> - <label>root:root</label> - </seclabel> -</domain> diff --git a/tests/qemuxml2argvdata/hostdev-scsi-boot.xml b/tests/qemuxml2argvdata/hostdev-scsi-boot.xml deleted file mode 100644 index 8762f57c2b..0000000000 --- a/tests/qemuxml2argvdata/hostdev-scsi-boot.xml +++ /dev/null @@ -1,34 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest2</name> - <uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid> - <memory unit='KiB'>219100</memory> - <currentMemory unit='KiB'>219100</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - </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-i386</emulator> - <disk type='block' device='disk'> - <source dev='/dev/HostVG/QEMUGuest2'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='scsi' index='0' model='virtio-scsi'/> - <controller type='usb' index='0'/> - <controller type='ide' index='0'/> - <hostdev mode='subsystem' type='scsi' managed='yes'> - <source> - <adapter name='scsi_host0'/> - <address bus='0' target='0' unit='0'/> - </source> - <boot order='1'/> - <address type='drive' controller='0' bus='0' target='4' unit='8'/> - </hostdev> - <memballoon model='virtio'/> - </devices> -</domain> diff --git a/tests/qemuxml2argvdata/video-invalid.xml b/tests/qemuxml2argvdata/video-invalid.xml deleted file mode 100644 index 9f24b7a096..0000000000 --- a/tests/qemuxml2argvdata/video-invalid.xml +++ /dev/null @@ -1,30 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest1</name> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>219100</memory> - <currentMemory unit='KiB'>219100</currentMemory> - <vcpu placement='static' cpuset='1-4,8-20,525'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <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-i386</emulator> - <disk type='block' device='disk'> - <source dev='/dev/HostVG/QEMUGuest1'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='usb' index='0'/> - <controller type='ide' index='0'/> - <controller type='pci' index='0' model='pci-root'/> - <video> - <model type='qxl' ram='-1' vram='-1' vgamem='-1' heads='-1'/> - </video> - <memballoon model='virtio'/> - </devices> -</domain> -- 2.30.2

The files are no longer referenced by existing test cases. Remove them. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/qemuxml2xmloutdata/disk-fat.xml | 37 -------------- tests/qemuxml2xmloutdata/nographics-vga.xml | 34 ------------- tests/qemuxml2xmloutdata/parallel-tcp.xml | 39 --------------- tests/qemuxml2xmloutdata/serial-dev.xml | 42 ---------------- tests/qemuxml2xmloutdata/serial-file.xml | 42 ---------------- tests/qemuxml2xmloutdata/serial-many.xml | 44 ----------------- tests/qemuxml2xmloutdata/serial-pty.xml | 40 ---------------- .../qemuxml2xmloutdata/serial-tcp-telnet.xml | 44 ----------------- tests/qemuxml2xmloutdata/serial-tcp.xml | 44 ----------------- tests/qemuxml2xmloutdata/serial-udp.xml | 48 ------------------- tests/qemuxml2xmloutdata/serial-unix.xml | 42 ---------------- tests/qemuxml2xmloutdata/serial-vc.xml | 40 ---------------- .../tseg-old-machine-type.xml | 44 ----------------- tests/qemuxml2xmloutdata/tseg.xml | 44 ----------------- 14 files changed, 584 deletions(-) delete mode 100644 tests/qemuxml2xmloutdata/disk-fat.xml delete mode 100644 tests/qemuxml2xmloutdata/nographics-vga.xml delete mode 100644 tests/qemuxml2xmloutdata/parallel-tcp.xml delete mode 100644 tests/qemuxml2xmloutdata/serial-dev.xml delete mode 100644 tests/qemuxml2xmloutdata/serial-file.xml delete mode 100644 tests/qemuxml2xmloutdata/serial-many.xml delete mode 100644 tests/qemuxml2xmloutdata/serial-pty.xml delete mode 100644 tests/qemuxml2xmloutdata/serial-tcp-telnet.xml delete mode 100644 tests/qemuxml2xmloutdata/serial-tcp.xml delete mode 100644 tests/qemuxml2xmloutdata/serial-udp.xml delete mode 100644 tests/qemuxml2xmloutdata/serial-unix.xml delete mode 100644 tests/qemuxml2xmloutdata/serial-vc.xml delete mode 100644 tests/qemuxml2xmloutdata/tseg-old-machine-type.xml delete mode 100644 tests/qemuxml2xmloutdata/tseg.xml diff --git a/tests/qemuxml2xmloutdata/disk-fat.xml b/tests/qemuxml2xmloutdata/disk-fat.xml deleted file mode 100644 index d716c1f76f..0000000000 --- a/tests/qemuxml2xmloutdata/disk-fat.xml +++ /dev/null @@ -1,37 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest1</name> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>219136</memory> - <currentMemory unit='KiB'>219136</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <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-i386</emulator> - <disk type='dir' device='disk'> - <driver name='qemu' type='fat'/> - <source dir='/var/somefiles'/> - <target dev='hda' bus='ide'/> - <readonly/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='ide' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> - </memballoon> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/nographics-vga.xml b/tests/qemuxml2xmloutdata/nographics-vga.xml deleted file mode 100644 index 757791af10..0000000000 --- a/tests/qemuxml2xmloutdata/nographics-vga.xml +++ /dev/null @@ -1,34 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest1</name> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>219136</memory> - <currentMemory unit='KiB'>219136</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <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-i386</emulator> - <disk type='block' device='disk'> - <driver name='qemu' type='raw'/> - <source dev='/dev/HostVG/QEMUGuest1'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='ide' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <memballoon model='none'/> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/parallel-tcp.xml b/tests/qemuxml2xmloutdata/parallel-tcp.xml deleted file mode 100644 index 4cad78f847..0000000000 --- a/tests/qemuxml2xmloutdata/parallel-tcp.xml +++ /dev/null @@ -1,39 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest1</name> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>219100</memory> - <currentMemory unit='KiB'>219100</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <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-i386</emulator> - <disk type='block' device='disk'> - <driver name='qemu' type='raw'/> - <source dev='/dev/HostVG/QEMUGuest1'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='ide' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <parallel type='tcp'> - <source mode='bind' host='127.0.0.1' service='9999'/> - <protocol type='raw'/> - <target port='0'/> - </parallel> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <memballoon model='none'/> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/serial-dev.xml b/tests/qemuxml2xmloutdata/serial-dev.xml deleted file mode 100644 index 18317c590a..0000000000 --- a/tests/qemuxml2xmloutdata/serial-dev.xml +++ /dev/null @@ -1,42 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest1</name> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>219100</memory> - <currentMemory unit='KiB'>219100</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <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-i386</emulator> - <disk type='block' device='disk'> - <driver name='qemu' type='raw'/> - <source dev='/dev/HostVG/QEMUGuest1'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='ide' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <serial type='dev'> - <source path='/dev/ttyS2'/> - <target port='0'/> - </serial> - <console type='dev'> - <source path='/dev/ttyS2'/> - <target type='serial' port='0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <memballoon model='none'/> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/serial-file.xml b/tests/qemuxml2xmloutdata/serial-file.xml deleted file mode 100644 index 1860db8a27..0000000000 --- a/tests/qemuxml2xmloutdata/serial-file.xml +++ /dev/null @@ -1,42 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest1</name> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>219136</memory> - <currentMemory unit='KiB'>219136</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <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-i386</emulator> - <disk type='block' device='disk'> - <driver name='qemu' type='raw'/> - <source dev='/dev/HostVG/QEMUGuest1'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='ide' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <serial type='file'> - <source path='/tmp/serial.log'/> - <target port='0'/> - </serial> - <console type='file'> - <source path='/tmp/serial.log'/> - <target type='serial' port='0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <memballoon model='none'/> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/serial-many.xml b/tests/qemuxml2xmloutdata/serial-many.xml deleted file mode 100644 index 3d72053535..0000000000 --- a/tests/qemuxml2xmloutdata/serial-many.xml +++ /dev/null @@ -1,44 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest1</name> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>219136</memory> - <currentMemory unit='KiB'>219136</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <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-i386</emulator> - <disk type='block' device='disk'> - <driver name='qemu' type='raw'/> - <source dev='/dev/HostVG/QEMUGuest1'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='ide' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <serial type='pty'> - <target port='0'/> - </serial> - <serial type='file'> - <source path='/tmp/serial.log'/> - <target port='1'/> - </serial> - <console type='pty'> - <target type='serial' port='0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <memballoon model='none'/> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/serial-pty.xml b/tests/qemuxml2xmloutdata/serial-pty.xml deleted file mode 100644 index 7d8266cbda..0000000000 --- a/tests/qemuxml2xmloutdata/serial-pty.xml +++ /dev/null @@ -1,40 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest1</name> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>219136</memory> - <currentMemory unit='KiB'>219136</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <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-i386</emulator> - <disk type='block' device='disk'> - <driver name='qemu' type='raw'/> - <source dev='/dev/HostVG/QEMUGuest1'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='ide' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <serial type='pty'> - <target port='0'/> - </serial> - <console type='pty'> - <target type='serial' port='0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <memballoon model='none'/> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/serial-tcp-telnet.xml b/tests/qemuxml2xmloutdata/serial-tcp-telnet.xml deleted file mode 100644 index a2110221f8..0000000000 --- a/tests/qemuxml2xmloutdata/serial-tcp-telnet.xml +++ /dev/null @@ -1,44 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest1</name> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>219100</memory> - <currentMemory unit='KiB'>219100</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <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-i386</emulator> - <disk type='block' device='disk'> - <driver name='qemu' type='raw'/> - <source dev='/dev/HostVG/QEMUGuest1'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='ide' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <serial type='tcp'> - <source mode='bind' host='127.0.0.1' service='9999'/> - <protocol type='telnet'/> - <target port='0'/> - </serial> - <console type='tcp'> - <source mode='bind' host='127.0.0.1' service='9999'/> - <protocol type='telnet'/> - <target type='serial' port='0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <memballoon model='none'/> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/serial-tcp.xml b/tests/qemuxml2xmloutdata/serial-tcp.xml deleted file mode 100644 index a4f754de3a..0000000000 --- a/tests/qemuxml2xmloutdata/serial-tcp.xml +++ /dev/null @@ -1,44 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest1</name> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>219100</memory> - <currentMemory unit='KiB'>219100</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <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-i386</emulator> - <disk type='block' device='disk'> - <driver name='qemu' type='raw'/> - <source dev='/dev/HostVG/QEMUGuest1'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='ide' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <serial type='tcp'> - <source mode='connect' host='127.0.0.1' service='9999'/> - <protocol type='raw'/> - <target port='0'/> - </serial> - <console type='tcp'> - <source mode='connect' host='127.0.0.1' service='9999'/> - <protocol type='raw'/> - <target type='serial' port='0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <memballoon model='none'/> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/serial-udp.xml b/tests/qemuxml2xmloutdata/serial-udp.xml deleted file mode 100644 index 1bd7c29fe2..0000000000 --- a/tests/qemuxml2xmloutdata/serial-udp.xml +++ /dev/null @@ -1,48 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest1</name> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>219136</memory> - <currentMemory unit='KiB'>219136</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <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-i386</emulator> - <disk type='block' device='disk'> - <driver name='qemu' type='raw'/> - <source dev='/dev/HostVG/QEMUGuest1'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='ide' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <serial type='udp'> - <source mode='bind' host='127.0.0.1' service='9999'/> - <source mode='connect' host='127.0.0.1' service='9998'/> - <target port='0'/> - </serial> - <serial type='udp'> - <source mode='connect' service='9999'/> - <target port='1'/> - </serial> - <console type='udp'> - <source mode='bind' host='127.0.0.1' service='9999'/> - <source mode='connect' host='127.0.0.1' service='9998'/> - <target type='serial' port='0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <memballoon model='none'/> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/serial-unix.xml b/tests/qemuxml2xmloutdata/serial-unix.xml deleted file mode 100644 index 850a1d6766..0000000000 --- a/tests/qemuxml2xmloutdata/serial-unix.xml +++ /dev/null @@ -1,42 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest1</name> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>219136</memory> - <currentMemory unit='KiB'>219136</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <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-i386</emulator> - <disk type='block' device='disk'> - <driver name='qemu' type='raw'/> - <source dev='/dev/HostVG/QEMUGuest1'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='ide' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <serial type='unix'> - <source mode='connect' path='/tmp/serial.sock'/> - <target port='0'/> - </serial> - <console type='unix'> - <source mode='connect' path='/tmp/serial.sock'/> - <target type='serial' port='0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <memballoon model='none'/> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/serial-vc.xml b/tests/qemuxml2xmloutdata/serial-vc.xml deleted file mode 100644 index c7826f3284..0000000000 --- a/tests/qemuxml2xmloutdata/serial-vc.xml +++ /dev/null @@ -1,40 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest1</name> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>219100</memory> - <currentMemory unit='KiB'>219100</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <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-i386</emulator> - <disk type='block' device='disk'> - <driver name='qemu' type='raw'/> - <source dev='/dev/HostVG/QEMUGuest1'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='ide' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <serial type='vc'> - <target port='0'/> - </serial> - <console type='vc'> - <target type='serial' port='0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <memballoon model='none'/> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/tseg-old-machine-type.xml b/tests/qemuxml2xmloutdata/tseg-old-machine-type.xml deleted file mode 100644 index 594c5c025d..0000000000 --- a/tests/qemuxml2xmloutdata/tseg-old-machine-type.xml +++ /dev/null @@ -1,44 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest1</name> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>219100</memory> - <currentMemory unit='KiB'>219100</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='x86_64' machine='pc-q35-2.9'>hvm</type> - <boot dev='hd'/> - </os> - <features> - <smm state='on'/> - </features> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-x86_64</emulator> - <controller type='sata' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> - </controller> - <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='2'/> - <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> - </controller> - <controller type='pci' index='3' model='pcie-root-port'> - <model name='ioh3420'/> - <target chassis='3' port='0x10'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </controller> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> - </memballoon> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/tseg.xml b/tests/qemuxml2xmloutdata/tseg.xml deleted file mode 100644 index ad80648c73..0000000000 --- a/tests/qemuxml2xmloutdata/tseg.xml +++ /dev/null @@ -1,44 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest1</name> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>219100</memory> - <currentMemory unit='KiB'>219100</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='x86_64' machine='pc-q35-2.10'>hvm</type> - <boot dev='hd'/> - </os> - <features> - <smm state='on'/> - </features> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-x86_64</emulator> - <controller type='sata' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> - </controller> - <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='2'/> - <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> - </controller> - <controller type='pci' index='3' model='pcie-root-port'> - <model name='ioh3420'/> - <target chassis='3' port='0x10'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </controller> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> - </memballoon> - </devices> -</domain> -- 2.30.2

The symlinks are not used by the test. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/qemuxml2xmloutdata/audio-default-nographics.xml | 1 - tests/qemuxml2xmloutdata/audio-default-sdl.xml | 1 - tests/qemuxml2xmloutdata/audio-default-spice.xml | 1 - tests/qemuxml2xmloutdata/audio-default-vnc.xml | 1 - .../virtio-options-memballoon-freepage-reporting.xml | 1 - tests/qemuxml2xmloutdata/virtio-options.xml | 1 - 6 files changed, 6 deletions(-) delete mode 120000 tests/qemuxml2xmloutdata/audio-default-nographics.xml delete mode 120000 tests/qemuxml2xmloutdata/audio-default-sdl.xml delete mode 120000 tests/qemuxml2xmloutdata/audio-default-spice.xml delete mode 120000 tests/qemuxml2xmloutdata/audio-default-vnc.xml delete mode 120000 tests/qemuxml2xmloutdata/virtio-options-memballoon-freepage-reporting.xml delete mode 120000 tests/qemuxml2xmloutdata/virtio-options.xml diff --git a/tests/qemuxml2xmloutdata/audio-default-nographics.xml b/tests/qemuxml2xmloutdata/audio-default-nographics.xml deleted file mode 120000 index 9103458c39..0000000000 --- a/tests/qemuxml2xmloutdata/audio-default-nographics.xml +++ /dev/null @@ -1 +0,0 @@ -../qemuxml2argvdata/audio-default-nographics.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/audio-default-sdl.xml b/tests/qemuxml2xmloutdata/audio-default-sdl.xml deleted file mode 120000 index b0e06aa348..0000000000 --- a/tests/qemuxml2xmloutdata/audio-default-sdl.xml +++ /dev/null @@ -1 +0,0 @@ -../qemuxml2argvdata/audio-default-sdl.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/audio-default-spice.xml b/tests/qemuxml2xmloutdata/audio-default-spice.xml deleted file mode 120000 index 93945463ef..0000000000 --- a/tests/qemuxml2xmloutdata/audio-default-spice.xml +++ /dev/null @@ -1 +0,0 @@ -../qemuxml2argvdata/audio-default-spice.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/audio-default-vnc.xml b/tests/qemuxml2xmloutdata/audio-default-vnc.xml deleted file mode 120000 index 3fdbfb6df4..0000000000 --- a/tests/qemuxml2xmloutdata/audio-default-vnc.xml +++ /dev/null @@ -1 +0,0 @@ -../qemuxml2argvdata/audio-default-vnc.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/virtio-options-memballoon-freepage-reporting.xml b/tests/qemuxml2xmloutdata/virtio-options-memballoon-freepage-reporting.xml deleted file mode 120000 index e09d9d7283..0000000000 --- a/tests/qemuxml2xmloutdata/virtio-options-memballoon-freepage-reporting.xml +++ /dev/null @@ -1 +0,0 @@ -../qemuxml2argvdata/virtio-options-memballoon-freepage-reporting.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/virtio-options.xml b/tests/qemuxml2xmloutdata/virtio-options.xml deleted file mode 120000 index 26d8a2520a..0000000000 --- a/tests/qemuxml2xmloutdata/virtio-options.xml +++ /dev/null @@ -1 +0,0 @@ -../qemuxml2argvdata/virtio-options.xml \ No newline at end of file -- 2.30.2

In tests we don't want to use the full path to commands as it's unpleasant to keep that working on all systems. Add an integrated way to strip the prefix which will be used to replace virTestClearCommandPath() as a more systemic solution. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/libvirt_private.syms | 1 + src/util/vircommand.c | 35 ++++++++++++++++++++++++++++++++--- src/util/vircommand.h | 4 ++++ 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index f36400b5f6..7dd3a1ee10 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2031,6 +2031,7 @@ virCommandSetUID; virCommandSetUmask; virCommandSetWorkingDirectory; virCommandToString; +virCommandToStringFull; virCommandWait; virCommandWriteArgLog; virFork; diff --git a/src/util/vircommand.c b/src/util/vircommand.c index eb70f8cf85..8ae5badf0f 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -2055,9 +2055,10 @@ virCommandWriteArgLog(virCommandPtr cmd, int logfd) /** - * virCommandToString: + * virCommandToStringFull: * @cmd: the command to convert * @linebreaks: true to break line after each env var or option + * @stripCommandPath: strip the path leading to the binary of @cmd * * Call after adding all arguments and environment settings, but * before Run/RunAsync, to return a string representation of the @@ -2067,11 +2068,15 @@ virCommandWriteArgLog(virCommandPtr cmd, int logfd) * Caller is responsible for freeing the resulting string. */ char * -virCommandToString(virCommandPtr cmd, bool linebreaks) +virCommandToStringFull(virCommandPtr cmd, + bool linebreaks, + bool stripCommandPath) { size_t i; g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER; bool prevopt = false; + const char *command = cmd->args[0]; + g_autofree char *basename = NULL; /* Cannot assume virCommandRun will be called; so report the error * now. If virCommandRun is called, it will report the same error. */ @@ -2097,7 +2102,11 @@ virCommandToString(virCommandPtr cmd, bool linebreaks) if (linebreaks) virBufferAddLit(&buf, "\\\n"); } - virBufferEscapeShell(&buf, cmd->args[0]); + + if (stripCommandPath) + command = basename = g_path_get_basename(command); + + virBufferEscapeShell(&buf, command); for (i = 1; i < cmd->nargs; i++) { virBufferAddChar(&buf, ' '); if (linebreaks) { @@ -2116,6 +2125,26 @@ virCommandToString(virCommandPtr cmd, bool linebreaks) } +/** + * virCommandToString: + * @cmd: the command to convert + * @linebreaks: true to break line after each env var or option + * + * Call after adding all arguments and environment settings, but + * before Run/RunAsync, to return a string representation of the + * environment and arguments of cmd, suitably quoted for pasting into + * a shell. If virCommandRun cannot succeed (because of an + * out-of-memory condition while building cmd), NULL will be returned. + * Caller is responsible for freeing the resulting string. + */ +char * +virCommandToString(virCommandPtr cmd, + bool linebreaks) +{ + return virCommandToStringFull(cmd, linebreaks, false); +} + + int virCommandGetArgList(virCommandPtr cmd, char ***args, diff --git a/src/util/vircommand.h b/src/util/vircommand.h index a00f30f51f..5a700f8e15 100644 --- a/src/util/vircommand.h +++ b/src/util/vircommand.h @@ -171,6 +171,10 @@ void virCommandWriteArgLog(virCommandPtr cmd, int logfd); char *virCommandToString(virCommandPtr cmd, bool linebreaks) G_GNUC_WARN_UNUSED_RESULT; +char *virCommandToStringFull(virCommandPtr cmd, + bool linebreaks, + bool stripCommandPath); + int virCommandGetArgList(virCommandPtr cmd, char ***args, size_t *nargs); int virCommandExec(virCommandPtr cmd, gid_t *groups, int ngroups) G_GNUC_WARN_UNUSED_RESULT; -- 2.30.2

On a Friday in 2021, Peter Krempa wrote:
In tests we don't want to use the full path to commands as it's unpleasant to keep that working on all systems.
Add an integrated way to strip the prefix which will be used to replace virTestClearCommandPath() as a more systemic solution.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/libvirt_private.syms | 1 + src/util/vircommand.c | 35 ++++++++++++++++++++++++++++++++--- src/util/vircommand.h | 4 ++++ 3 files changed, 37 insertions(+), 3 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index f36400b5f6..7dd3a1ee10 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2031,6 +2031,7 @@ virCommandSetUID; virCommandSetUmask; virCommandSetWorkingDirectory; virCommandToString; +virCommandToStringFull; virCommandWait; virCommandWriteArgLog; virFork; diff --git a/src/util/vircommand.c b/src/util/vircommand.c index eb70f8cf85..8ae5badf0f 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -2055,9 +2055,10 @@ virCommandWriteArgLog(virCommandPtr cmd, int logfd)
/** - * virCommandToString: + * virCommandToStringFull: * @cmd: the command to convert * @linebreaks: true to break line after each env var or option + * @stripCommandPath: strip the path leading to the binary of @cmd * * Call after adding all arguments and environment settings, but * before Run/RunAsync, to return a string representation of the @@ -2067,11 +2068,15 @@ virCommandWriteArgLog(virCommandPtr cmd, int logfd) * Caller is responsible for freeing the resulting string. */ char * -virCommandToString(virCommandPtr cmd, bool linebreaks) +virCommandToStringFull(virCommandPtr cmd, + bool linebreaks, + bool stripCommandPath) { size_t i; g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER; bool prevopt = false; + const char *command = cmd->args[0]; + g_autofree char *basename = NULL;
/* Cannot assume virCommandRun will be called; so report the error * now. If virCommandRun is called, it will report the same error. */ @@ -2097,7 +2102,11 @@ virCommandToString(virCommandPtr cmd, bool linebreaks) if (linebreaks) virBufferAddLit(&buf, "\\\n"); } - virBufferEscapeShell(&buf, cmd->args[0]); + + if (stripCommandPath) + command = basename = g_path_get_basename(command); + + virBufferEscapeShell(&buf, command); for (i = 1; i < cmd->nargs; i++) { virBufferAddChar(&buf, ' '); if (linebreaks) { @@ -2116,6 +2125,26 @@ virCommandToString(virCommandPtr cmd, bool linebreaks) }
+/** + * virCommandToString: + * @cmd: the command to convert + * @linebreaks: true to break line after each env var or option + * + * Call after adding all arguments and environment settings, but + * before Run/RunAsync, to return a string representation of the + * environment and arguments of cmd, suitably quoted for pasting into + * a shell. If virCommandRun cannot succeed (because of an + * out-of-memory condition while building cmd), NULL will be returned. + * Caller is responsible for freeing the resulting string. + */
Here you copied the orignal comment, including the out-of-date reference to out-of-memory conditions. Consider dropping the comment completely since: a) it's internal API so it does not end up in a generated doc b) copying comments ensures not just one but two will go out-of-date eventually c) anyone needing to know what virCommandToString does can just look at virCommandToStringFull instead
+char * +virCommandToString(virCommandPtr cmd, + bool linebreaks) +{ + return virCommandToStringFull(cmd, linebreaks, false); +} + + int virCommandGetArgList(virCommandPtr cmd, char ***args,
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Replace virTestClearCommandPath by virCommandToStringFull which allows to strip the command prefix internally. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/storagepoolxml2argvtest.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/storagepoolxml2argvtest.c b/tests/storagepoolxml2argvtest.c index 967d1f21a8..0279437f63 100644 --- a/tests/storagepoolxml2argvtest.c +++ b/tests/storagepoolxml2argvtest.c @@ -74,12 +74,11 @@ testCompareXMLToArgvFiles(bool shouldFail, goto cleanup; }; - if (!(actualCmdline = virCommandToString(cmd, false))) { + if (!(actualCmdline = virCommandToStringFull(cmd, false, true))) { VIR_TEST_DEBUG("pool type '%s' failed to get commandline", defTypeStr); goto cleanup; } - virTestClearCommandPath(actualCmdline); if (virTestCompareToFile(actualCmdline, cmdline) < 0) goto cleanup; -- 2.30.2

While virCommandSetDryRun is used in tests only, there were some cases when error paths would not call the function with NULL arguments to reset the dry run infrastructure. Introduce virCommandDryRunToken type which must be allocated via virCommandDryRunTokenNew and passed to virCommandSetDryRun. This way we can use automatic variable cleaning to trigger the cleanup of virCommandSetDryRun parameters and also the use of the token variable ensures that all callers of virCommandSetDryRun clean up after themselves and also that the token isn't left unused in the code. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/libvirt_private.syms | 2 ++ src/util/vircommand.c | 44 +++++++++++++++++++++++++++++++- src/util/vircommandpriv.h | 9 ++++++- tests/networkxml2firewalltest.c | 4 +-- tests/nodedevmdevctltest.c | 12 ++++----- tests/nwfilterebiptablestest.c | 28 ++++++++++---------- tests/nwfilterxml2firewalltest.c | 4 +-- tests/sysinfotest.c | 4 +-- tests/virfirewalltest.c | 40 ++++++++++++++--------------- tests/viriscsitest.c | 12 ++++----- tests/virkmodtest.c | 8 +++--- tests/virnetdevbandwidthtest.c | 4 +-- 12 files changed, 111 insertions(+), 60 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 7dd3a1ee10..75340f85ae 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1989,6 +1989,8 @@ virCommandAllowCap; virCommandClearCaps; virCommandDaemonize; virCommandDoAsyncIO; +virCommandDryRunTokenFree; +virCommandDryRunTokenNew; virCommandExec; virCommandFree; virCommandGetArgList; diff --git a/src/util/vircommand.c b/src/util/vircommand.c index 8ae5badf0f..e816995636 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -3099,8 +3099,45 @@ virCommandDoAsyncIO(virCommandPtr cmd) cmd->flags |= VIR_EXEC_ASYNC_IO | VIR_EXEC_NONBLOCK; } + +struct _virCommandDryRunToken { + int dummy; +}; + + +/** + * virCommandDryRunTokenNew: + * + * Returns a token which is used with virCommandSetDryRun. Freeing the token + * with the appropriate automatic cleanup function ensures that the dry run + * environment is reset. + */ +virCommandDryRunToken * +virCommandDryRunTokenNew(void) +{ + return g_new0(virCommandDryRunToken, 1); +} + + +/** + * virCommandDryRunTokenFree: + * + * Helper to free a virCommandDryRunToken. Do not use this function directly, + * always declare virCommandDryRunToken as a g_autoptr. + */ +void +virCommandDryRunTokenFree(virCommandDryRunToken *tok) +{ + dryRunBuffer = NULL; + dryRunCallback = NULL; + dryRunOpaque = NULL; + g_free(tok); +} + + /** * virCommandSetDryRun: + * @tok: a virCommandDryRunToken obtained from virCommandDryRunTokenNew * @buf: buffer to store stringified commands * @callback: callback to process input/output/args * @@ -3132,15 +3169,20 @@ virCommandDoAsyncIO(virCommandPtr cmd) * To cancel this effect pass NULL for @buf and @callback. */ void -virCommandSetDryRun(virBufferPtr buf, +virCommandSetDryRun(virCommandDryRunToken *tok, + virBufferPtr buf, virCommandDryRunCallback cb, void *opaque) { + if (!tok) + abort(); + dryRunBuffer = buf; dryRunCallback = cb; dryRunOpaque = opaque; } + #ifndef WIN32 /** * virCommandRunRegex: diff --git a/src/util/vircommandpriv.h b/src/util/vircommandpriv.h index 80f1d1376c..d06a8f5e30 100644 --- a/src/util/vircommandpriv.h +++ b/src/util/vircommandpriv.h @@ -35,6 +35,13 @@ typedef void (*virCommandDryRunCallback)(const char *const*args, int *status, void *opaque); -void virCommandSetDryRun(virBufferPtr buf, +typedef struct _virCommandDryRunToken virCommandDryRunToken; + +virCommandDryRunToken * virCommandDryRunTokenNew(void); +void virCommandDryRunTokenFree(virCommandDryRunToken *token); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virCommandDryRunToken, virCommandDryRunTokenFree); + +void virCommandSetDryRun(virCommandDryRunToken *tok, + virBufferPtr buf, virCommandDryRunCallback cb, void *opaque); diff --git a/tests/networkxml2firewalltest.c b/tests/networkxml2firewalltest.c index d358f12897..952c076a19 100644 --- a/tests/networkxml2firewalltest.c +++ b/tests/networkxml2firewalltest.c @@ -96,8 +96,9 @@ static int testCompareXMLToArgvFiles(const char *xml, virNetworkDefPtr def = NULL; int ret = -1; char *actual; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(&buf, testCommandDryRun, NULL); + virCommandSetDryRun(dryRunToken, &buf, testCommandDryRun, NULL); if (!(def = virNetworkDefParseFile(xml, NULL))) goto cleanup; @@ -107,7 +108,6 @@ static int testCompareXMLToArgvFiles(const char *xml, actual = actualargv = virBufferContentAndReset(&buf); virTestClearCommandPath(actualargv); - virCommandSetDryRun(NULL, NULL, NULL); /* The first network to be created populates the * libvirt global chains. We must skip args for diff --git a/tests/nodedevmdevctltest.c b/tests/nodedevmdevctltest.c index 050424116f..cb9dbe5431 100644 --- a/tests/nodedevmdevctltest.c +++ b/tests/nodedevmdevctltest.c @@ -75,6 +75,7 @@ testMdevctlStartOrDefine(const char *virt_type, g_autofree char *errmsg = NULL; g_autofree char *stdinbuf = NULL; g_autoptr(virCommand) cmd = NULL; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); if (!(def = virNodeDeviceDefParseFile(mdevxml, create, virt_type))) goto cleanup; @@ -86,7 +87,7 @@ testMdevctlStartOrDefine(const char *virt_type, if (!cmd) goto cleanup; - virCommandSetDryRun(&buf, testCommandDryRunCallback, &stdinbuf); + virCommandSetDryRun(dryRunToken, &buf, testCommandDryRunCallback, &stdinbuf); if (virCommandRun(cmd, NULL) < 0) goto cleanup; @@ -102,7 +103,6 @@ testMdevctlStartOrDefine(const char *virt_type, ret = 0; cleanup: - virCommandSetDryRun(NULL, NULL, NULL); virNodeDeviceObjEndAPI(&obj); return ret; } @@ -152,13 +152,14 @@ testMdevctlUuidCommand(const char *uuid, GetStopUndefineCmdFunc func, const char int ret = -1; g_autoptr(virCommand) cmd = NULL; g_autofree char *errmsg = NULL; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); cmd = func(uuid, &errmsg); if (!cmd) goto cleanup; - virCommandSetDryRun(&buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); if (virCommandRun(cmd, NULL) < 0) goto cleanup; @@ -171,7 +172,6 @@ testMdevctlUuidCommand(const char *uuid, GetStopUndefineCmdFunc func, const char ret = 0; cleanup: - virCommandSetDryRun(NULL, NULL, NULL); return ret; } @@ -214,13 +214,14 @@ testMdevctlListDefined(const void *data G_GNUC_UNUSED) g_autofree char *cmdlinefile = g_strdup_printf("%s/nodedevmdevctldata/mdevctl-list-defined.argv", abs_srcdir); + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); cmd = nodeDeviceGetMdevctlListCommand(true, &output, &errmsg); if (!cmd) goto cleanup; - virCommandSetDryRun(&buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); if (virCommandRun(cmd, NULL) < 0) goto cleanup; @@ -234,7 +235,6 @@ testMdevctlListDefined(const void *data G_GNUC_UNUSED) cleanup: virBufferFreeAndReset(&buf); - virCommandSetDryRun(NULL, NULL, NULL); return ret; } diff --git a/tests/nwfilterebiptablestest.c b/tests/nwfilterebiptablestest.c index f47b4f1dfd..36df17d1c1 100644 --- a/tests/nwfilterebiptablestest.c +++ b/tests/nwfilterebiptablestest.c @@ -103,8 +103,9 @@ testNWFilterEBIPTablesAllTeardown(const void *opaque G_GNUC_UNUSED) "ebtables --concurrent -t nat -X libvirt-O-vnet0\n"; char *actual = NULL; int ret = -1; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(&buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); if (ebiptables_driver.allTeardown("vnet0") < 0) goto cleanup; @@ -119,7 +120,6 @@ testNWFilterEBIPTablesAllTeardown(const void *opaque G_GNUC_UNUSED) ret = 0; cleanup: - virCommandSetDryRun(NULL, NULL, NULL); VIR_FREE(actual); return ret; } @@ -170,8 +170,9 @@ testNWFilterEBIPTablesTearOldRules(const void *opaque G_GNUC_UNUSED) "ebtables --concurrent -t nat -E libvirt-P-vnet0 libvirt-O-vnet0\n"; char *actual = NULL; int ret = -1; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(&buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); if (ebiptables_driver.tearOldRules("vnet0") < 0) goto cleanup; @@ -186,7 +187,6 @@ testNWFilterEBIPTablesTearOldRules(const void *opaque G_GNUC_UNUSED) ret = 0; cleanup: - virCommandSetDryRun(NULL, NULL, NULL); VIR_FREE(actual); return ret; } @@ -215,8 +215,9 @@ testNWFilterEBIPTablesRemoveBasicRules(const void *opaque G_GNUC_UNUSED) "ebtables --concurrent -t nat -X libvirt-P-vnet0\n"; char *actual = NULL; int ret = -1; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(&buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); if (ebiptables_driver.removeBasicRules("vnet0") < 0) goto cleanup; @@ -231,7 +232,6 @@ testNWFilterEBIPTablesRemoveBasicRules(const void *opaque G_GNUC_UNUSED) ret = 0; cleanup: - virCommandSetDryRun(NULL, NULL, NULL); VIR_FREE(actual); return ret; } @@ -245,8 +245,9 @@ testNWFilterEBIPTablesTearNewRules(const void *opaque G_GNUC_UNUSED) VIR_NWFILTER_NEW_RULES_TEARDOWN; char *actual = NULL; int ret = -1; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(&buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); if (ebiptables_driver.tearNewRules("vnet0") < 0) goto cleanup; @@ -261,7 +262,6 @@ testNWFilterEBIPTablesTearNewRules(const void *opaque G_GNUC_UNUSED) ret = 0; cleanup: - virCommandSetDryRun(NULL, NULL, NULL); VIR_FREE(actual); return ret; } @@ -313,8 +313,9 @@ testNWFilterEBIPTablesApplyBasicRules(const void *opaque G_GNUC_UNUSED) char *actual = NULL; int ret = -1; virMacAddr mac = { .addr = { 0x10, 0x20, 0x30, 0x40, 0x50, 0x60 } }; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(&buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); if (ebiptables_driver.applyBasicRules("vnet0", &mac) < 0) goto cleanup; @@ -329,7 +330,6 @@ testNWFilterEBIPTablesApplyBasicRules(const void *opaque G_GNUC_UNUSED) ret = 0; cleanup: - virCommandSetDryRun(NULL, NULL, NULL); VIR_FREE(actual); return ret; } @@ -399,8 +399,9 @@ testNWFilterEBIPTablesApplyDHCPOnlyRules(const void *opaque G_GNUC_UNUSED) } } }; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(&buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); if (ebiptables_driver.applyDHCPOnlyRules("vnet0", &mac, &val, false) < 0) goto cleanup; @@ -415,7 +416,6 @@ testNWFilterEBIPTablesApplyDHCPOnlyRules(const void *opaque G_GNUC_UNUSED) ret = 0; cleanup: - virCommandSetDryRun(NULL, NULL, NULL); VIR_FREE(actual); return ret; } @@ -468,8 +468,9 @@ testNWFilterEBIPTablesApplyDropAllRules(const void *opaque G_GNUC_UNUSED) "ebtables --concurrent -t nat -E libvirt-P-vnet0 libvirt-O-vnet0\n"; char *actual = NULL; int ret = -1; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(&buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); if (ebiptables_driver.applyDropAllRules("vnet0") < 0) goto cleanup; @@ -484,7 +485,6 @@ testNWFilterEBIPTablesApplyDropAllRules(const void *opaque G_GNUC_UNUSED) ret = 0; cleanup: - virCommandSetDryRun(NULL, NULL, NULL); VIR_FREE(actual); return ret; } diff --git a/tests/nwfilterxml2firewalltest.c b/tests/nwfilterxml2firewalltest.c index 3e2ab0b0ba..38f2ab7040 100644 --- a/tests/nwfilterxml2firewalltest.c +++ b/tests/nwfilterxml2firewalltest.c @@ -371,10 +371,11 @@ static int testCompareXMLToArgvFiles(const char *xml, GHashTable *vars = virHashNew(virNWFilterVarValueHashFree); virNWFilterInst inst; int ret = -1; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); memset(&inst, 0, sizeof(inst)); - virCommandSetDryRun(&buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); if (!vars) goto cleanup; @@ -392,7 +393,6 @@ static int testCompareXMLToArgvFiles(const char *xml, actualargv = virBufferContentAndReset(&buf); virTestClearCommandPath(actualargv); - virCommandSetDryRun(NULL, NULL, NULL); testRemoveCommonRules(actualargv); diff --git a/tests/sysinfotest.c b/tests/sysinfotest.c index e40a4564a7..5d028d2fd3 100644 --- a/tests/sysinfotest.c +++ b/tests/sysinfotest.c @@ -96,17 +96,17 @@ testSysinfo(const void *data) g_autofree char *sysinfo = NULL; g_autofree char *cpuinfo = NULL; g_autofree char *expected = NULL; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); sysinfo = g_strdup_printf("%s/sysinfodata/%ssysinfo.data", abs_srcdir, testdata->name); cpuinfo = g_strdup_printf("%s/sysinfodata/%scpuinfo.data", abs_srcdir, testdata->name); expected = g_strdup_printf("%s/sysinfodata/%ssysinfo.expect", abs_srcdir, testdata->name); - virCommandSetDryRun(NULL, testDMIDecodeDryRun, sysinfo); + virCommandSetDryRun(dryRunToken, NULL, testDMIDecodeDryRun, sysinfo); virSysinfoSetup(sysinfo, cpuinfo); ret = testdata->func(); - virCommandSetDryRun(NULL, NULL, NULL); if (!ret) return -1; diff --git a/tests/virfirewalltest.c b/tests/virfirewalltest.c index 8bd73311fd..5515da4b4d 100644 --- a/tests/virfirewalltest.c +++ b/tests/virfirewalltest.c @@ -189,6 +189,7 @@ testFirewallSingleGroup(const void *opaque) IPTABLES_PATH " -w -A INPUT --source 192.168.122.1 --jump ACCEPT\n" IPTABLES_PATH " -w -A INPUT --source '!192.168.122.1' --jump REJECT\n"; const struct testFirewallData *data = opaque; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); fwDisabled = data->fwDisabled; if (virFirewallSetBackend(data->tryBackend) < 0) @@ -196,7 +197,7 @@ testFirewallSingleGroup(const void *opaque) if (data->expectBackend == VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend == VIR_FIREWALL_BACKEND_FIREWALLD) - virCommandSetDryRun(&cmdbuf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, NULL, NULL); else fwBuf = &cmdbuf; @@ -226,7 +227,6 @@ testFirewallSingleGroup(const void *opaque) ret = 0; cleanup: fwBuf = NULL; - virCommandSetDryRun(NULL, NULL, NULL); return ret; } @@ -243,6 +243,7 @@ testFirewallRemoveRule(const void *opaque) IPTABLES_PATH " -w -A INPUT --source '!192.168.122.1' --jump REJECT\n"; const struct testFirewallData *data = opaque; virFirewallRulePtr fwrule; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); fwDisabled = data->fwDisabled; if (virFirewallSetBackend(data->tryBackend) < 0) @@ -250,7 +251,7 @@ testFirewallRemoveRule(const void *opaque) if (data->expectBackend == VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend == VIR_FIREWALL_BACKEND_FIREWALLD) - virCommandSetDryRun(&cmdbuf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, NULL, NULL); else fwBuf = &cmdbuf; @@ -286,7 +287,6 @@ testFirewallRemoveRule(const void *opaque) ret = 0; cleanup: fwBuf = NULL; - virCommandSetDryRun(NULL, NULL, NULL); return ret; } @@ -304,6 +304,7 @@ testFirewallManyGroups(const void *opaque G_GNUC_UNUSED) IPTABLES_PATH " -w -A OUTPUT --source 192.168.122.1 --jump ACCEPT\n" IPTABLES_PATH " -w -A OUTPUT --jump DROP\n"; const struct testFirewallData *data = opaque; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); fwDisabled = data->fwDisabled; if (virFirewallSetBackend(data->tryBackend) < 0) @@ -311,7 +312,7 @@ testFirewallManyGroups(const void *opaque G_GNUC_UNUSED) if (data->expectBackend == VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend == VIR_FIREWALL_BACKEND_FIREWALLD) - virCommandSetDryRun(&cmdbuf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, NULL, NULL); else fwBuf = &cmdbuf; @@ -353,7 +354,6 @@ testFirewallManyGroups(const void *opaque G_GNUC_UNUSED) ret = 0; cleanup: fwBuf = NULL; - virCommandSetDryRun(NULL, NULL, NULL); return ret; } @@ -392,6 +392,7 @@ testFirewallIgnoreFailGroup(const void *opaque G_GNUC_UNUSED) IPTABLES_PATH " -w -A OUTPUT --source 192.168.122.1 --jump ACCEPT\n" IPTABLES_PATH " -w -A OUTPUT --jump DROP\n"; const struct testFirewallData *data = opaque; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); fwDisabled = data->fwDisabled; if (virFirewallSetBackend(data->tryBackend) < 0) @@ -399,7 +400,7 @@ testFirewallIgnoreFailGroup(const void *opaque G_GNUC_UNUSED) if (data->expectBackend == VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend == VIR_FIREWALL_BACKEND_FIREWALLD) { - virCommandSetDryRun(&cmdbuf, testFirewallRollbackHook, NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, testFirewallRollbackHook, NULL); } else { fwBuf = &cmdbuf; fwError = true; @@ -443,7 +444,6 @@ testFirewallIgnoreFailGroup(const void *opaque G_GNUC_UNUSED) ret = 0; cleanup: fwBuf = NULL; - virCommandSetDryRun(NULL, NULL, NULL); return ret; } @@ -461,6 +461,7 @@ testFirewallIgnoreFailRule(const void *opaque G_GNUC_UNUSED) IPTABLES_PATH " -w -A OUTPUT --source 192.168.122.1 --jump ACCEPT\n" IPTABLES_PATH " -w -A OUTPUT --jump DROP\n"; const struct testFirewallData *data = opaque; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); fwDisabled = data->fwDisabled; if (virFirewallSetBackend(data->tryBackend) < 0) @@ -468,7 +469,7 @@ testFirewallIgnoreFailRule(const void *opaque G_GNUC_UNUSED) if (data->expectBackend == VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend == VIR_FIREWALL_BACKEND_FIREWALLD) { - virCommandSetDryRun(&cmdbuf, testFirewallRollbackHook, NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, testFirewallRollbackHook, NULL); } else { fwBuf = &cmdbuf; fwError = true; @@ -511,7 +512,6 @@ testFirewallIgnoreFailRule(const void *opaque G_GNUC_UNUSED) ret = 0; cleanup: fwBuf = NULL; - virCommandSetDryRun(NULL, NULL, NULL); return ret; } @@ -527,6 +527,7 @@ testFirewallNoRollback(const void *opaque G_GNUC_UNUSED) IPTABLES_PATH " -w -A INPUT --source 192.168.122.1 --jump ACCEPT\n" IPTABLES_PATH " -w -A INPUT --source 192.168.122.255 --jump REJECT\n"; const struct testFirewallData *data = opaque; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); fwDisabled = data->fwDisabled; if (virFirewallSetBackend(data->tryBackend) < 0) @@ -534,7 +535,7 @@ testFirewallNoRollback(const void *opaque G_GNUC_UNUSED) if (data->expectBackend == VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend == VIR_FIREWALL_BACKEND_FIREWALLD) { - virCommandSetDryRun(&cmdbuf, testFirewallRollbackHook, NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, testFirewallRollbackHook, NULL); } else { fwBuf = &cmdbuf; fwError = true; @@ -573,7 +574,6 @@ testFirewallNoRollback(const void *opaque G_GNUC_UNUSED) ret = 0; cleanup: fwBuf = NULL; - virCommandSetDryRun(NULL, NULL, NULL); return ret; } @@ -591,6 +591,7 @@ testFirewallSingleRollback(const void *opaque G_GNUC_UNUSED) IPTABLES_PATH " -w -D INPUT --source 192.168.122.255 --jump REJECT\n" IPTABLES_PATH " -w -D INPUT --source '!192.168.122.1' --jump REJECT\n"; const struct testFirewallData *data = opaque; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); fwDisabled = data->fwDisabled; if (virFirewallSetBackend(data->tryBackend) < 0) @@ -598,7 +599,7 @@ testFirewallSingleRollback(const void *opaque G_GNUC_UNUSED) if (data->expectBackend == VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend == VIR_FIREWALL_BACKEND_FIREWALLD) { - virCommandSetDryRun(&cmdbuf, testFirewallRollbackHook, NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, testFirewallRollbackHook, NULL); } else { fwError = true; fwBuf = &cmdbuf; @@ -654,7 +655,6 @@ testFirewallSingleRollback(const void *opaque G_GNUC_UNUSED) ret = 0; cleanup: fwBuf = NULL; - virCommandSetDryRun(NULL, NULL, NULL); return ret; } @@ -671,6 +671,7 @@ testFirewallManyRollback(const void *opaque G_GNUC_UNUSED) IPTABLES_PATH " -w -D INPUT --source 192.168.122.255 --jump REJECT\n" IPTABLES_PATH " -w -D INPUT --source '!192.168.122.1' --jump REJECT\n"; const struct testFirewallData *data = opaque; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); fwDisabled = data->fwDisabled; if (virFirewallSetBackend(data->tryBackend) < 0) @@ -678,7 +679,7 @@ testFirewallManyRollback(const void *opaque G_GNUC_UNUSED) if (data->expectBackend == VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend == VIR_FIREWALL_BACKEND_FIREWALLD) { - virCommandSetDryRun(&cmdbuf, testFirewallRollbackHook, NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, testFirewallRollbackHook, NULL); } else { fwBuf = &cmdbuf; fwError = true; @@ -738,7 +739,6 @@ testFirewallManyRollback(const void *opaque G_GNUC_UNUSED) ret = 0; cleanup: fwBuf = NULL; - virCommandSetDryRun(NULL, NULL, NULL); return ret; } @@ -759,6 +759,7 @@ testFirewallChainedRollback(const void *opaque G_GNUC_UNUSED) IPTABLES_PATH " -w -D INPUT --source 192.168.122.255 --jump REJECT\n" IPTABLES_PATH " -w -D INPUT --source '!192.168.122.1' --jump REJECT\n"; const struct testFirewallData *data = opaque; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); fwDisabled = data->fwDisabled; if (virFirewallSetBackend(data->tryBackend) < 0) @@ -766,7 +767,7 @@ testFirewallChainedRollback(const void *opaque G_GNUC_UNUSED) if (data->expectBackend == VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend == VIR_FIREWALL_BACKEND_FIREWALLD) { - virCommandSetDryRun(&cmdbuf, testFirewallRollbackHook, NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, testFirewallRollbackHook, NULL); } else { fwBuf = &cmdbuf; fwError = true; @@ -852,7 +853,6 @@ testFirewallChainedRollback(const void *opaque G_GNUC_UNUSED) ret = 0; cleanup: fwBuf = NULL; - virCommandSetDryRun(NULL, NULL, NULL); return ret; } @@ -953,6 +953,7 @@ testFirewallQuery(const void *opaque G_GNUC_UNUSED) IPTABLES_PATH " -w -A INPUT --source 192.168.122.128 --jump REJECT\n" IPTABLES_PATH " -w -A INPUT --source '!192.168.122.1' --jump REJECT\n"; const struct testFirewallData *data = opaque; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); expectedLineNum = 0; expectedLineError = false; @@ -962,7 +963,7 @@ testFirewallQuery(const void *opaque G_GNUC_UNUSED) if (data->expectBackend == VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend == VIR_FIREWALL_BACKEND_FIREWALLD) { - virCommandSetDryRun(&cmdbuf, testFirewallQueryHook, NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, testFirewallQueryHook, NULL); } else { fwBuf = &cmdbuf; fwError = true; @@ -1030,7 +1031,6 @@ testFirewallQuery(const void *opaque G_GNUC_UNUSED) ret = 0; cleanup: fwBuf = NULL; - virCommandSetDryRun(NULL, NULL, NULL); return ret; } diff --git a/tests/viriscsitest.c b/tests/viriscsitest.c index e86d3970b6..e673b69ed6 100644 --- a/tests/viriscsitest.c +++ b/tests/viriscsitest.c @@ -212,10 +212,11 @@ testISCSIGetSession(const void *data) struct testIscsiadmCbData cbData = { 0 }; char *actual_session = NULL; int ret = -1; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); cbData.output_version = info->output_version; - virCommandSetDryRun(NULL, testIscsiadmCb, &cbData); + virCommandSetDryRun(dryRunToken, NULL, testIscsiadmCb, &cbData); actual_session = virISCSIGetSession(info->device_path, true); @@ -230,7 +231,6 @@ testISCSIGetSession(const void *data) ret = 0; cleanup: - virCommandSetDryRun(NULL, NULL, NULL); VIR_FREE(actual_session); return ret; } @@ -250,8 +250,9 @@ testISCSIScanTargets(const void *data) char **targets = NULL; int ret = -1; size_t i; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(NULL, testIscsiadmCb, NULL); + virCommandSetDryRun(dryRunToken, NULL, testIscsiadmCb, NULL); if (virISCSIScanTargets(info->portal, NULL, false, &ntargets, &targets) < 0) @@ -276,7 +277,6 @@ testISCSIScanTargets(const void *data) ret = 0; cleanup: - virCommandSetDryRun(NULL, NULL, NULL); for (i = 0; i < ntargets; i++) VIR_FREE(targets[i]); VIR_FREE(targets); @@ -297,15 +297,15 @@ testISCSIConnectionLogin(const void *data) const struct testConnectionInfoLogin *info = data; struct testIscsiadmCbData cbData = { 0 }; int ret = -1; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(NULL, testIscsiadmCb, &cbData); + virCommandSetDryRun(dryRunToken, NULL, testIscsiadmCb, &cbData); if (virISCSIConnectionLogin(info->portal, info->initiatoriqn, info->target) < 0) goto cleanup; ret = 0; cleanup: - virCommandSetDryRun(NULL, NULL, NULL); return ret; } diff --git a/tests/virkmodtest.c b/tests/virkmodtest.c index 369eb8baca..d278032aec 100644 --- a/tests/virkmodtest.c +++ b/tests/virkmodtest.c @@ -61,8 +61,9 @@ testKModLoad(const void *args G_GNUC_UNUSED) int ret = -1; char *errbuf = NULL; g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(&buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); errbuf = virKModLoad(MODNAME); if (errbuf) { @@ -76,7 +77,6 @@ testKModLoad(const void *args G_GNUC_UNUSED) ret = 0; cleanup: - virCommandSetDryRun(NULL, NULL, NULL); VIR_FREE(errbuf); return ret; } @@ -88,8 +88,9 @@ testKModUnload(const void *args G_GNUC_UNUSED) int ret = -1; char *errbuf = NULL; g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(&buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); errbuf = virKModUnload(MODNAME); if (errbuf) { @@ -103,7 +104,6 @@ testKModUnload(const void *args G_GNUC_UNUSED) ret = 0; cleanup: - virCommandSetDryRun(NULL, NULL, NULL); VIR_FREE(errbuf); return ret; } diff --git a/tests/virnetdevbandwidthtest.c b/tests/virnetdevbandwidthtest.c index 6f3cab27be..52742dff05 100644 --- a/tests/virnetdevbandwidthtest.c +++ b/tests/virnetdevbandwidthtest.c @@ -72,13 +72,14 @@ testVirNetDevBandwidthSet(const void *data) g_autoptr(virNetDevBandwidth) band = NULL; g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER; char *actual_cmd = NULL; + g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); PARSE(info->band, band); if (!iface) iface = "eth0"; - virCommandSetDryRun(&buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); if (virNetDevBandwidthSet(iface, band, info->hierarchical_class, true) < 0) goto cleanup; @@ -97,7 +98,6 @@ testVirNetDevBandwidthSet(const void *data) ret = 0; cleanup: - virCommandSetDryRun(NULL, NULL, NULL); VIR_FREE(actual_cmd); return ret; } -- 2.30.2

On Fri, Apr 09, 2021 at 02:50:09PM +0200, Peter Krempa wrote:
While virCommandSetDryRun is used in tests only, there were some cases when error paths would not call the function with NULL arguments to reset the dry run infrastructure.
Introduce virCommandDryRunToken type which must be allocated via virCommandDryRunTokenNew and passed to virCommandSetDryRun.
This way we can use automatic variable cleaning to trigger the cleanup of virCommandSetDryRun parameters and also the use of the token variable ensures that all callers of virCommandSetDryRun clean up after themselves and also that the token isn't left unused in the code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/libvirt_private.syms | 2 ++ src/util/vircommand.c | 44 +++++++++++++++++++++++++++++++- src/util/vircommandpriv.h | 9 ++++++- tests/networkxml2firewalltest.c | 4 +-- tests/nodedevmdevctltest.c | 12 ++++----- tests/nwfilterebiptablestest.c | 28 ++++++++++---------- tests/nwfilterxml2firewalltest.c | 4 +-- tests/sysinfotest.c | 4 +-- tests/virfirewalltest.c | 40 ++++++++++++++--------------- tests/viriscsitest.c | 12 ++++----- tests/virkmodtest.c | 8 +++--- tests/virnetdevbandwidthtest.c | 4 +-- 12 files changed, 111 insertions(+), 60 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 7dd3a1ee10..75340f85ae 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1989,6 +1989,8 @@ virCommandAllowCap; virCommandClearCaps; virCommandDaemonize; virCommandDoAsyncIO; +virCommandDryRunTokenFree; +virCommandDryRunTokenNew; virCommandExec; virCommandFree; virCommandGetArgList; diff --git a/src/util/vircommand.c b/src/util/vircommand.c index 8ae5badf0f..e816995636 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -3099,8 +3099,45 @@ virCommandDoAsyncIO(virCommandPtr cmd) cmd->flags |= VIR_EXEC_ASYNC_IO | VIR_EXEC_NONBLOCK; }
+ +struct _virCommandDryRunToken { + int dummy; +};
I wanted to complain that having normal struct containing the dryRunBuffer, dryRunCallback, dryRunOpaque would be better but looking at this file they are global variables used in other functions as well so it would be pain to refactor it and definitely not in scope of this patch or patch series.
+ + +/** + * virCommandDryRunTokenNew: + * + * Returns a token which is used with virCommandSetDryRun. Freeing the token + * with the appropriate automatic cleanup function ensures that the dry run + * environment is reset. + */ +virCommandDryRunToken * +virCommandDryRunTokenNew(void) +{ + return g_new0(virCommandDryRunToken, 1); +} + + +/** + * virCommandDryRunTokenFree: + * + * Helper to free a virCommandDryRunToken. Do not use this function directly, + * always declare virCommandDryRunToken as a g_autoptr. + */ +void +virCommandDryRunTokenFree(virCommandDryRunToken *tok) +{ + dryRunBuffer = NULL; + dryRunCallback = NULL; + dryRunOpaque = NULL; + g_free(tok); +} + + /** * virCommandSetDryRun: + * @tok: a virCommandDryRunToken obtained from virCommandDryRunTokenNew * @buf: buffer to store stringified commands * @callback: callback to process input/output/args * @@ -3132,15 +3169,20 @@ virCommandDoAsyncIO(virCommandPtr cmd) * To cancel this effect pass NULL for @buf and @callback. */ void -virCommandSetDryRun(virBufferPtr buf, +virCommandSetDryRun(virCommandDryRunToken *tok, + virBufferPtr buf, virCommandDryRunCallback cb, void *opaque) { + if (!tok) + abort(); + dryRunBuffer = buf; dryRunCallback = cb; dryRunOpaque = opaque; }
+
Unrelated new line addition.
#ifndef WIN32 /** * virCommandRunRegex:
Pavel

virCommandToStringFull used internally when virCommandSetDryRun is requested allows to strip command path and wrap lines nicely. Expose these via virCommandSetDryRun so that tests can use those features instead of local hacks. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/util/vircommand.c | 21 ++++++++++++++++----- src/util/vircommandpriv.h | 2 ++ tests/networkxml2firewalltest.c | 2 +- tests/nodedevmdevctltest.c | 6 +++--- tests/nwfilterebiptablestest.c | 14 +++++++------- tests/nwfilterxml2firewalltest.c | 2 +- tests/sysinfotest.c | 2 +- tests/virfirewalltest.c | 20 ++++++++++---------- tests/viriscsitest.c | 6 +++--- tests/virkmodtest.c | 4 ++-- tests/virnetdevbandwidthtest.c | 2 +- 11 files changed, 47 insertions(+), 34 deletions(-) diff --git a/src/util/vircommand.c b/src/util/vircommand.c index e816995636..0eda42418f 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -158,6 +158,8 @@ struct _virCommand { /* See virCommandSetDryRun for description for this variable */ static virBufferPtr dryRunBuffer; +static bool dryRunBufferArgLinebreaks; +static bool dryRunBufferCommandStripPath; static virCommandDryRunCallback dryRunCallback; static void *dryRunOpaque; #ifndef WIN32 @@ -2585,18 +2587,18 @@ virCommandRunAsync(virCommandPtr cmd, pid_t *pid) goto cleanup; } - str = virCommandToString(cmd, false); if (dryRunBuffer || dryRunCallback) { + g_autofree char *cmdstr = NULL; dryRunStatus = 0; - if (!str) { - /* error already reported by virCommandToString */ + + if (!(cmdstr = virCommandToStringFull(cmd, dryRunBufferArgLinebreaks, + dryRunBufferCommandStripPath))) goto cleanup; - } if (dryRunBuffer) { VIR_DEBUG("Dry run requested, appending stringified " "command to dryRunBuffer=%p", dryRunBuffer); - virBufferAdd(dryRunBuffer, str, -1); + virBufferAdd(dryRunBuffer, cmdstr, -1); virBufferAddChar(dryRunBuffer, '\n'); } if (dryRunCallback) { @@ -2609,6 +2611,7 @@ virCommandRunAsync(virCommandPtr cmd, pid_t *pid) goto cleanup; } + str = virCommandToString(cmd, false); VIR_DEBUG("About to run %s", str ? str : cmd->args[0]); ret = virExec(cmd); VIR_DEBUG("Command result %d, with PID %d", @@ -3129,6 +3132,8 @@ void virCommandDryRunTokenFree(virCommandDryRunToken *tok) { dryRunBuffer = NULL; + dryRunBufferArgLinebreaks = false; + dryRunBufferCommandStripPath = false; dryRunCallback = NULL; dryRunOpaque = NULL; g_free(tok); @@ -3139,6 +3144,8 @@ virCommandDryRunTokenFree(virCommandDryRunToken *tok) * virCommandSetDryRun: * @tok: a virCommandDryRunToken obtained from virCommandDryRunTokenNew * @buf: buffer to store stringified commands + * @bufArgLinebreaks: add linebreaks after command and every argument or argument pair + * @bufCommandStripPath: strip leading paths of command * @callback: callback to process input/output/args * * Sometimes it's desired to not actually run given command, but @@ -3171,6 +3178,8 @@ virCommandDryRunTokenFree(virCommandDryRunToken *tok) void virCommandSetDryRun(virCommandDryRunToken *tok, virBufferPtr buf, + bool bufArgLinebreaks, + bool bufCommandStripPath, virCommandDryRunCallback cb, void *opaque) { @@ -3178,6 +3187,8 @@ virCommandSetDryRun(virCommandDryRunToken *tok, abort(); dryRunBuffer = buf; + dryRunBufferArgLinebreaks = bufArgLinebreaks; + dryRunBufferCommandStripPath = bufCommandStripPath; dryRunCallback = cb; dryRunOpaque = opaque; } diff --git a/src/util/vircommandpriv.h b/src/util/vircommandpriv.h index d06a8f5e30..6e01585766 100644 --- a/src/util/vircommandpriv.h +++ b/src/util/vircommandpriv.h @@ -43,5 +43,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(virCommandDryRunToken, virCommandDryRunTokenFree); void virCommandSetDryRun(virCommandDryRunToken *tok, virBufferPtr buf, + bool bufArgLinebreaks, + bool bufCommandStripPath, virCommandDryRunCallback cb, void *opaque); diff --git a/tests/networkxml2firewalltest.c b/tests/networkxml2firewalltest.c index 952c076a19..2974d3f2af 100644 --- a/tests/networkxml2firewalltest.c +++ b/tests/networkxml2firewalltest.c @@ -98,7 +98,7 @@ static int testCompareXMLToArgvFiles(const char *xml, char *actual; g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(dryRunToken, &buf, testCommandDryRun, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, testCommandDryRun, NULL); if (!(def = virNetworkDefParseFile(xml, NULL))) goto cleanup; diff --git a/tests/nodedevmdevctltest.c b/tests/nodedevmdevctltest.c index cb9dbe5431..48d4f9e818 100644 --- a/tests/nodedevmdevctltest.c +++ b/tests/nodedevmdevctltest.c @@ -87,7 +87,7 @@ testMdevctlStartOrDefine(const char *virt_type, if (!cmd) goto cleanup; - virCommandSetDryRun(dryRunToken, &buf, testCommandDryRunCallback, &stdinbuf); + virCommandSetDryRun(dryRunToken, &buf, false, false, testCommandDryRunCallback, &stdinbuf); if (virCommandRun(cmd, NULL) < 0) goto cleanup; @@ -159,7 +159,7 @@ testMdevctlUuidCommand(const char *uuid, GetStopUndefineCmdFunc func, const char if (!cmd) goto cleanup; - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); if (virCommandRun(cmd, NULL) < 0) goto cleanup; @@ -221,7 +221,7 @@ testMdevctlListDefined(const void *data G_GNUC_UNUSED) if (!cmd) goto cleanup; - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); if (virCommandRun(cmd, NULL) < 0) goto cleanup; diff --git a/tests/nwfilterebiptablestest.c b/tests/nwfilterebiptablestest.c index 36df17d1c1..c20b2bed42 100644 --- a/tests/nwfilterebiptablestest.c +++ b/tests/nwfilterebiptablestest.c @@ -105,7 +105,7 @@ testNWFilterEBIPTablesAllTeardown(const void *opaque G_GNUC_UNUSED) int ret = -1; g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); if (ebiptables_driver.allTeardown("vnet0") < 0) goto cleanup; @@ -172,7 +172,7 @@ testNWFilterEBIPTablesTearOldRules(const void *opaque G_GNUC_UNUSED) int ret = -1; g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); if (ebiptables_driver.tearOldRules("vnet0") < 0) goto cleanup; @@ -217,7 +217,7 @@ testNWFilterEBIPTablesRemoveBasicRules(const void *opaque G_GNUC_UNUSED) int ret = -1; g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); if (ebiptables_driver.removeBasicRules("vnet0") < 0) goto cleanup; @@ -247,7 +247,7 @@ testNWFilterEBIPTablesTearNewRules(const void *opaque G_GNUC_UNUSED) int ret = -1; g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); if (ebiptables_driver.tearNewRules("vnet0") < 0) goto cleanup; @@ -315,7 +315,7 @@ testNWFilterEBIPTablesApplyBasicRules(const void *opaque G_GNUC_UNUSED) virMacAddr mac = { .addr = { 0x10, 0x20, 0x30, 0x40, 0x50, 0x60 } }; g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); if (ebiptables_driver.applyBasicRules("vnet0", &mac) < 0) goto cleanup; @@ -401,7 +401,7 @@ testNWFilterEBIPTablesApplyDHCPOnlyRules(const void *opaque G_GNUC_UNUSED) }; g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); if (ebiptables_driver.applyDHCPOnlyRules("vnet0", &mac, &val, false) < 0) goto cleanup; @@ -470,7 +470,7 @@ testNWFilterEBIPTablesApplyDropAllRules(const void *opaque G_GNUC_UNUSED) int ret = -1; g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); if (ebiptables_driver.applyDropAllRules("vnet0") < 0) goto cleanup; diff --git a/tests/nwfilterxml2firewalltest.c b/tests/nwfilterxml2firewalltest.c index 38f2ab7040..f72cd06e58 100644 --- a/tests/nwfilterxml2firewalltest.c +++ b/tests/nwfilterxml2firewalltest.c @@ -375,7 +375,7 @@ static int testCompareXMLToArgvFiles(const char *xml, memset(&inst, 0, sizeof(inst)); - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); if (!vars) goto cleanup; diff --git a/tests/sysinfotest.c b/tests/sysinfotest.c index 5d028d2fd3..9129b6db7a 100644 --- a/tests/sysinfotest.c +++ b/tests/sysinfotest.c @@ -102,7 +102,7 @@ testSysinfo(const void *data) cpuinfo = g_strdup_printf("%s/sysinfodata/%scpuinfo.data", abs_srcdir, testdata->name); expected = g_strdup_printf("%s/sysinfodata/%ssysinfo.expect", abs_srcdir, testdata->name); - virCommandSetDryRun(dryRunToken, NULL, testDMIDecodeDryRun, sysinfo); + virCommandSetDryRun(dryRunToken, NULL, false, false, testDMIDecodeDryRun, sysinfo); virSysinfoSetup(sysinfo, cpuinfo); diff --git a/tests/virfirewalltest.c b/tests/virfirewalltest.c index 5515da4b4d..ba44201fa2 100644 --- a/tests/virfirewalltest.c +++ b/tests/virfirewalltest.c @@ -197,7 +197,7 @@ testFirewallSingleGroup(const void *opaque) if (data->expectBackend == VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend == VIR_FIREWALL_BACKEND_FIREWALLD) - virCommandSetDryRun(dryRunToken, &cmdbuf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, false, false, NULL, NULL); else fwBuf = &cmdbuf; @@ -251,7 +251,7 @@ testFirewallRemoveRule(const void *opaque) if (data->expectBackend == VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend == VIR_FIREWALL_BACKEND_FIREWALLD) - virCommandSetDryRun(dryRunToken, &cmdbuf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, false, false, NULL, NULL); else fwBuf = &cmdbuf; @@ -312,7 +312,7 @@ testFirewallManyGroups(const void *opaque G_GNUC_UNUSED) if (data->expectBackend == VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend == VIR_FIREWALL_BACKEND_FIREWALLD) - virCommandSetDryRun(dryRunToken, &cmdbuf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, false, false, NULL, NULL); else fwBuf = &cmdbuf; @@ -400,7 +400,7 @@ testFirewallIgnoreFailGroup(const void *opaque G_GNUC_UNUSED) if (data->expectBackend == VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend == VIR_FIREWALL_BACKEND_FIREWALLD) { - virCommandSetDryRun(dryRunToken, &cmdbuf, testFirewallRollbackHook, NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, false, false, testFirewallRollbackHook, NULL); } else { fwBuf = &cmdbuf; fwError = true; @@ -469,7 +469,7 @@ testFirewallIgnoreFailRule(const void *opaque G_GNUC_UNUSED) if (data->expectBackend == VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend == VIR_FIREWALL_BACKEND_FIREWALLD) { - virCommandSetDryRun(dryRunToken, &cmdbuf, testFirewallRollbackHook, NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, false, false, testFirewallRollbackHook, NULL); } else { fwBuf = &cmdbuf; fwError = true; @@ -535,7 +535,7 @@ testFirewallNoRollback(const void *opaque G_GNUC_UNUSED) if (data->expectBackend == VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend == VIR_FIREWALL_BACKEND_FIREWALLD) { - virCommandSetDryRun(dryRunToken, &cmdbuf, testFirewallRollbackHook, NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, false, false, testFirewallRollbackHook, NULL); } else { fwBuf = &cmdbuf; fwError = true; @@ -599,7 +599,7 @@ testFirewallSingleRollback(const void *opaque G_GNUC_UNUSED) if (data->expectBackend == VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend == VIR_FIREWALL_BACKEND_FIREWALLD) { - virCommandSetDryRun(dryRunToken, &cmdbuf, testFirewallRollbackHook, NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, false, false, testFirewallRollbackHook, NULL); } else { fwError = true; fwBuf = &cmdbuf; @@ -679,7 +679,7 @@ testFirewallManyRollback(const void *opaque G_GNUC_UNUSED) if (data->expectBackend == VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend == VIR_FIREWALL_BACKEND_FIREWALLD) { - virCommandSetDryRun(dryRunToken, &cmdbuf, testFirewallRollbackHook, NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, false, false, testFirewallRollbackHook, NULL); } else { fwBuf = &cmdbuf; fwError = true; @@ -767,7 +767,7 @@ testFirewallChainedRollback(const void *opaque G_GNUC_UNUSED) if (data->expectBackend == VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend == VIR_FIREWALL_BACKEND_FIREWALLD) { - virCommandSetDryRun(dryRunToken, &cmdbuf, testFirewallRollbackHook, NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, false, false, testFirewallRollbackHook, NULL); } else { fwBuf = &cmdbuf; fwError = true; @@ -963,7 +963,7 @@ testFirewallQuery(const void *opaque G_GNUC_UNUSED) if (data->expectBackend == VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend == VIR_FIREWALL_BACKEND_FIREWALLD) { - virCommandSetDryRun(dryRunToken, &cmdbuf, testFirewallQueryHook, NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, false, false, testFirewallQueryHook, NULL); } else { fwBuf = &cmdbuf; fwError = true; diff --git a/tests/viriscsitest.c b/tests/viriscsitest.c index e673b69ed6..37922ba552 100644 --- a/tests/viriscsitest.c +++ b/tests/viriscsitest.c @@ -216,7 +216,7 @@ testISCSIGetSession(const void *data) cbData.output_version = info->output_version; - virCommandSetDryRun(dryRunToken, NULL, testIscsiadmCb, &cbData); + virCommandSetDryRun(dryRunToken, NULL, false, false, testIscsiadmCb, &cbData); actual_session = virISCSIGetSession(info->device_path, true); @@ -252,7 +252,7 @@ testISCSIScanTargets(const void *data) size_t i; g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(dryRunToken, NULL, testIscsiadmCb, NULL); + virCommandSetDryRun(dryRunToken, NULL, false, false, testIscsiadmCb, NULL); if (virISCSIScanTargets(info->portal, NULL, false, &ntargets, &targets) < 0) @@ -299,7 +299,7 @@ testISCSIConnectionLogin(const void *data) int ret = -1; g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(dryRunToken, NULL, testIscsiadmCb, &cbData); + virCommandSetDryRun(dryRunToken, NULL, false, false, testIscsiadmCb, &cbData); if (virISCSIConnectionLogin(info->portal, info->initiatoriqn, info->target) < 0) goto cleanup; diff --git a/tests/virkmodtest.c b/tests/virkmodtest.c index d278032aec..b2dfecb42c 100644 --- a/tests/virkmodtest.c +++ b/tests/virkmodtest.c @@ -63,7 +63,7 @@ testKModLoad(const void *args G_GNUC_UNUSED) g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER; g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); errbuf = virKModLoad(MODNAME); if (errbuf) { @@ -90,7 +90,7 @@ testKModUnload(const void *args G_GNUC_UNUSED) g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER; g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); errbuf = virKModUnload(MODNAME); if (errbuf) { diff --git a/tests/virnetdevbandwidthtest.c b/tests/virnetdevbandwidthtest.c index 52742dff05..f399c95da0 100644 --- a/tests/virnetdevbandwidthtest.c +++ b/tests/virnetdevbandwidthtest.c @@ -79,7 +79,7 @@ testVirNetDevBandwidthSet(const void *data) if (!iface) iface = "eth0"; - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); if (virNetDevBandwidthSet(iface, band, info->hierarchical_class, true) < 0) goto cleanup; -- 2.30.2

Enable the internal path clearing instead of using virTestClearCommandPath. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/networkxml2firewalltest.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/networkxml2firewalltest.c b/tests/networkxml2firewalltest.c index 2974d3f2af..16249c49fd 100644 --- a/tests/networkxml2firewalltest.c +++ b/tests/networkxml2firewalltest.c @@ -98,7 +98,7 @@ static int testCompareXMLToArgvFiles(const char *xml, char *actual; g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(dryRunToken, &buf, false, false, testCommandDryRun, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, true, testCommandDryRun, NULL); if (!(def = virNetworkDefParseFile(xml, NULL))) goto cleanup; @@ -107,7 +107,6 @@ static int testCompareXMLToArgvFiles(const char *xml, goto cleanup; actual = actualargv = virBufferContentAndReset(&buf); - virTestClearCommandPath(actualargv); /* The first network to be created populates the * libvirt global chains. We must skip args for -- 2.30.2

Enable the internal path clearing instead of using virTestClearCommandPath. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/nwfilterxml2firewalltest.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/nwfilterxml2firewalltest.c b/tests/nwfilterxml2firewalltest.c index f72cd06e58..44b2ad04ba 100644 --- a/tests/nwfilterxml2firewalltest.c +++ b/tests/nwfilterxml2firewalltest.c @@ -375,7 +375,7 @@ static int testCompareXMLToArgvFiles(const char *xml, memset(&inst, 0, sizeof(inst)); - virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, true, NULL, NULL); if (!vars) goto cleanup; @@ -392,7 +392,6 @@ static int testCompareXMLToArgvFiles(const char *xml, goto cleanup; actualargv = virBufferContentAndReset(&buf); - virTestClearCommandPath(actualargv); testRemoveCommonRules(actualargv); -- 2.30.2

Enable the internal path clearing instead of using virTestClearCommandPath. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/nwfilterebiptablestest.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/tests/nwfilterebiptablestest.c b/tests/nwfilterebiptablestest.c index c20b2bed42..5f504cbe64 100644 --- a/tests/nwfilterebiptablestest.c +++ b/tests/nwfilterebiptablestest.c @@ -105,13 +105,12 @@ testNWFilterEBIPTablesAllTeardown(const void *opaque G_GNUC_UNUSED) int ret = -1; g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, true, NULL, NULL); if (ebiptables_driver.allTeardown("vnet0") < 0) goto cleanup; actual = virBufferContentAndReset(&buf); - virTestClearCommandPath(actual); if (STRNEQ_NULLABLE(actual, expected)) { virTestDifference(stderr, expected, actual); @@ -172,13 +171,12 @@ testNWFilterEBIPTablesTearOldRules(const void *opaque G_GNUC_UNUSED) int ret = -1; g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, true, NULL, NULL); if (ebiptables_driver.tearOldRules("vnet0") < 0) goto cleanup; actual = virBufferContentAndReset(&buf); - virTestClearCommandPath(actual); if (STRNEQ_NULLABLE(actual, expected)) { virTestDifference(stderr, expected, actual); @@ -217,13 +215,12 @@ testNWFilterEBIPTablesRemoveBasicRules(const void *opaque G_GNUC_UNUSED) int ret = -1; g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, true, NULL, NULL); if (ebiptables_driver.removeBasicRules("vnet0") < 0) goto cleanup; actual = virBufferContentAndReset(&buf); - virTestClearCommandPath(actual); if (STRNEQ_NULLABLE(actual, expected)) { virTestDifference(stderr, expected, actual); @@ -247,13 +244,12 @@ testNWFilterEBIPTablesTearNewRules(const void *opaque G_GNUC_UNUSED) int ret = -1; g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, true, NULL, NULL); if (ebiptables_driver.tearNewRules("vnet0") < 0) goto cleanup; actual = virBufferContentAndReset(&buf); - virTestClearCommandPath(actual); if (STRNEQ_NULLABLE(actual, expected)) { virTestDifference(stderr, expected, actual); @@ -315,13 +311,12 @@ testNWFilterEBIPTablesApplyBasicRules(const void *opaque G_GNUC_UNUSED) virMacAddr mac = { .addr = { 0x10, 0x20, 0x30, 0x40, 0x50, 0x60 } }; g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, true, NULL, NULL); if (ebiptables_driver.applyBasicRules("vnet0", &mac) < 0) goto cleanup; actual = virBufferContentAndReset(&buf); - virTestClearCommandPath(actual); if (STRNEQ_NULLABLE(actual, expected)) { virTestDifference(stderr, expected, actual); @@ -401,13 +396,12 @@ testNWFilterEBIPTablesApplyDHCPOnlyRules(const void *opaque G_GNUC_UNUSED) }; g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, true, NULL, NULL); if (ebiptables_driver.applyDHCPOnlyRules("vnet0", &mac, &val, false) < 0) goto cleanup; actual = virBufferContentAndReset(&buf); - virTestClearCommandPath(actual); if (STRNEQ_NULLABLE(actual, expected)) { virTestDifference(stderr, expected, actual); @@ -470,13 +464,12 @@ testNWFilterEBIPTablesApplyDropAllRules(const void *opaque G_GNUC_UNUSED) int ret = -1; g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, true, NULL, NULL); if (ebiptables_driver.applyDropAllRules("vnet0") < 0) goto cleanup; actual = virBufferContentAndReset(&buf); - virTestClearCommandPath(actual); if (STRNEQ_NULLABLE(actual, expected)) { virTestDifference(stderr, expected, actual); -- 2.30.2

virCommand(ToString) now provides the functionality internally so we don't have to keep the string-munging function around. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/testutils.c | 51 ----------------------------------------------- tests/testutils.h | 2 -- 2 files changed, 53 deletions(-) diff --git a/tests/testutils.c b/tests/testutils.c index 8734790457..6b104405f7 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -854,57 +854,6 @@ int virTestMain(int argc, } -/* - * @cmdset contains a list of command line args, eg - * - * "/usr/sbin/iptables --table filter --insert INPUT --in-interface virbr0 --protocol tcp --destination-port 53 --jump ACCEPT - * /usr/sbin/iptables --table filter --insert INPUT --in-interface virbr0 --protocol udp --destination-port 53 --jump ACCEPT - * /usr/sbin/iptables --table filter --insert FORWARD --in-interface virbr0 --jump REJECT - * /usr/sbin/iptables --table filter --insert FORWARD --out-interface virbr0 --jump REJECT - * /usr/sbin/iptables --table filter --insert FORWARD --in-interface virbr0 --out-interface virbr0 --jump ACCEPT" - * - * And we're munging it in-place to strip the path component - * of the command line, to produce - * - * "iptables --table filter --insert INPUT --in-interface virbr0 --protocol tcp --destination-port 53 --jump ACCEPT - * iptables --table filter --insert INPUT --in-interface virbr0 --protocol udp --destination-port 53 --jump ACCEPT - * iptables --table filter --insert FORWARD --in-interface virbr0 --jump REJECT - * iptables --table filter --insert FORWARD --out-interface virbr0 --jump REJECT - * iptables --table filter --insert FORWARD --in-interface virbr0 --out-interface virbr0 --jump ACCEPT" - */ -void virTestClearCommandPath(char *cmdset) -{ - size_t offset = 0; - char *lineStart = cmdset; - char *lineEnd = strchr(lineStart, '\n'); - - while (lineStart) { - char *dirsep; - char *movestart; - size_t movelen; - dirsep = strchr(lineStart, ' '); - if (dirsep) { - while (dirsep > lineStart && *dirsep != '/') - dirsep--; - if (*dirsep == '/') - dirsep++; - movestart = dirsep; - } else { - movestart = lineStart; - } - movelen = lineEnd ? lineEnd - movestart : strlen(movestart); - - if (movelen) { - memmove(cmdset + offset, movestart, movelen + 1); - offset += movelen + 1; - } - lineStart = lineEnd ? lineEnd + 1 : NULL; - lineEnd = lineStart ? strchr(lineStart, '\n') : NULL; - } - cmdset[offset] = '\0'; -} - - virCapsPtr virTestGenericCapsInit(void) { g_autoptr(virCaps) caps = NULL; diff --git a/tests/testutils.h b/tests/testutils.h index ff5c98a078..4a49c1ca65 100644 --- a/tests/testutils.h +++ b/tests/testutils.h @@ -46,8 +46,6 @@ char *virTestLoadFilePath(const char *p, ...) virJSONValuePtr virTestLoadFileJSON(const char *p, ...) G_GNUC_NULL_TERMINATED; -void virTestClearCommandPath(char *cmdset); - int virTestDifference(FILE *stream, const char *expect, const char *actual); -- 2.30.2

In some cases we might want to compare already wrapped data against a wrapped file. Introduce virTestCompareToFileFull with a 'unwrap' boolean which will control the unwrapping. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/testutils.c | 46 +++++++++++++++++++++++++++++++++++----------- tests/testutils.h | 3 +++ 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/tests/testutils.c b/tests/testutils.c index 6b104405f7..0f6b3a9705 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -352,6 +352,7 @@ virTestRewrapFile(const char *filename) * @param actual: actual output text * @param actualName: name designator of the actual text * @param regenerate: enable or disable regenerate functionality + * @param rewrap: enable or disable rewrapping when regenerating * * Display expected and actual output text, trimmed to first and last * characters at which differences occur. Displays names of the text strings if @@ -363,7 +364,8 @@ virTestDifferenceFullInternal(FILE *stream, const char *expectName, const char *actual, const char *actualName, - bool regenerate) + bool regenerate, + bool rewrap) { const char *expectStart; const char *expectEnd; @@ -386,7 +388,8 @@ virTestDifferenceFullInternal(FILE *stream, return -1; } - if (virTestRewrapFile(expectName) < 0) { + if (rewrap && + virTestRewrapFile(expectName) < 0) { virDispatchError(NULL); return -1; } @@ -454,7 +457,7 @@ virTestDifferenceFull(FILE *stream, const char *actualName) { return virTestDifferenceFullInternal(stream, expect, expectName, - actual, actualName, true); + actual, actualName, true, true); } /** @@ -477,7 +480,7 @@ virTestDifferenceFullNoRegenerate(FILE *stream, const char *actualName) { return virTestDifferenceFullInternal(stream, expect, expectName, - actual, actualName, false); + actual, actualName, false, false); } /** @@ -566,12 +569,14 @@ int virTestDifferenceBin(FILE *stream, /* * @param actual: String input content * @param filename: File to compare @actual against + * @param unwrap: Remove '\\\n' sequences from file content before comparison * * If @actual is NULL, it's treated as an empty string. */ int -virTestCompareToFile(const char *actual, - const char *filename) +virTestCompareToFileFull(const char *actual, + const char *filename, + bool unwrap) { g_autofree char *filecontent = NULL; g_autofree char *fixedcontent = NULL; @@ -580,8 +585,13 @@ virTestCompareToFile(const char *actual, if (!cmpcontent) cmpcontent = ""; - if (virTestLoadFile(filename, &filecontent) < 0 && !virTestGetRegenerate()) - return -1; + if (unwrap) { + if (virTestLoadFile(filename, &filecontent) < 0 && !virTestGetRegenerate()) + return -1; + } else { + if (virFileReadAll(filename, INT_MAX, &filecontent) < 0 && !virTestGetRegenerate()) + return -1; + } if (filecontent) { size_t filecontentLen = strlen(filecontent); @@ -596,15 +606,29 @@ virTestCompareToFile(const char *actual, } if (STRNEQ_NULLABLE(cmpcontent, filecontent)) { - virTestDifferenceFull(stderr, - filecontent, filename, - cmpcontent, NULL); + virTestDifferenceFullInternal(stderr, filecontent, filename, + cmpcontent, NULL, true, unwrap); return -1; } return 0; } + +/* + * @param actual: String input content + * @param filename: File to compare @actual against + * + * If @actual is NULL, it's treated as an empty string. + */ +int +virTestCompareToFile(const char *actual, + const char *filename) +{ + return virTestCompareToFileFull(actual, filename, true); +} + + int virTestCompareToULL(unsigned long long expect, unsigned long long actual) diff --git a/tests/testutils.h b/tests/testutils.h index 4a49c1ca65..da8ca2dea5 100644 --- a/tests/testutils.h +++ b/tests/testutils.h @@ -63,6 +63,9 @@ int virTestDifferenceBin(FILE *stream, const char *expect, const char *actual, size_t length); +int virTestCompareToFileFull(const char *actual, + const char *filename, + bool unwrap); int virTestCompareToFile(const char *actual, const char *filename); int virTestCompareToString(const char *expect, -- 2.30.2

Use virFileReadAll to load the file instead of virTestLoadFile which tries to unwrap the file. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/testutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testutils.c b/tests/testutils.c index 0f6b3a9705..3363d7f0aa 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -313,7 +313,7 @@ virTestLoadFileJSON(const char *p, ...) if (!(path = virTestLoadFileGetPath(p, ap))) goto cleanup; - if (virTestLoadFile(path, &jsonstr) < 0) + if (virFileReadAll(path, INT_MAX, &jsonstr) < 0) goto cleanup; if (!(ret = virJSONValueFromString(jsonstr))) -- 2.30.2

Put multiple values for an option if followed by another option as used in certain iptables arguments. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/util/vircommand.c | 29 +++++++++++++++++++++++------ tests/commanddata/test26.log | 2 +- tests/commandtest.c | 5 ++++- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/src/util/vircommand.c b/src/util/vircommand.c index 0eda42418f..bece296b1e 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -2076,9 +2076,9 @@ virCommandToStringFull(virCommandPtr cmd, { size_t i; g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER; - bool prevopt = false; const char *command = cmd->args[0]; g_autofree char *basename = NULL; + bool had_option = false; /* Cannot assume virCommandRun will be called; so report the error * now. If virCommandRun is called, it will report the same error. */ @@ -2111,16 +2111,33 @@ virCommandToStringFull(virCommandPtr cmd, virBufferEscapeShell(&buf, command); for (i = 1; i < cmd->nargs; i++) { virBufferAddChar(&buf, ' '); + if (linebreaks) { - /* Line break if this is a --arg or if - * the previous arg was a positional option + /* we don't want a linebreak only if + * - the previous argument is an option (starts with '-') + * - there was already an option and another option follows */ - if (cmd->args[i][0] == '-' || - !prevopt) + bool linebreak = true; + + if (cmd->args[i][0] != '-') { + if (had_option) { + size_t j; + /* we know that arg[i - 1] is valid and arg[i] is not an option */ + for (j = i - 1; j < cmd->nargs; j++) { + if (cmd->args[j][0] == '-') { + linebreak = false; + break; + } + } + } + } else { + had_option = true; + } + + if (linebreak) virBufferAddLit(&buf, "\\\n"); } virBufferEscapeShell(&buf, cmd->args[i]); - prevopt = (cmd->args[i][0] == '-'); } return virBufferContentAndReset(&buf); diff --git a/tests/commanddata/test26.log b/tests/commanddata/test26.log index db0d424875..72dd1af5a8 100644 --- a/tests/commanddata/test26.log +++ b/tests/commanddata/test26.log @@ -1 +1 @@ -A=B C=D E true --foo bar --oooh -f --wizz eek eek -w -z -l --mmm flash bang wallop +A=B C=D E true --foo bar --oooh -f --wizz eek eek --m-m-m-multiarg arg arg2 -w -z -l --mmm flash bang wallop diff --git a/tests/commandtest.c b/tests/commandtest.c index aaf391935c..81e9914860 100644 --- a/tests/commandtest.c +++ b/tests/commandtest.c @@ -997,6 +997,7 @@ static int test26(const void *unused G_GNUC_UNUSED) "--oooh \\\n" "-f \\\n" "--wizz 'eek eek' \\\n" + "--m-m-m-multiarg arg arg2 \\\n" "-w \\\n" "-z \\\n" "-l \\\n" @@ -1009,7 +1010,9 @@ static int test26(const void *unused G_GNUC_UNUSED) virCommandAddEnvPair(cmd, "A", "B"); virCommandAddEnvPair(cmd, "C", "D E"); virCommandAddArgList(cmd, "--foo", "bar", "--oooh", "-f", - "--wizz", "eek eek", "-w", "-z", "-l", + "--wizz", "eek eek", + "--m-m-m-multiarg", "arg", "arg2", + "-w", "-z", "-l", "--mmm", "flash", "bang", "wallop", NULL); -- 2.30.2

Splitting lines with arguments causes in many cases a rewrap if the arguments are modified making it harder to see what actually changed. In upcoming patches some rewrapping of 'args' files will be removed so remove this check first. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- build-aux/syntax-check.mk | 8 -------- 1 file changed, 8 deletions(-) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index a9f3aaf45f..7d13e10bae 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -775,14 +775,6 @@ sc_spec_indentation: echo '$(ME): skipping test $@: cppi not installed' 1>&2; \ fi -# Long lines can be harder to diff; too long, and git send-email chokes. -# For now, only enforce line length on files where we have intentionally -# fixed things and don't want to regress. -sc_prohibit_long_lines: - @prohibit='.{90}' \ - in_vc_files='\.arg[sv]' \ - halt='Wrap long lines in expected output files' \ - $(_sc_search_regexp) # Prefer the new URL listing over the old street address listing when # calling out where to get a copy of the [L]GPL. Also, while we have -- 2.30.2

virCommandToString has the possibility to return an already wrapped string with better format than what we get from the test wrapper script. The main advantage is that arguments for an option are always on the same line which makes it more easy to see what changed in a diff and prevents re-wrapping of the line if a wrapping point moves over the threshold. Additionally the used output is the same we have in the VM log file when a VM is starting. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- NOTE: The autogenerated parts of this patch are truncated!!! build-aux/syntax-check.mk | 3 +- .../aarch64-aavmf-virtio-mmio.args | 3 +- tests/qemuxml2argvdata/aarch64-acpi-uefi.args | 9 +- .../aarch64-cpu-passthrough.args | 3 +- ...fault-cpu-kvm-virt-4.2.aarch64-latest.args | 21 +- ...fault-cpu-tcg-virt-4.2.aarch64-latest.args | 21 +- .../aarch64-features-sve.aarch64-latest.args | 9 +- tests/qemuxml2argvdata/aarch64-gic-host.args | 3 +- .../aarch64-gic-none-tcg.args | 3 +- tests/qemuxml2argvdata/aarch64-gic-v2.args | 3 +- tests/qemuxml2argvdata/aarch64-gic-v3.args | 3 +- .../aarch64-kvm-32-on-64.args | 3 +- .../aarch64-noacpi-nouefi.args | 3 +- .../qemuxml2argvdata/aarch64-noacpi-uefi.args | 9 +- ...arch64-os-firmware-efi.aarch64-latest.args | 25 +- .../qemuxml2argvdata/aarch64-pci-serial.args | 3 +- .../aarch64-tpm.aarch64-latest.args | 9 +- .../aarch64-traditional-pci.args | 6 +- .../aarch64-usb-controller-nec-xhci.args | 3 +- .../aarch64-usb-controller-qemu-xhci.args | 3 +- .../aarch64-video-default.args | 3 +- .../aarch64-video-virtio-gpu-pci.args | 12 +- .../aarch64-virt-2.6-virtio-pci-default.args | 9 +- .../aarch64-virt-default-nic.args | 3 +- .../aarch64-virt-graphics.aarch64-latest.args | 43 +- .../aarch64-virt-headless.aarch64-latest.args | 43 +- .../qemuxml2argvdata/aarch64-virt-virtio.args | 3 +- .../aarch64-virtio-pci-default.args | 12 +- .../aarch64-virtio-pci-manual-addresses.args | 12 +- tests/qemuxml2argvdata/acpi-table.args | 3 +- .../arm-vexpressa9-basic.args | 6 +- .../arm-vexpressa9-nodevs.args | 3 +- .../arm-vexpressa9-virtio.args | 6 +- tests/qemuxml2argvdata/arm-virt-virtio.args | 3 +- tests/qemuxml2argvdata/audio-alsa-best.args | 3 +- .../audio-alsa-best.x86_64-latest.args | 17 +- .../audio-alsa-full.x86_64-latest.args | 18 +- .../qemuxml2argvdata/audio-alsa-minimal.args | 3 +- .../audio-alsa-minimal.x86_64-latest.args | 12 +- .../audio-coreaudio-best.args | 3 +- .../audio-coreaudio-best.x86_64-latest.args | 17 +- .../audio-coreaudio-full.x86_64-latest.args | 18 +- .../audio-coreaudio-minimal.args | 3 +- ...audio-coreaudio-minimal.x86_64-latest.args | 12 +- .../audio-default-nographics.args | 3 +- ...udio-default-nographics.x86_64-latest.args | 12 +- tests/qemuxml2argvdata/audio-default-sdl.args | 3 +- .../audio-default-sdl.x86_64-latest.args | 12 +- .../qemuxml2argvdata/audio-default-spice.args | 3 +- .../audio-default-spice.x86_64-latest.args | 12 +- tests/qemuxml2argvdata/audio-default-vnc.args | 3 +- .../audio-default-vnc.x86_64-latest.args | 12 +- tests/qemuxml2argvdata/audio-file-best.args | 3 +- .../audio-file-best.x86_64-latest.args | 17 +- .../audio-file-full.x86_64-latest.args | 18 +- .../qemuxml2argvdata/audio-file-minimal.args | 3 +- .../audio-file-minimal.x86_64-latest.args | 12 +- .../audio-jack-full.x86_64-latest.args | 19 +- .../audio-jack-minimal.x86_64-latest.args | 12 +- .../audio-many-backends.x86_64-latest.args | 12 +- tests/qemuxml2argvdata/audio-none-best.args | 3 +- .../audio-none-best.x86_64-latest.args | 17 +- .../audio-none-full.x86_64-latest.args | 17 +- .../qemuxml2argvdata/audio-none-minimal.args | 3 +- .../audio-none-minimal.x86_64-latest.args | 12 +- tests/qemuxml2argvdata/audio-oss-best.args | 3 +- .../audio-oss-best.x86_64-latest.args | 18 +- .../audio-oss-full.x86_64-latest.args | 19 +- tests/qemuxml2argvdata/audio-oss-minimal.args | 3 +- .../audio-oss-minimal.x86_64-latest.args | 12 +- .../audio-pulseaudio-best.args | 3 +- .../audio-pulseaudio-best.x86_64-latest.args | 18 +- .../audio-pulseaudio-full.x86_64-latest.args | 19 +- .../audio-pulseaudio-minimal.args | 3 +- ...udio-pulseaudio-minimal.x86_64-latest.args | 12 +- tests/qemuxml2argvdata/audio-sdl-best.args | 3 +- .../audio-sdl-best.x86_64-latest.args | 17 +- .../audio-sdl-full.x86_64-latest.args | 18 +- tests/qemuxml2argvdata/audio-sdl-minimal.args | 3 +- .../audio-sdl-minimal.x86_64-latest.args | 12 +- tests/qemuxml2argvdata/audio-spice-best.args | 3 +- .../audio-spice-best.x86_64-latest.args | 17 +- .../audio-spice-full.x86_64-latest.args | 17 +- .../qemuxml2argvdata/audio-spice-minimal.args | 3 +- .../audio-spice-minimal.x86_64-latest.args | 12 +- tests/qemuxml2argvdata/autoindex.args | 15 +- .../qemuxml2argvdata/balloon-ccw-deflate.args | 3 +- .../qemuxml2argvdata/balloon-device-auto.args | 3 +- .../balloon-device-deflate-off.args | 3 +- .../balloon-device-deflate.args | 3 +- .../balloon-device-period.args | 3 +- tests/qemuxml2argvdata/balloon-device.args | 3 +- .../balloon-mmio-deflate.args | 3 +- tests/qemuxml2argvdata/bios-nvram-secure.args | 9 +- tests/qemuxml2argvdata/bios-nvram.args | 6 +- tests/qemuxml2argvdata/bios.args | 3 +- .../blkdeviotune-group-num.x86_64-4.1.0.args | 24 +- .../blkdeviotune-group-num.x86_64-latest.args | 28 +- .../blkdeviotune-max-length.x86_64-4.1.0.args | 26 +- ...blkdeviotune-max-length.x86_64-latest.args | 28 +- .../blkdeviotune-max.x86_64-4.1.0.args | 23 +- .../blkdeviotune-max.x86_64-latest.args | 28 +- tests/qemuxml2argvdata/blkiotune-device.args | 3 +- tests/qemuxml2argvdata/blkiotune.args | 3 +- tests/qemuxml2argvdata/boot-cdrom.args | 3 +- tests/qemuxml2argvdata/boot-complex.args | 15 +- tests/qemuxml2argvdata/boot-floppy-q35.args | 3 +- tests/qemuxml2argvdata/boot-floppy.args | 3 +- .../boot-menu-disable-drive.args | 3 +- tests/qemuxml2argvdata/boot-menu-disable.args | 3 +- .../boot-menu-enable-with-timeout.args | 3 +- tests/qemuxml2argvdata/boot-menu-enable.args | 3 +- tests/qemuxml2argvdata/boot-multi.args | 3 +- tests/qemuxml2argvdata/boot-network.args | 3 +- tests/qemuxml2argvdata/boot-order.args | 12 +- tests/qemuxml2argvdata/boot-strict.args | 15 +- tests/qemuxml2argvdata/channel-guestfwd.args | 3 +- tests/qemuxml2argvdata/channel-spicevmc.args | 9 +- .../channel-unix-guestfwd.x86_64-2.5.0.args | 6 +- .../channel-unix-guestfwd.x86_64-latest.args | 6 +- .../qemuxml2argvdata/channel-virtio-auto.args | 24 +- .../channel-virtio-autoadd.args | 24 +- .../channel-virtio-autoassign.args | 24 +- .../channel-virtio-default.args | 9 +- .../channel-virtio-state.args | 12 +- .../qemuxml2argvdata/channel-virtio-unix.args | 28 +- tests/qemuxml2argvdata/channel-virtio.args | 6 +- tests/qemuxml2argvdata/chardev-reconnect.args | 9 +- tests/qemuxml2argvdata/clock-catchup.args | 3 +- tests/qemuxml2argvdata/clock-france.args | 3 +- tests/qemuxml2argvdata/clock-hpet-off.args | 3 +- .../clock-localtime-basis-localtime.args | 3 +- tests/qemuxml2argvdata/clock-localtime.args | 3 +- tests/qemuxml2argvdata/clock-realtime.args | 3 +- .../clock-timer-armvtimer.aarch64-latest.args | 9 +- .../clock-timer-hyperv-rtc.args | 3 +- tests/qemuxml2argvdata/clock-utc.args | 3 +- tests/qemuxml2argvdata/clock-variable.args | 3 +- .../qemuxml2argvdata/console-compat-auto.args | 3 +- .../console-compat-chardev.args | 3 +- tests/qemuxml2argvdata/console-compat.args | 3 +- tests/qemuxml2argvdata/console-sclp.args | 3 +- .../qemuxml2argvdata/console-virtio-ccw.args | 6 +- .../qemuxml2argvdata/console-virtio-many.args | 3 +- .../qemuxml2argvdata/console-virtio-s390.args | 3 +- .../console-virtio-unix.x86_64-2.5.0.args | 3 +- .../console-virtio-unix.x86_64-latest.args | 6 +- tests/qemuxml2argvdata/console-virtio.args | 3 +- tests/qemuxml2argvdata/controller-order.args | 21 +- .../controller-virtio-scsi.x86_64-latest.args | 51 +- tests/qemuxml2argvdata/cpu-Haswell-noTSX.args | 3 +- tests/qemuxml2argvdata/cpu-Haswell.args | 3 +- tests/qemuxml2argvdata/cpu-Haswell2.args | 3 +- tests/qemuxml2argvdata/cpu-Haswell3.args | 3 +- ...u-Icelake-Server-pconfig.x86_64-3.1.0.args | 6 +- ...-Icelake-Server-pconfig.x86_64-latest.args | 6 +- tests/qemuxml2argvdata/cpu-cache-disable.args | 3 +- .../qemuxml2argvdata/cpu-cache-disable2.args | 3 +- .../qemuxml2argvdata/cpu-cache-disable3.args | 6 +- .../cpu-cache-emulate-l3.args | 3 +- .../cpu-cache-passthrough.args | 3 +- .../cpu-cache-passthrough2.args | 3 +- .../cpu-check-default-none.args | 3 +- .../cpu-check-default-none2.args | 3 +- .../cpu-check-default-partial.args | 6 +- .../cpu-check-default-partial2.args | 3 +- tests/qemuxml2argvdata/cpu-check-none.args | 3 +- tests/qemuxml2argvdata/cpu-eoi-disabled.args | 3 +- tests/qemuxml2argvdata/cpu-eoi-enabled.args | 3 +- tests/qemuxml2argvdata/cpu-exact1.args | 3 +- .../cpu-exact2-nofallback.args | 6 +- tests/qemuxml2argvdata/cpu-exact2.args | 6 +- tests/qemuxml2argvdata/cpu-fallback.args | 3 +- tests/qemuxml2argvdata/cpu-host-kvmclock.args | 3 +- .../qemuxml2argvdata/cpu-host-model-cmt.args | 6 +- .../cpu-host-model-cmt.x86_64-4.0.0.args | 11 +- .../cpu-host-model-fallback.args | 6 +- .../cpu-host-model-vendor.args | 6 +- tests/qemuxml2argvdata/cpu-host-model.args | 6 +- .../cpu-host-passthrough-features.args | 3 +- .../cpu-host-passthrough.args | 3 +- .../qemuxml2argvdata/cpu-hotplug-startup.args | 3 +- tests/qemuxml2argvdata/cpu-kvmclock.args | 3 +- tests/qemuxml2argvdata/cpu-minimum1.args | 6 +- tests/qemuxml2argvdata/cpu-minimum2.args | 6 +- .../cpu-no-removed-features.args | 3 +- tests/qemuxml2argvdata/cpu-numa-disjoint.args | 3 +- .../qemuxml2argvdata/cpu-numa-memshared.args | 11 +- .../cpu-numa-no-memory-element.args | 3 +- tests/qemuxml2argvdata/cpu-numa1.args | 3 +- tests/qemuxml2argvdata/cpu-numa2.args | 3 +- tests/qemuxml2argvdata/cpu-s390-features.args | 3 +- tests/qemuxml2argvdata/cpu-s390-zEC12.args | 3 +- tests/qemuxml2argvdata/cpu-strict1.args | 6 +- tests/qemuxml2argvdata/cpu-topology1.args | 3 +- tests/qemuxml2argvdata/cpu-topology2.args | 3 +- tests/qemuxml2argvdata/cpu-topology3.args | 3 +- .../cpu-translation.x86_64-4.0.0.args | 10 +- .../cpu-translation.x86_64-latest.args | 10 +- tests/qemuxml2argvdata/cpu-tsc-frequency.args | 7 +- .../cpu-tsc-frequency.x86_64-4.0.0.args | 10 +- .../cpu-tsc-high-frequency.x86_64-latest.args | 11 +- .../cputune-cpuset-big-id.x86_64-latest.args | 12 +- tests/qemuxml2argvdata/cputune-numatune.args | 3 +- .../qemuxml2argvdata/cputune-zero-shares.args | 3 +- tests/qemuxml2argvdata/cputune.args | 3 +- tests/qemuxml2argvdata/debug-threads.args | 3 +- .../default-kvm-host-arch.args | 3 +- .../default-qemu-host-arch.args | 3 +- ...ult-video-type-aarch64.aarch64-latest.args | 12 +- ...default-video-type-ppc64.ppc64-latest.args | 9 +- ...ult-video-type-riscv64.riscv64-latest.args | 9 +- ...default-video-type-s390x.s390x-latest.args | 16 +- .../devices-acpi-index.x86_64-latest.args | 36 +- .../disk-aio-io_uring.x86_64-latest.args | 16 +- tests/qemuxml2argvdata/disk-aio.args | 9 +- .../disk-aio.x86_64-2.12.0.args | 15 +- .../disk-aio.x86_64-latest.args | 24 +- .../disk-arm-virtio-sd.aarch64-4.0.0.args | 9 +- .../disk-arm-virtio-sd.aarch64-latest.args | 18 +- ...-backing-chains-noindex.x86_64-2.12.0.args | 45 +- ...-backing-chains-noindex.x86_64-latest.args | 196 ++---- tests/qemuxml2argvdata/disk-blockio.args | 9 +- tests/qemuxml2argvdata/disk-boot-cdrom.args | 6 +- tests/qemuxml2argvdata/disk-boot-disk.args | 6 +- .../disk-cache.x86_64-1.5.3.args | 24 +- .../disk-cache.x86_64-2.12.0.args | 36 +- .../disk-cache.x86_64-2.6.0.args | 27 +- .../disk-cache.x86_64-2.7.0.args | 36 +- .../disk-cache.x86_64-latest.args | 61 +- .../disk-cdrom-bus-other.x86_64-latest.args | 15 +- ...m-empty-network-invalid.x86_64-latest.args | 6 +- .../qemuxml2argvdata/disk-cdrom-network.args | 12 +- .../disk-cdrom-network.x86_64-2.12.0.args | 15 +- .../disk-cdrom-network.x86_64-latest.args | 25 +- tests/qemuxml2argvdata/disk-cdrom-tray.args | 12 +- .../disk-cdrom-tray.x86_64-2.12.0.args | 15 +- .../disk-cdrom-tray.x86_64-latest.args | 28 +- tests/qemuxml2argvdata/disk-cdrom.args | 3 +- .../disk-cdrom.x86_64-2.12.0.args | 9 +- .../disk-cdrom.x86_64-latest.args | 18 +- tests/qemuxml2argvdata/disk-copy_on_read.args | 15 +- .../disk-copy_on_read.x86_64-2.12.0.args | 18 +- .../disk-copy_on_read.x86_64-latest.args | 28 +- .../disk-detect-zeroes.x86_64-2.12.0.args | 15 +- .../disk-detect-zeroes.x86_64-latest.args | 22 +- .../disk-discard.x86_64-4.1.0.args | 15 +- .../disk-discard.x86_64-latest.args | 22 +- .../disk-error-policy-s390x.s390x-2.12.0.args | 24 +- .../disk-error-policy-s390x.s390x-latest.args | 42 +- tests/qemuxml2argvdata/disk-error-policy.args | 12 +- .../disk-error-policy.x86_64-2.12.0.args | 24 +- .../disk-error-policy.x86_64-latest.args | 39 +- .../disk-floppy-q35-2_11.x86_64-2.12.0.args | 9 +- .../disk-floppy-q35-2_11.x86_64-latest.args | 24 +- .../disk-floppy-q35-2_9.x86_64-2.12.0.args | 9 +- .../disk-floppy-q35-2_9.x86_64-latest.args | 24 +- tests/qemuxml2argvdata/disk-floppy-tray.args | 3 +- tests/qemuxml2argvdata/disk-floppy.args | 3 +- .../disk-floppy.x86_64-2.12.0.args | 6 +- .../disk-floppy.x86_64-latest.args | 24 +- tests/qemuxml2argvdata/disk-fmt-qcow.args | 6 +- tests/qemuxml2argvdata/disk-geometry.args | 6 +- tests/qemuxml2argvdata/disk-ide-split.args | 6 +- tests/qemuxml2argvdata/disk-ide-wwn.args | 6 +- tests/qemuxml2argvdata/disk-ioeventfd.args | 15 +- tests/qemuxml2argvdata/disk-iscsi.args | 7 +- .../disk-metadata-cache.x86_64-latest.args | 36 +- .../disk-network-gluster.args | 24 +- .../disk-network-gluster.x86_64-2.12.0.args | 27 +- .../disk-network-gluster.x86_64-latest.args | 38 +- .../disk-network-http.x86_64-latest.args | 55 +- .../disk-network-iscsi-modern.args | 57 +- .../qemuxml2argvdata/disk-network-iscsi.args | 35 +- .../disk-network-iscsi.x86_64-2.12.0.args | 51 +- .../disk-network-iscsi.x86_64-latest.args | 66 +- tests/qemuxml2argvdata/disk-network-nbd.args | 24 +- .../disk-network-nbd.x86_64-2.12.0.args | 27 +- .../disk-network-nbd.x86_64-latest.args | 55 +- .../disk-network-nfs.x86_64-latest.args | 36 +- .../disk-network-rbd.x86_64-2.12.0.args | 51 +- .../disk-network-rbd.x86_64-2.5.0.args | 44 +- .../disk-network-rbd.x86_64-latest.args | 76 +-- .../disk-network-sheepdog.args | 9 +- .../disk-network-sheepdog.x86_64-2.12.0.args | 12 +- .../disk-network-sheepdog.x86_64-latest.args | 22 +- .../disk-network-source-auth.args | 26 +- ...isk-network-source-auth.x86_64-2.12.0.args | 42 +- ...isk-network-source-auth.x86_64-latest.args | 55 +- ...isk-network-tlsx509-nbd.x86_64-2.12.0.args | 20 +- ...disk-network-tlsx509-nbd.x86_64-5.2.0.args | 29 +- ...isk-network-tlsx509-nbd.x86_64-latest.args | 26 +- ...sk-network-tlsx509-vxhs.x86_64-2.12.0.args | 44 +- ...isk-network-tlsx509-vxhs.x86_64-5.0.0.args | 61 +- tests/qemuxml2argvdata/disk-network-vxhs.args | 10 +- tests/qemuxml2argvdata/disk-no-boot.args | 6 +- .../disk-nvme.x86_64-latest.args | 49 +- tests/qemuxml2argvdata/disk-order.args | 12 +- .../qemuxml2argvdata/disk-readonly-disk.args | 3 +- .../disk-readonly-disk.x86_64-2.12.0.args | 6 +- .../disk-readonly-disk.x86_64-latest.args | 18 +- .../disk-rotation.x86_64-latest.args | 35 +- tests/qemuxml2argvdata/disk-sata-device.args | 3 +- .../disk-scsi-device-auto.x86_64-1.5.3.args | 3 +- .../disk-scsi-device-auto.x86_64-latest.args | 21 +- .../disk-scsi-disk-split.args | 21 +- .../qemuxml2argvdata/disk-scsi-disk-vpd.args | 15 +- .../qemuxml2argvdata/disk-scsi-disk-wwn.args | 12 +- .../disk-scsi-lun-passthrough.args | 9 +- .../disk-scsi.x86_64-latest.args | 58 +- tests/qemuxml2argvdata/disk-serial.args | 9 +- .../disk-shared.x86_64-2.12.0.args | 21 +- .../disk-shared.x86_64-latest.args | 46 +- .../disk-slices.x86_64-latest.args | 81 +-- tests/qemuxml2argvdata/disk-snapshot.args | 12 +- .../disk-source-pool-mode.args | 12 +- tests/qemuxml2argvdata/disk-source-pool.args | 18 +- .../disk-transient.x86_64-latest.args | 17 +- .../disk-usb-device-removable.args | 6 +- tests/qemuxml2argvdata/disk-usb-device.args | 3 +- .../disk-vhostuser.x86_64-latest.args | 15 +- .../disk-virtio-ccw-many.args | 15 +- tests/qemuxml2argvdata/disk-virtio-ccw.args | 6 +- .../qemuxml2argvdata/disk-virtio-queues.args | 6 +- .../disk-virtio-s390-zpci.args | 6 +- tests/qemuxml2argvdata/disk-virtio-s390.args | 3 +- ...irtio-scsi-reservations.x86_64-2.12.0.args | 24 +- ...virtio-scsi-reservations.x86_64-5.2.0.args | 35 +- ...irtio-scsi-reservations.x86_64-latest.args | 32 +- tests/qemuxml2argvdata/disk-virtio.args | 12 +- .../encrypted-disk-usage.args | 17 +- tests/qemuxml2argvdata/encrypted-disk.args | 17 +- .../eoi-disabled.x86_64-2.7.0.args | 6 +- .../eoi-disabled.x86_64-4.0.0.args | 6 +- .../eoi-disabled.x86_64-latest.args | 6 +- .../eoi-enabled.x86_64-2.7.0.args | 6 +- .../eoi-enabled.x86_64-4.0.0.args | 6 +- .../eoi-enabled.x86_64-latest.args | 6 +- tests/qemuxml2argvdata/event_idx.args | 15 +- .../fd-memory-no-numa-topology.args | 3 +- .../fd-memory-numa-topology.args | 7 +- .../fd-memory-numa-topology2.args | 11 +- .../fd-memory-numa-topology3.args | 15 +- .../fips-enabled.x86_64-5.1.0.args | 12 +- .../fips-enabled.x86_64-latest.args | 12 +- tests/qemuxml2argvdata/floppy-drive-fat.args | 3 +- .../floppy-drive-fat.x86_64-2.12.0.args | 6 +- .../floppy-drive-fat.x86_64-latest.args | 12 +- tests/qemuxml2argvdata/fs9p-ccw.args | 18 +- .../fs9p-ccw.s390x-latest.args | 30 +- tests/qemuxml2argvdata/fs9p.args | 15 +- .../qemuxml2argvdata/fs9p.x86_64-latest.args | 18 +- .../genid-auto.x86_64-latest.args | 6 +- .../qemuxml2argvdata/genid.x86_64-latest.args | 6 +- ...egl-headless-rendernode.x86_64-latest.args | 12 +- .../graphics-egl-headless.args | 3 +- .../graphics-egl-headless.x86_64-latest.args | 12 +- .../graphics-sdl-fullscreen.args | 3 +- tests/qemuxml2argvdata/graphics-sdl.args | 3 +- .../graphics-spice-agent-file-xfer.args | 7 +- .../graphics-spice-agentmouse.args | 9 +- .../graphics-spice-auto-socket-cfg.args | 6 +- .../graphics-spice-auto-socket.args | 6 +- .../graphics-spice-compression.args | 8 +- .../graphics-spice-egl-headless.args | 3 +- ...pice-gl-auto-rendernode.x86_64-latest.args | 6 +- .../graphics-spice-no-args.args | 3 +- .../graphics-spice-qxl-vga.args | 6 +- .../qemuxml2argvdata/graphics-spice-sasl.args | 6 +- .../graphics-spice-socket.args | 3 +- .../graphics-spice-timeout.args | 18 +- .../graphics-spice-usb-redir.args | 12 +- tests/qemuxml2argvdata/graphics-spice.args | 9 +- .../graphics-vnc-auto-socket-cfg.args | 3 +- .../graphics-vnc-auto-socket.args | 3 +- .../graphics-vnc-egl-headless.args | 3 +- .../graphics-vnc-no-listen-attr.args | 3 +- tests/qemuxml2argvdata/graphics-vnc-none.args | 3 +- .../qemuxml2argvdata/graphics-vnc-policy.args | 3 +- .../graphics-vnc-power.x86_64-latest.args | 12 +- .../graphics-vnc-remove-generated-socket.args | 3 +- tests/qemuxml2argvdata/graphics-vnc-sasl.args | 3 +- .../graphics-vnc-socket-new-cmdline.args | 3 +- .../qemuxml2argvdata/graphics-vnc-socket.args | 3 +- .../graphics-vnc-tls-secret.x86_64-5.2.0.args | 16 +- ...graphics-vnc-tls-secret.x86_64-latest.args | 14 +- tests/qemuxml2argvdata/graphics-vnc-tls.args | 3 +- .../graphics-vnc-tls.x86_64-2.4.0.args | 3 +- .../graphics-vnc-tls.x86_64-latest.args | 9 +- .../graphics-vnc-websocket.args | 3 +- tests/qemuxml2argvdata/graphics-vnc.args | 3 +- ...tdev-mdev-display-ramfb.x86_64-latest.args | 13 +- ...play-spice-egl-headless.x86_64-latest.args | 13 +- ...ev-display-spice-opengl.x86_64-latest.args | 13 +- ...isplay-vnc-egl-headless.x86_64-latest.args | 13 +- ...ostdev-mdev-display-vnc.x86_64-latest.args | 13 +- .../hostdev-mdev-precreated.args | 7 +- .../hostdev-pci-address-device.args | 3 +- .../hostdev-pci-address-unassigned.args | 3 +- .../qemuxml2argvdata/hostdev-pci-address.args | 3 +- .../hostdev-pci-multifunction.args | 3 +- .../hostdev-scsi-lsi.x86_64-2.8.0.args | 18 +- .../hostdev-scsi-lsi.x86_64-4.1.0.args | 32 +- .../hostdev-scsi-lsi.x86_64-latest.args | 44 +- .../hostdev-scsi-vhost-scsi-ccw.args | 9 +- .../hostdev-scsi-vhost-scsi-pci.args | 6 +- .../hostdev-scsi-vhost-scsi-pcie.args | 9 +- ...hostdev-scsi-virtio-scsi.x86_64-2.8.0.args | 43 +- ...hostdev-scsi-virtio-scsi.x86_64-4.1.0.args | 58 +- ...ostdev-scsi-virtio-scsi.x86_64-latest.args | 69 +- ...tdev-subsys-mdev-vfio-ap.s390x-latest.args | 12 +- ...ubsys-mdev-vfio-ccw-boot.s390x-latest.args | 13 +- .../hostdev-subsys-mdev-vfio-ccw.args | 7 +- .../hostdev-usb-address-device-boot.args | 6 +- .../hostdev-usb-address-device.args | 3 +- .../qemuxml2argvdata/hostdev-usb-address.args | 3 +- .../hostdev-vfio-multidomain.args | 3 +- .../hostdev-vfio-zpci-autogenerate-fids.args | 3 +- .../hostdev-vfio-zpci-autogenerate-uids.args | 3 +- .../hostdev-vfio-zpci-autogenerate.args | 3 +- .../hostdev-vfio-zpci-boundaries.args | 3 +- .../hostdev-vfio-zpci-ccw-memballoon.args | 3 +- .../hostdev-vfio-zpci-multidomain-many.args | 3 +- tests/qemuxml2argvdata/hostdev-vfio-zpci.args | 3 +- tests/qemuxml2argvdata/hostdev-vfio.args | 3 +- tests/qemuxml2argvdata/hotplug-base.args | 3 +- .../hugepages-default-2M.args | 3 +- .../hugepages-default-system-size.args | 3 +- tests/qemuxml2argvdata/hugepages-default.args | 3 +- .../qemuxml2argvdata/hugepages-memaccess.args | 23 +- .../hugepages-memaccess2.args | 23 +- .../hugepages-memaccess3.x86_64-latest.args | 18 +- tests/qemuxml2argvdata/hugepages-nodeset.args | 3 +- .../hugepages-numa-default-2M.args | 3 +- .../hugepages-numa-default-dimm.args | 7 +- .../hugepages-numa-default.args | 3 +- .../hugepages-numa-nodeset-part.args | 7 +- .../hugepages-numa-nodeset.args | 19 +- .../hugepages-nvdimm.x86_64-latest.args | 13 +- tests/qemuxml2argvdata/hugepages-shared.args | 19 +- .../hyperv-off.x86_64-4.0.0.args | 6 +- .../hyperv-off.x86_64-latest.args | 6 +- .../hyperv-panic.x86_64-4.0.0.args | 6 +- .../hyperv-panic.x86_64-latest.args | 6 +- .../hyperv-stimer-direct.x86_64-latest.args | 6 +- .../qemuxml2argvdata/hyperv.x86_64-4.0.0.args | 10 +- .../hyperv.x86_64-latest.args | 10 +- .../qemuxml2argvdata/input-usbmouse-addr.args | 3 +- tests/qemuxml2argvdata/input-usbmouse.args | 3 +- tests/qemuxml2argvdata/input-usbtablet.args | 3 +- tests/qemuxml2argvdata/input-virtio-ccw.args | 6 +- .../intel-iommu-aw-bits.x86_64-latest.args | 9 +- ...ntel-iommu-caching-mode.x86_64-latest.args | 9 +- ...ntel-iommu-device-iotlb.x86_64-latest.args | 9 +- .../intel-iommu-eim.x86_64-latest.args | 9 +- .../intel-iommu.x86_64-2.6.0.args | 6 +- .../intel-iommu.x86_64-latest.args | 6 +- .../iommu-smmuv3.aarch64-latest.args | 9 +- .../iothreads-disk-virtio-ccw.args | 9 +- tests/qemuxml2argvdata/iothreads-disk.args | 15 +- .../iothreads-ids-partial.args | 3 +- tests/qemuxml2argvdata/iothreads-ids.args | 3 +- ...othreads-virtio-scsi-ccw.s390x-latest.args | 27 +- ...othreads-virtio-scsi-pci.x86_64-5.2.0.args | 35 +- ...threads-virtio-scsi-pci.x86_64-latest.args | 32 +- tests/qemuxml2argvdata/iothreads.args | 3 +- tests/qemuxml2argvdata/kvm-features-off.args | 3 +- tests/qemuxml2argvdata/kvm-features.args | 3 +- tests/qemuxml2argvdata/kvm-pit-delay.args | 3 +- tests/qemuxml2argvdata/kvm-pit-discard.args | 3 +- .../kvmclock+eoi-disabled.x86_64-2.7.0.args | 6 +- .../kvmclock+eoi-disabled.x86_64-4.0.0.args | 6 +- .../kvmclock+eoi-disabled.x86_64-latest.args | 6 +- tests/qemuxml2argvdata/kvmclock.args | 3 +- ...v-missing-platform-info.x86_64-2.12.0.args | 10 +- .../launch-security-sev.x86_64-2.12.0.args | 10 +- .../luks-disks-source-qcow2.args | 74 +- .../luks-disks-source-qcow2.x86_64-5.2.0.args | 113 +--- ...luks-disks-source-qcow2.x86_64-latest.args | 110 +-- tests/qemuxml2argvdata/luks-disks-source.args | 63 +- tests/qemuxml2argvdata/luks-disks.args | 28 +- .../mach-virt-console-virtio.args | 3 +- .../mach-virt-serial-native.args | 3 +- .../mach-virt-serial-pci.args | 3 +- .../mach-virt-serial-usb.args | 6 +- .../machine-aeskeywrap-off-cap.args | 9 +- .../machine-aeskeywrap-off-caps.args | 9 +- .../machine-aeskeywrap-on-cap.args | 6 +- .../machine-aeskeywrap-on-caps.args | 6 +- tests/qemuxml2argvdata/machine-aliases1.args | 3 +- tests/qemuxml2argvdata/machine-aliases2.args | 3 +- tests/qemuxml2argvdata/machine-core-off.args | 3 +- tests/qemuxml2argvdata/machine-core-on.args | 3 +- .../machine-deakeywrap-off-cap.args | 9 +- .../machine-deakeywrap-off-caps.args | 9 +- .../machine-deakeywrap-on-cap.args | 6 +- .../machine-deakeywrap-on-caps.args | 6 +- .../machine-keywrap-none-caps.args | 6 +- .../machine-keywrap-none.args | 6 +- ...ine-loadparm-multiple-disks-nets-s390.args | 18 +- .../machine-loadparm-net-s390.args | 6 +- .../machine-loadparm-s390.args | 6 +- tests/qemuxml2argvdata/machine-smm-opt.args | 6 +- .../qemuxml2argvdata/machine-vmport-opt.args | 3 +- tests/qemuxml2argvdata/master-key.args | 6 +- ...memory-default-hugepage.x86_64-latest.args | 10 +- .../memfd-memory-numa.x86_64-latest.args | 10 +- .../memory-hotplug-dimm-addr.args | 7 +- .../qemuxml2argvdata/memory-hotplug-dimm.args | 7 +- ...y-hotplug-nvdimm-access.x86_64-latest.args | 15 +- ...ory-hotplug-nvdimm-align.x86_64-5.2.0.args | 15 +- ...ry-hotplug-nvdimm-align.x86_64-latest.args | 16 +- ...ory-hotplug-nvdimm-label.x86_64-5.2.0.args | 15 +- ...ry-hotplug-nvdimm-label.x86_64-latest.args | 15 +- ...mory-hotplug-nvdimm-pmem.x86_64-5.2.0.args | 15 +- ...ory-hotplug-nvdimm-pmem.x86_64-latest.args | 15 +- ...emory-hotplug-nvdimm-ppc64-abi-update.args | 9 +- .../memory-hotplug-nvdimm-ppc64.args | 9 +- ...-hotplug-nvdimm-readonly.x86_64-5.2.0.args | 15 +- ...hotplug-nvdimm-readonly.x86_64-latest.args | 15 +- .../memory-hotplug-nvdimm.x86_64-latest.args | 15 +- ...emory-hotplug-ppc64-nonuma-abi-update.args | 3 +- .../memory-hotplug-ppc64-nonuma.args | 3 +- ...mory-hotplug-virtio-pmem.x86_64-5.2.0.args | 18 +- ...ory-hotplug-virtio-pmem.x86_64-latest.args | 18 +- tests/qemuxml2argvdata/memory-hotplug.args | 3 +- tests/qemuxml2argvdata/memtune-unlimited.args | 3 +- tests/qemuxml2argvdata/memtune.args | 3 +- .../migrate-numa-unaligned.args | 12 +- tests/qemuxml2argvdata/migrate.args | 3 +- .../minimal-msg-timestamp.args | 3 +- tests/qemuxml2argvdata/minimal-sandbox.args | 6 +- tests/qemuxml2argvdata/minimal.args | 3 +- tests/qemuxml2argvdata/misc-acpi.args | 3 +- tests/qemuxml2argvdata/misc-disable-s3.args | 3 +- .../misc-disable-suspends.args | 3 +- tests/qemuxml2argvdata/misc-enable-s4.args | 3 +- tests/qemuxml2argvdata/misc-no-reboot.args | 3 +- tests/qemuxml2argvdata/misc-uuid.args | 3 +- .../mlock-off.x86_64-3.0.0.args | 6 +- .../mlock-off.x86_64-latest.args | 6 +- .../mlock-on.x86_64-3.0.0.args | 6 +- .../mlock-on.x86_64-latest.args | 6 +- tests/qemuxml2argvdata/monitor-json.args | 3 +- .../multifunction-pci-device.args | 6 +- tests/qemuxml2argvdata/name-escape.args | 23 +- tests/qemuxml2argvdata/net-client.args | 6 +- tests/qemuxml2argvdata/net-eth-hostip.args | 6 +- tests/qemuxml2argvdata/net-eth-ifname.args | 6 +- tests/qemuxml2argvdata/net-eth-names.args | 6 +- .../net-eth-unmanaged-tap.args | 6 +- tests/qemuxml2argvdata/net-eth.args | 6 +- .../net-hostdev-bootorder.args | 3 +- .../net-hostdev-multidomain.args | 3 +- .../net-hostdev-vfio-multidomain.args | 3 +- tests/qemuxml2argvdata/net-hostdev-vfio.args | 3 +- tests/qemuxml2argvdata/net-hostdev.args | 3 +- tests/qemuxml2argvdata/net-many-models.args | 18 +- tests/qemuxml2argvdata/net-mcast.args | 6 +- tests/qemuxml2argvdata/net-server.args | 6 +- tests/qemuxml2argvdata/net-udp.args | 6 +- tests/qemuxml2argvdata/net-user-addr.args | 9 +- tests/qemuxml2argvdata/net-user.args | 6 +- .../net-user.x86_64-4.0.0.args | 9 +- .../net-vdpa.x86_64-latest.args | 9 +- .../net-vhostuser-multiq.args | 18 +- tests/qemuxml2argvdata/net-vhostuser.args | 9 +- .../net-vhostuser.x86_64-2.5.0.args | 12 +- .../net-vhostuser.x86_64-latest.args | 15 +- tests/qemuxml2argvdata/net-virtio-ccw.args | 9 +- tests/qemuxml2argvdata/net-virtio-device.args | 6 +- .../net-virtio-disable-offloads.args | 8 +- tests/qemuxml2argvdata/net-virtio-netdev.args | 6 +- .../net-virtio-rxtxqueuesize.args | 6 +- tests/qemuxml2argvdata/net-virtio-s390.args | 3 +- .../net-virtio-teaming-hostdev.args | 15 +- .../qemuxml2argvdata/net-virtio-teaming.args | 15 +- tests/qemuxml2argvdata/net-virtio.args | 6 +- tests/qemuxml2argvdata/nosharepages.args | 3 +- .../numad-auto-memory-vcpu-cpuset.args | 3 +- ...o-memory-vcpu-no-cpuset-and-placement.args | 3 +- .../numad-auto-vcpu-static-numatune.args | 3 +- .../numad-static-memory-auto-vcpu.args | 3 +- tests/qemuxml2argvdata/numad.args | 3 +- .../numatune-auto-nodeset-invalid.args | 3 +- .../numatune-auto-prefer.args | 3 +- .../qemuxml2argvdata/numatune-distances.args | 3 +- .../numatune-hmat.x86_64-latest.args | 18 +- .../numatune-memnode-no-memory.args | 6 +- tests/qemuxml2argvdata/numatune-memnode.args | 12 +- .../numatune-memnode.x86_64-5.2.0.args | 15 +- .../numatune-memnode.x86_64-latest.args | 15 +- tests/qemuxml2argvdata/numatune-memory.args | 3 +- tests/qemuxml2argvdata/numatune-no-vcpu.args | 3 +- .../os-firmware-bios.x86_64-latest.args | 12 +- ...re-efi-no-enrolled-keys.x86_64-latest.args | 28 +- ...os-firmware-efi-secboot.x86_64-latest.args | 28 +- .../os-firmware-efi.x86_64-latest.args | 28 +- .../qemuxml2argvdata/pages-dimm-discard.args | 11 +- .../pages-discard-hugepages.args | 3 +- tests/qemuxml2argvdata/pages-discard.args | 3 +- tests/qemuxml2argvdata/panic-double.args | 3 +- tests/qemuxml2argvdata/panic-no-address.args | 3 +- tests/qemuxml2argvdata/panic.args | 3 +- .../parallel-parport-chardev.args | 3 +- .../parallel-tcp-chardev.args | 3 +- .../parallel-unix-chardev.x86_64-2.5.0.args | 3 +- .../parallel-unix-chardev.x86_64-latest.args | 6 +- tests/qemuxml2argvdata/pci-autoadd-addr.args | 6 +- tests/qemuxml2argvdata/pci-autoadd-idx.args | 6 +- tests/qemuxml2argvdata/pci-autofill-addr.args | 9 +- .../pci-bridge-many-disks.args | 633 ++++++------------ tests/qemuxml2argvdata/pci-bridge.args | 75 +-- tests/qemuxml2argvdata/pci-expander-bus.args | 72 +- tests/qemuxml2argvdata/pci-many.args | 174 ++--- tests/qemuxml2argvdata/pci-rom-disabled.args | 6 +- tests/qemuxml2argvdata/pci-rom.args | 12 +- .../pci-serial-dev-chardev.args | 3 +- tests/qemuxml2argvdata/pcie-expander-bus.args | 84 +-- .../pcie-root-port-model-generic.args | 6 +- .../pcie-root-port-model-ioh3420.args | 6 +- ...cie-root-port-nohotplug.x86_64-latest.args | 21 +- tests/qemuxml2argvdata/pcie-root-port.args | 9 +- tests/qemuxml2argvdata/pcie-root.args | 3 +- .../pcie-switch-downstream-port.args | 6 +- .../pcie-switch-upstream-port.args | 9 +- tests/qemuxml2argvdata/pcihole64-q35.args | 6 +- tests/qemuxml2argvdata/pcihole64.args | 3 +- tests/qemuxml2argvdata/pmu-feature-off.args | 3 +- tests/qemuxml2argvdata/pmu-feature.args | 3 +- tests/qemuxml2argvdata/ppc-dtb.args | 3 +- ...ault-cpu-kvm-pseries-2.7.ppc64-latest.args | 18 +- ...ault-cpu-kvm-pseries-3.1.ppc64-latest.args | 18 +- ...ault-cpu-kvm-pseries-4.2.ppc64-latest.args | 18 +- ...ault-cpu-tcg-pseries-2.7.ppc64-latest.args | 18 +- ...ault-cpu-tcg-pseries-3.1.ppc64-latest.args | 18 +- ...ault-cpu-tcg-pseries-4.2.ppc64-latest.args | 18 +- .../ppc64-pseries-graphics.ppc64-latest.args | 24 +- .../ppc64-pseries-headless.ppc64-latest.args | 24 +- .../ppc64-tpmproxy-single.ppc64-latest.args | 9 +- .../ppc64-tpmproxy-with-tpm.ppc64-latest.args | 9 +- .../ppc64-usb-controller-legacy.args | 3 +- .../ppc64-usb-controller-qemu-xhci.args | 3 +- .../ppc64-usb-controller.args | 3 +- tests/qemuxml2argvdata/ppce500-serial.args | 3 +- tests/qemuxml2argvdata/pseries-basic.args | 3 +- .../pseries-console-virtio.args | 3 +- .../pseries-cpu-compat-power9.args | 3 +- .../qemuxml2argvdata/pseries-cpu-compat.args | 3 +- tests/qemuxml2argvdata/pseries-cpu-exact.args | 3 +- tests/qemuxml2argvdata/pseries-cpu-le.args | 3 +- tests/qemuxml2argvdata/pseries-features.args | 7 +- .../qemuxml2argvdata/pseries-hostdevs-1.args | 3 +- .../qemuxml2argvdata/pseries-hostdevs-2.args | 3 +- .../qemuxml2argvdata/pseries-hostdevs-3.args | 3 +- .../pseries-machine-max-cpu-compat.args | 3 +- .../pseries-many-buses-1.args | 3 +- .../pseries-many-buses-2.args | 3 +- .../pseries-many-devices.args | 3 +- tests/qemuxml2argvdata/pseries-nvram.args | 3 +- .../pseries-panic-missing.args | 3 +- .../pseries-panic-no-address.args | 3 +- .../pseries-phb-default-missing.args | 3 +- .../pseries-phb-numa-node.args | 9 +- .../qemuxml2argvdata/pseries-phb-simple.args | 3 +- .../pseries-serial-native.args | 3 +- .../qemuxml2argvdata/pseries-serial-pci.args | 3 +- .../qemuxml2argvdata/pseries-serial-usb.args | 3 +- .../qemuxml2argvdata/pseries-usb-default.args | 3 +- tests/qemuxml2argvdata/pseries-usb-kbd.args | 3 +- tests/qemuxml2argvdata/pseries-usb-multi.args | 3 +- .../pseries-vio-user-assigned.args | 6 +- tests/qemuxml2argvdata/pseries-vio.args | 6 +- .../pv-spinlock-disabled.x86_64-2.7.0.args | 6 +- .../pv-spinlock-disabled.x86_64-4.0.0.args | 6 +- .../pv-spinlock-disabled.x86_64-latest.args | 6 +- .../pv-spinlock-enabled.x86_64-2.7.0.args | 6 +- .../pv-spinlock-enabled.x86_64-4.0.0.args | 6 +- .../pv-spinlock-enabled.x86_64-latest.args | 6 +- tests/qemuxml2argvdata/q35-acpi-nouefi.args | 3 +- tests/qemuxml2argvdata/q35-acpi-uefi.args | 9 +- .../q35-default-devices-only.args | 6 +- tests/qemuxml2argvdata/q35-multifunction.args | 18 +- tests/qemuxml2argvdata/q35-noacpi-nouefi.args | 3 +- .../q35-pci-force-address.args | 6 +- tests/qemuxml2argvdata/q35-pcie-autoadd.args | 27 +- tests/qemuxml2argvdata/q35-pcie.args | 27 +- .../q35-pm-disable-fallback.args | 3 +- tests/qemuxml2argvdata/q35-pm-disable.args | 3 +- tests/qemuxml2argvdata/q35-usb2-multi.args | 15 +- tests/qemuxml2argvdata/q35-usb2-reorder.args | 15 +- tests/qemuxml2argvdata/q35-usb2.args | 9 +- .../q35-virt-manager-basic.args | 31 +- tests/qemuxml2argvdata/q35-virtio-pci.args | 27 +- tests/qemuxml2argvdata/q35.args | 9 +- tests/qemuxml2argvdata/qemu-ns-alt.args | 3 +- .../qemu-ns-commandline-ns0.args | 6 +- .../qemu-ns-commandline-ns1.args | 6 +- .../qemuxml2argvdata/qemu-ns-commandline.args | 6 +- .../qemu-ns-domain-commandline-ns0.args | 6 +- .../qemu-ns-domain-commandline.args | 6 +- .../qemuxml2argvdata/qemu-ns-domain-ns0.args | 6 +- tests/qemuxml2argvdata/qemu-ns-no-env.args | 3 +- .../qemu-ns.x86_64-4.0.0.args | 12 +- .../qemu-ns.x86_64-latest.args | 12 +- .../reboot-timeout-disabled.args | 3 +- .../reboot-timeout-enabled.args | 3 +- tests/qemuxml2argvdata/restore-v2-fd.args | 3 +- tests/qemuxml2argvdata/restore-v2.args | 3 +- .../riscv64-virt-graphics.riscv64-latest.args | 24 +- .../riscv64-virt-headless.riscv64-latest.args | 24 +- tests/qemuxml2argvdata/riscv64-virt-pci.args | 9 +- tests/qemuxml2argvdata/riscv64-virt.args | 6 +- .../s390-allow-bogus-usb-controller.args | 3 +- .../s390-allow-bogus-usb-none.args | 3 +- ...t-cpu-kvm-ccw-virtio-2.7.s390x-latest.args | 9 +- ...t-cpu-kvm-ccw-virtio-4.2.s390x-latest.args | 16 +- ...t-cpu-tcg-ccw-virtio-2.7.s390x-latest.args | 9 +- ...t-cpu-tcg-ccw-virtio-4.2.s390x-latest.args | 9 +- .../qemuxml2argvdata/s390-panic-missing.args | 3 +- .../s390-panic-no-address.args | 3 +- tests/qemuxml2argvdata/s390-serial-2.args | 3 +- .../qemuxml2argvdata/s390-serial-console.args | 3 +- tests/qemuxml2argvdata/s390-serial.args | 3 +- .../s390x-ccw-graphics.s390x-latest.args | 24 +- .../s390x-ccw-headless.s390x-latest.args | 24 +- tests/qemuxml2argvdata/seclabel-dac-none.args | 3 +- .../seclabel-dynamic-baselabel.args | 3 +- .../seclabel-dynamic-labelskip.args | 3 +- .../seclabel-dynamic-override.args | 3 +- .../seclabel-dynamic-relabel.args | 3 +- tests/qemuxml2argvdata/seclabel-dynamic.args | 3 +- tests/qemuxml2argvdata/seclabel-none.args | 3 +- .../seclabel-static-labelskip.args | 3 +- .../seclabel-static-relabel.args | 3 +- tests/qemuxml2argvdata/seclabel-static.args | 3 +- .../serial-dev-chardev-iobase.args | 3 +- .../qemuxml2argvdata/serial-dev-chardev.args | 3 +- .../qemuxml2argvdata/serial-file-chardev.args | 3 +- tests/qemuxml2argvdata/serial-file-log.args | 6 +- .../qemuxml2argvdata/serial-many-chardev.args | 3 +- .../qemuxml2argvdata/serial-pty-chardev.args | 3 +- .../serial-spiceport-nospice.args | 3 +- tests/qemuxml2argvdata/serial-spiceport.args | 9 +- .../qemuxml2argvdata/serial-tcp-chardev.args | 3 +- .../serial-tcp-telnet-chardev.args | 6 +- .../serial-tcp-tlsx509-chardev-notls.args | 6 +- .../serial-tcp-tlsx509-chardev-verify.args | 12 +- .../serial-tcp-tlsx509-chardev.args | 12 +- .../serial-tcp-tlsx509-secret-chardev.args | 19 +- .../qemuxml2argvdata/serial-udp-chardev.args | 6 +- .../qemuxml2argvdata/serial-unix-chardev.args | 3 +- .../serial-unix-chardev.x86_64-latest.args | 6 +- tests/qemuxml2argvdata/serial-vc-chardev.args | 3 +- .../shmem-plain-doorbell.args | 33 +- tests/qemuxml2argvdata/shmem.args | 12 +- .../smartcard-controller.args | 3 +- .../smartcard-host-certificates-database.args | 6 +- .../smartcard-host-certificates.args | 6 +- tests/qemuxml2argvdata/smartcard-host.args | 3 +- .../smartcard-passthrough-spicevmc.args | 3 +- .../smartcard-passthrough-tcp.args | 3 +- ...artcard-passthrough-unix.x86_64-2.5.0.args | 3 +- ...rtcard-passthrough-unix.x86_64-latest.args | 6 +- tests/qemuxml2argvdata/smbios-type-fwcfg.args | 10 +- tests/qemuxml2argvdata/smbios.args | 16 +- tests/qemuxml2argvdata/smp-dies.args | 3 +- tests/qemuxml2argvdata/smp.args | 3 +- tests/qemuxml2argvdata/sound-device.args | 3 +- tests/qemuxml2argvdata/sound.args | 3 +- tests/qemuxml2argvdata/sparc-minimal.args | 12 +- .../tpm-emulator-spapr.ppc64-latest.args | 18 +- .../tpm-emulator-tpm2-enc.x86_64-latest.args | 9 +- ...pm-emulator-tpm2-pstate.x86_64-latest.args | 9 +- .../tpm-emulator-tpm2.x86_64-latest.args | 9 +- .../tpm-emulator.x86_64-latest.args | 9 +- .../tpm-passthrough-crb.x86_64-latest.args | 9 +- .../tpm-passthrough.x86_64-latest.args | 9 +- .../tseg-explicit-size.x86_64-latest.args | 12 +- .../usb-controller-default-q35.args | 3 +- .../usb-controller-explicit-q35.args | 3 +- .../usb-controller-qemu-xhci.args | 3 +- .../qemuxml2argvdata/usb-controller-xhci.args | 3 +- tests/qemuxml2argvdata/usb-controller.args | 3 +- .../usb-hub-autoadd-deluxe.args | 3 +- tests/qemuxml2argvdata/usb-hub-autoadd.args | 3 +- tests/qemuxml2argvdata/usb-hub.args | 3 +- .../qemuxml2argvdata/usb-ich9-autoassign.args | 6 +- .../qemuxml2argvdata/usb-ich9-companion.args | 6 +- .../qemuxml2argvdata/usb-ich9-ehci-addr.args | 12 +- .../qemuxml2argvdata/usb-long-port-path.args | 3 +- tests/qemuxml2argvdata/usb-none.args | 3 +- .../usb-piix3-controller.args | 3 +- .../qemuxml2argvdata/usb-port-autoassign.args | 3 +- tests/qemuxml2argvdata/usb-port-missing.args | 3 +- tests/qemuxml2argvdata/usb-ports.args | 3 +- tests/qemuxml2argvdata/usb-redir-boot.args | 6 +- .../usb-redir-filter-version.args | 11 +- tests/qemuxml2argvdata/usb-redir-filter.args | 12 +- .../usb-redir-unix.x86_64-2.5.0.args | 6 +- .../usb-redir-unix.x86_64-latest.args | 9 +- tests/qemuxml2argvdata/usb-redir.args | 6 +- .../qemuxml2argvdata/usb-xhci-autoassign.args | 3 +- tests/qemuxml2argvdata/usb1-usb2.args | 9 +- tests/qemuxml2argvdata/user-aliases-usb.args | 21 +- tests/qemuxml2argvdata/user-aliases.args | 60 +- .../vcpu-placement-static.args | 3 +- ...vhost-user-fs-fd-memory.x86_64-latest.args | 13 +- ...vhost-user-fs-hugepages.x86_64-latest.args | 25 +- ...host-user-gpu-secondary.x86_64-latest.args | 21 +- .../vhost-user-vga.x86_64-latest.args | 18 +- .../vhost-vsock-auto.x86_64-latest.args | 9 +- .../vhost-vsock-ccw-auto.s390x-latest.args | 18 +- .../vhost-vsock-ccw-iommu.s390x-latest.args | 21 +- .../vhost-vsock-ccw.s390x-latest.args | 18 +- .../vhost-vsock.x86_64-latest.args | 6 +- ...eo-bochs-display-device.x86_64-latest.args | 17 +- .../video-device-pciaddr-default.args | 9 +- tests/qemuxml2argvdata/video-none-device.args | 3 +- .../video-qxl-device-vgamem.args | 9 +- ...video-qxl-device-vram64.x86_64-latest.args | 9 +- tests/qemuxml2argvdata/video-qxl-device.args | 9 +- tests/qemuxml2argvdata/video-qxl-heads.args | 12 +- .../qemuxml2argvdata/video-qxl-nodevice.args | 6 +- tests/qemuxml2argvdata/video-qxl-noheads.args | 6 +- .../video-qxl-resolution.args | 6 +- .../video-qxl-sec-device-vgamem.args | 12 +- ...o-qxl-sec-device-vram64.x86_64-latest.args | 12 +- .../video-qxl-sec-device.args | 9 +- ...eo-ramfb-display-device.x86_64-latest.args | 17 +- .../video-vga-device-vgamem.args | 6 +- tests/qemuxml2argvdata/video-vga-device.args | 6 +- .../qemuxml2argvdata/video-vga-nodevice.args | 6 +- .../qemuxml2argvdata/video-vga-qxl-heads.args | 9 +- .../video-virtio-gpu-ccw.args | 6 +- .../video-virtio-gpu-device.args | 6 +- .../video-virtio-gpu-sdl-gl.args | 6 +- .../video-virtio-gpu-secondary.args | 3 +- .../video-virtio-gpu-spice-gl.args | 6 +- .../video-virtio-gpu-virgl.args | 6 +- tests/qemuxml2argvdata/video-virtio-vga.args | 6 +- .../virtio-9p-createmode.x86_64-latest.args | 9 +- .../virtio-9p-multidevs.x86_64-latest.args | 15 +- .../virtio-input-passthrough.args | 6 +- tests/qemuxml2argvdata/virtio-input.args | 3 +- tests/qemuxml2argvdata/virtio-lun.args | 12 +- .../virtio-non-transitional.x86_64-3.1.0.args | 42 +- ...virtio-non-transitional.x86_64-latest.args | 39 +- ...-options-controller-ats.x86_64-latest.args | 6 +- ...ptions-controller-iommu.x86_64-latest.args | 12 +- ...tions-controller-packed.x86_64-latest.args | 6 +- ...virtio-options-disk-ats.x86_64-latest.args | 24 +- ...rtio-options-disk-iommu.x86_64-latest.args | 24 +- ...tio-options-disk-packed.x86_64-latest.args | 24 +- .../virtio-options-fs-ats.x86_64-latest.args | 12 +- ...virtio-options-fs-iommu.x86_64-latest.args | 12 +- ...irtio-options-fs-packed.x86_64-latest.args | 12 +- ...irtio-options-input-ats.x86_64-latest.args | 6 +- ...tio-options-input-iommu.x86_64-latest.args | 6 +- ...io-options-input-packed.x86_64-latest.args | 6 +- ...-options-memballoon-ats.x86_64-latest.args | 6 +- ...loon-freepage-reporting.x86_64-latest.args | 9 +- ...ptions-memballoon-iommu.x86_64-latest.args | 6 +- ...tions-memballoon-packed.x86_64-latest.args | 6 +- .../virtio-options-net-ats.x86_64-latest.args | 12 +- ...irtio-options-net-iommu.x86_64-latest.args | 12 +- ...rtio-options-net-packed.x86_64-latest.args | 12 +- .../virtio-options-rng-ats.x86_64-latest.args | 6 +- ...irtio-options-rng-iommu.x86_64-latest.args | 12 +- ...rtio-options-rng-packed.x86_64-latest.args | 6 +- ...irtio-options-video-ats.x86_64-latest.args | 12 +- ...tio-options-video-iommu.x86_64-latest.args | 12 +- ...io-options-video-packed.x86_64-latest.args | 12 +- .../virtio-options.x86_64-latest.args | 54 +- .../virtio-rng-builtin.x86_64-5.2.0.args | 9 +- .../virtio-rng-builtin.x86_64-latest.args | 6 +- tests/qemuxml2argvdata/virtio-rng-ccw.args | 6 +- .../qemuxml2argvdata/virtio-rng-default.args | 3 +- .../virtio-rng-egd-unix.x86_64-2.5.0.args | 3 +- .../virtio-rng-egd-unix.x86_64-5.2.0.args | 9 +- .../virtio-rng-egd-unix.x86_64-latest.args | 6 +- tests/qemuxml2argvdata/virtio-rng-egd.args | 3 +- .../qemuxml2argvdata/virtio-rng-multiple.args | 3 +- tests/qemuxml2argvdata/virtio-rng-random.args | 6 +- .../virtio-transitional.x86_64-3.1.0.args | 39 +- .../virtio-transitional.x86_64-latest.args | 33 +- tests/qemuxml2argvdata/vmcoreinfo.args | 3 +- tests/qemuxml2argvdata/watchdog-device.args | 3 +- tests/qemuxml2argvdata/watchdog-diag288.args | 3 +- tests/qemuxml2argvdata/watchdog-dump.args | 3 +- .../qemuxml2argvdata/watchdog-injectnmi.args | 3 +- tests/qemuxml2argvdata/watchdog.args | 3 +- tests/qemuxml2argvdata/x86-kvm-32-on-64.args | 3 +- ...-default-cpu-kvm-pc-4.2.x86_64-latest.args | 18 +- ...default-cpu-kvm-q35-4.2.x86_64-latest.args | 21 +- ...-default-cpu-tcg-pc-4.2.x86_64-latest.args | 18 +- ...default-cpu-tcg-q35-4.2.x86_64-latest.args | 21 +- .../x86_64-pc-graphics.x86_64-latest.args | 24 +- .../x86_64-pc-headless.x86_64-latest.args | 21 +- .../x86_64-q35-graphics.x86_64-latest.args | 27 +- .../x86_64-q35-headless.x86_64-latest.args | 24 +- tests/qemuxml2argvtest.c | 4 +- 902 files changed, 3489 insertions(+), 7508 deletions(-) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index 7d13e10bae..1c2ea1c98a 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -1713,7 +1713,8 @@ sc_header-ifdef: $(PYTHON) $(top_srcdir)/scripts/header-ifdef.py sc_test-wrap-argv: - $(AM_V_GEN)$(VC_LIST) | $(GREP) -E '\.(ldargs|args)' | $(RUNUTF8) xargs \ + $(AM_V_GEN)$(VC_LIST) | $(GREP) -v -E 'qemuxml2argvdata' \ + |$(GREP) -E '\.(ldargs|args)' | $(RUNUTF8) xargs \ $(PYTHON) $(top_srcdir)/scripts/test-wrap-argv.py --check sc_group-qemu-caps: diff --git a/tests/qemuxml2argvdata/aarch64-aavmf-virtio-mmio.args b/tests/qemuxml2argvdata/aarch64-aavmf-virtio-mmio.args index 02b6305292..2e57c25058 100644 --- a/tests/qemuxml2argvdata/aarch64-aavmf-virtio-mmio.args +++ b/tests/qemuxml2argvdata/aarch64-aavmf-virtio-mmio.args @@ -19,8 +19,7 @@ QEMU_AUDIO_DRV=none \ -display none \ -no-user-config \ -nodefaults \ --chardev socket,id=charmonitor,\ -path=/tmp/lib/domain--1-aarch64test/monitor.sock,server=on,wait=off \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-aarch64test/monitor.sock,server=on,wait=off \ -mon chardev=charmonitor,id=monitor,mode=control \ -rtc base=utc \ -no-shutdown \ [...] diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 83dd6a7756..07cd522699 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -753,10 +753,10 @@ testCompareXMLToArgv(const void *data) if (testCompareXMLToArgvValidateSchema(&driver, migrateURI, info, flags) < 0) goto cleanup; - if (!(actualargv = virCommandToString(cmd, false))) + if (!(actualargv = virCommandToString(cmd, true))) goto cleanup; - if (virTestCompareToFile(actualargv, info->outfile) < 0) + if (virTestCompareToFileFull(actualargv, info->outfile, false) < 0) goto cleanup; ret = 0; -- 2.30.2

Move calls to virStorageBackendFileSystemMountAddOptions earlier so that the options are formatted before the positional arguments. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/storage/storage_util.c | 8 ++++---- tests/storagepoolxml2argvdata/pool-fs-freebsd.argv | 6 +++++- tests/storagepoolxml2argvdata/pool-fs-linux.argv | 4 +++- .../storagepoolxml2argvdata/pool-netfs-auto-freebsd.argv | 5 ++++- tests/storagepoolxml2argvdata/pool-netfs-auto-linux.argv | 3 ++- .../storagepoolxml2argvdata/pool-netfs-cifs-freebsd.argv | 6 +++++- tests/storagepoolxml2argvdata/pool-netfs-cifs-linux.argv | 4 +++- tests/storagepoolxml2argvdata/pool-netfs-cifs.argv | 6 +++++- tests/storagepoolxml2argvdata/pool-netfs-freebsd.argv | 6 +++++- .../pool-netfs-gluster-freebsd.argv | 7 +++++-- .../storagepoolxml2argvdata/pool-netfs-gluster-linux.argv | 5 +++-- tests/storagepoolxml2argvdata/pool-netfs-gluster.argv | 6 +++++- tests/storagepoolxml2argvdata/pool-netfs-linux.argv | 4 +++- .../pool-netfs-ns-mountopts-freebsd.argv | 7 +++++-- .../pool-netfs-ns-mountopts-linux.argv | 5 +++-- .../storagepoolxml2argvdata/pool-netfs-ns-mountopts.argv | 6 +++++- .../pool-netfs-protocol-ver-freebsd.argv | 6 +++++- .../pool-netfs-protocol-ver-linux.argv | 5 +++-- .../storagepoolxml2argvdata/pool-netfs-protocol-ver.argv | 6 +++++- 19 files changed, 78 insertions(+), 27 deletions(-) diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index 687bc645ee..6cf6753ef3 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -4140,8 +4140,8 @@ virStorageBackendFileSystemMountNFSArgs(virCommandPtr cmd, virStoragePoolDefPtr def, const char *nfsVers) { - virCommandAddArgList(cmd, src, def->target.path, NULL); virStorageBackendFileSystemMountAddOptions(cmd, def, nfsVers); + virCommandAddArgList(cmd, src, def->target.path, NULL); } @@ -4153,8 +4153,8 @@ virStorageBackendFileSystemMountGlusterArgs(virCommandPtr cmd, const char *fmt; fmt = virStoragePoolFormatFileSystemNetTypeToString(def->source.format); - virCommandAddArgList(cmd, "-t", fmt, src, def->target.path, NULL); virStorageBackendFileSystemMountAddOptions(cmd, def, "direct-io-mode=1"); + virCommandAddArgList(cmd, "-t", fmt, src, def->target.path, NULL); } @@ -4166,8 +4166,8 @@ virStorageBackendFileSystemMountCIFSArgs(virCommandPtr cmd, const char *fmt; fmt = virStoragePoolFormatFileSystemNetTypeToString(def->source.format); - virCommandAddArgList(cmd, "-t", fmt, src, def->target.path, NULL); virStorageBackendFileSystemMountAddOptions(cmd, def, "guest"); + virCommandAddArgList(cmd, "-t", fmt, src, def->target.path, NULL); } @@ -4183,8 +4183,8 @@ virStorageBackendFileSystemMountDefaultArgs(virCommandPtr cmd, fmt = virStoragePoolFormatFileSystemTypeToString(def->source.format); else fmt = virStoragePoolFormatFileSystemNetTypeToString(def->source.format); - virCommandAddArgList(cmd, "-t", fmt, src, def->target.path, NULL); virStorageBackendFileSystemMountAddOptions(cmd, def, nfsVers); + virCommandAddArgList(cmd, "-t", fmt, src, def->target.path, NULL); } diff --git a/tests/storagepoolxml2argvdata/pool-fs-freebsd.argv b/tests/storagepoolxml2argvdata/pool-fs-freebsd.argv index a35d73e254..19dac7599e 100644 --- a/tests/storagepoolxml2argvdata/pool-fs-freebsd.argv +++ b/tests/storagepoolxml2argvdata/pool-fs-freebsd.argv @@ -1 +1,5 @@ -mount -t ext3 /dev/sda6 /mnt -o nosuid,noexec +mount \ +-o nosuid,noexec \ +-t ext3 \ +/dev/sda6 \ +/mnt diff --git a/tests/storagepoolxml2argvdata/pool-fs-linux.argv b/tests/storagepoolxml2argvdata/pool-fs-linux.argv index 19543f442d..6d014320cf 100644 --- a/tests/storagepoolxml2argvdata/pool-fs-linux.argv +++ b/tests/storagepoolxml2argvdata/pool-fs-linux.argv @@ -1 +1,3 @@ -mount -t ext3 /dev/sda6 /mnt -o nodev,nosuid,noexec +mount \ +-o nodev,nosuid,noexec \ +-t ext3 /dev/sda6 /mnt diff --git a/tests/storagepoolxml2argvdata/pool-netfs-auto-freebsd.argv b/tests/storagepoolxml2argvdata/pool-netfs-auto-freebsd.argv index 39e5c97aed..8ef4527680 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-auto-freebsd.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-auto-freebsd.argv @@ -1 +1,4 @@ -mount localhost:/var/lib/libvirt/images /mnt -o nosuid,noexec +mount \ +-o nosuid,noexec \ +localhost:/var/lib/libvirt/images \ +/mnt diff --git a/tests/storagepoolxml2argvdata/pool-netfs-auto-linux.argv b/tests/storagepoolxml2argvdata/pool-netfs-auto-linux.argv index 1f82d3d29c..b5e455090a 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-auto-linux.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-auto-linux.argv @@ -1 +1,2 @@ -mount localhost:/var/lib/libvirt/images /mnt -o nodev,nosuid,noexec +mount \ +-o nodev,nosuid,noexec localhost:/var/lib/libvirt/images /mnt diff --git a/tests/storagepoolxml2argvdata/pool-netfs-cifs-freebsd.argv b/tests/storagepoolxml2argvdata/pool-netfs-cifs-freebsd.argv index d72749a032..fe4b4dbe35 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-cifs-freebsd.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-cifs-freebsd.argv @@ -1 +1,5 @@ -mount -t cifs //example.com/samba_share /mnt/cifs -o nosuid,noexec,guest +mount \ +-o nosuid,noexec,guest \ +-t cifs \ +//example.com/samba_share \ +/mnt/cifs diff --git a/tests/storagepoolxml2argvdata/pool-netfs-cifs-linux.argv b/tests/storagepoolxml2argvdata/pool-netfs-cifs-linux.argv index 85aa9cf23f..feb20d7bc8 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-cifs-linux.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-cifs-linux.argv @@ -1 +1,3 @@ -mount -t cifs //example.com/samba_share /mnt/cifs -o nodev,nosuid,noexec,guest +mount \ +-o nodev,nosuid,noexec,guest \ +-t cifs //example.com/samba_share /mnt/cifs diff --git a/tests/storagepoolxml2argvdata/pool-netfs-cifs.argv b/tests/storagepoolxml2argvdata/pool-netfs-cifs.argv index 2fef6f5782..1e9eeb467b 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-cifs.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-cifs.argv @@ -1 +1,5 @@ -mount -t cifs //example.com/samba_share /mnt/cifs -o guest +mount \ +-o guest \ +-t cifs \ +//example.com/samba_share \ +/mnt/cifs diff --git a/tests/storagepoolxml2argvdata/pool-netfs-freebsd.argv b/tests/storagepoolxml2argvdata/pool-netfs-freebsd.argv index 05c1951f32..15efc94531 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-freebsd.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-freebsd.argv @@ -1 +1,5 @@ -mount -t nfs localhost:/var/lib/libvirt/images /mnt -o nosuid,noexec +mount \ +-o nosuid,noexec \ +-t nfs \ +localhost:/var/lib/libvirt/images \ +/mnt diff --git a/tests/storagepoolxml2argvdata/pool-netfs-gluster-freebsd.argv b/tests/storagepoolxml2argvdata/pool-netfs-gluster-freebsd.argv index 700107d78e..38dfabdaab 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-gluster-freebsd.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-gluster-freebsd.argv @@ -1,2 +1,5 @@ -mount -t glusterfs example.com:/volume /mnt/gluster -o nosuid,noexec,\ -direct-io-mode=1 +mount \ +-o nosuid,noexec,direct-io-mode=1 \ +-t glusterfs \ +example.com:/volume \ +/mnt/gluster diff --git a/tests/storagepoolxml2argvdata/pool-netfs-gluster-linux.argv b/tests/storagepoolxml2argvdata/pool-netfs-gluster-linux.argv index 9535c8a1b9..4524bc921a 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-gluster-linux.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-gluster-linux.argv @@ -1,2 +1,3 @@ -mount -t glusterfs example.com:/volume /mnt/gluster -o nodev,nosuid,noexec,\ -direct-io-mode=1 +mount \ +-o nodev,nosuid,noexec,direct-io-mode=1 \ +-t glusterfs example.com:/volume /mnt/gluster diff --git a/tests/storagepoolxml2argvdata/pool-netfs-gluster.argv b/tests/storagepoolxml2argvdata/pool-netfs-gluster.argv index 97be9cbeb3..ec9a09defe 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-gluster.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-gluster.argv @@ -1 +1,5 @@ -mount -t glusterfs example.com:/volume /mnt/gluster -o direct-io-mode=1 +mount \ +-o direct-io-mode=1 \ +-t glusterfs \ +example.com:/volume \ +/mnt/gluster diff --git a/tests/storagepoolxml2argvdata/pool-netfs-linux.argv b/tests/storagepoolxml2argvdata/pool-netfs-linux.argv index 22fafd7b32..ce0d88cfac 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-linux.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-linux.argv @@ -1 +1,3 @@ -mount -t nfs localhost:/var/lib/libvirt/images /mnt -o nodev,nosuid,noexec +mount \ +-o nodev,nosuid,noexec \ +-t nfs localhost:/var/lib/libvirt/images /mnt diff --git a/tests/storagepoolxml2argvdata/pool-netfs-ns-mountopts-freebsd.argv b/tests/storagepoolxml2argvdata/pool-netfs-ns-mountopts-freebsd.argv index ac5c0acd00..b90811e0fd 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-ns-mountopts-freebsd.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-ns-mountopts-freebsd.argv @@ -1,2 +1,5 @@ -mount -t nfs localhost:/var/lib/libvirt/images /mnt -o nosuid,noexec,nfsvers=3,\ -sync,lazytime +mount \ +-o nosuid,noexec,nfsvers=3,sync,lazytime \ +-t nfs \ +localhost:/var/lib/libvirt/images \ +/mnt diff --git a/tests/storagepoolxml2argvdata/pool-netfs-ns-mountopts-linux.argv b/tests/storagepoolxml2argvdata/pool-netfs-ns-mountopts-linux.argv index 8e10379c04..517fdbb080 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-ns-mountopts-linux.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-ns-mountopts-linux.argv @@ -1,2 +1,3 @@ -mount -t nfs localhost:/var/lib/libvirt/images /mnt -o nodev,nosuid,noexec,\ -nfsvers=3,sync,lazytime +mount \ +-o nodev,nosuid,noexec,nfsvers=3,sync,lazytime \ +-t nfs localhost:/var/lib/libvirt/images /mnt diff --git a/tests/storagepoolxml2argvdata/pool-netfs-ns-mountopts.argv b/tests/storagepoolxml2argvdata/pool-netfs-ns-mountopts.argv index a63d6da456..0d6d62793d 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-ns-mountopts.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-ns-mountopts.argv @@ -1 +1,5 @@ -mount -t nfs localhost:/var/lib/libvirt/images /mnt -o nfsvers=3,sync,lazytime +mount \ +-o nfsvers=3,sync,lazytime \ +-t nfs \ +localhost:/var/lib/libvirt/images \ +/mnt diff --git a/tests/storagepoolxml2argvdata/pool-netfs-protocol-ver-freebsd.argv b/tests/storagepoolxml2argvdata/pool-netfs-protocol-ver-freebsd.argv index 59d09d2e5d..32cdaebcff 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-protocol-ver-freebsd.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-protocol-ver-freebsd.argv @@ -1 +1,5 @@ -mount -t nfs localhost:/var/lib/libvirt/images /mnt -o nosuid,noexec,nfsvers=3 +mount \ +-o nosuid,noexec,nfsvers=3 \ +-t nfs \ +localhost:/var/lib/libvirt/images \ +/mnt diff --git a/tests/storagepoolxml2argvdata/pool-netfs-protocol-ver-linux.argv b/tests/storagepoolxml2argvdata/pool-netfs-protocol-ver-linux.argv index c819a089d2..fc1d91c614 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-protocol-ver-linux.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-protocol-ver-linux.argv @@ -1,2 +1,3 @@ -mount -t nfs localhost:/var/lib/libvirt/images /mnt -o nodev,nosuid,noexec,\ -nfsvers=3 +mount \ +-o nodev,nosuid,noexec,nfsvers=3 \ +-t nfs localhost:/var/lib/libvirt/images /mnt diff --git a/tests/storagepoolxml2argvdata/pool-netfs-protocol-ver.argv b/tests/storagepoolxml2argvdata/pool-netfs-protocol-ver.argv index f26656d5b8..ed157883c0 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-protocol-ver.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-protocol-ver.argv @@ -1 +1,5 @@ -mount -t nfs localhost:/var/lib/libvirt/images /mnt -o nfsvers=3 +mount \ +-o nfsvers=3 \ +-t nfs \ +localhost:/var/lib/libvirt/images \ +/mnt -- 2.30.2

virCommandToString has the possibility to return an already wrapped string with better format than what we get from the test wrapper script. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/storagepoolxml2argvdata/pool-fs-linux.argv | 4 +++- tests/storagepoolxml2argvdata/pool-fs.argv | 5 ++++- tests/storagepoolxml2argvdata/pool-logical-create.argv | 3 ++- tests/storagepoolxml2argvdata/pool-logical-noname.argv | 3 ++- tests/storagepoolxml2argvdata/pool-logical-nopath.argv | 3 ++- tests/storagepoolxml2argvdata/pool-logical.argv | 3 ++- tests/storagepoolxml2argvdata/pool-netfs-auto-linux.argv | 4 +++- tests/storagepoolxml2argvdata/pool-netfs-auto.argv | 4 +++- tests/storagepoolxml2argvdata/pool-netfs-cifs-linux.argv | 4 +++- tests/storagepoolxml2argvdata/pool-netfs-gluster-linux.argv | 4 +++- tests/storagepoolxml2argvdata/pool-netfs-linux.argv | 4 +++- .../pool-netfs-ns-mountopts-linux.argv | 4 +++- .../pool-netfs-protocol-ver-linux.argv | 4 +++- tests/storagepoolxml2argvdata/pool-netfs.argv | 5 ++++- tests/storagepoolxml2argvtest.c | 4 ++-- 15 files changed, 42 insertions(+), 16 deletions(-) diff --git a/tests/storagepoolxml2argvdata/pool-fs-linux.argv b/tests/storagepoolxml2argvdata/pool-fs-linux.argv index 6d014320cf..99cc8ee77f 100644 --- a/tests/storagepoolxml2argvdata/pool-fs-linux.argv +++ b/tests/storagepoolxml2argvdata/pool-fs-linux.argv @@ -1,3 +1,5 @@ mount \ -o nodev,nosuid,noexec \ --t ext3 /dev/sda6 /mnt +-t ext3 \ +/dev/sda6 \ +/mnt diff --git a/tests/storagepoolxml2argvdata/pool-fs.argv b/tests/storagepoolxml2argvdata/pool-fs.argv index 537ce4cee5..8254863b57 100644 --- a/tests/storagepoolxml2argvdata/pool-fs.argv +++ b/tests/storagepoolxml2argvdata/pool-fs.argv @@ -1 +1,4 @@ -mount -t ext3 /dev/sda6 /mnt +mount \ +-t ext3 \ +/dev/sda6 \ +/mnt diff --git a/tests/storagepoolxml2argvdata/pool-logical-create.argv b/tests/storagepoolxml2argvdata/pool-logical-create.argv index 8c7f8c93f9..e22c05beb9 100644 --- a/tests/storagepoolxml2argvdata/pool-logical-create.argv +++ b/tests/storagepoolxml2argvdata/pool-logical-create.argv @@ -1 +1,2 @@ -vgchange -aly HostVG +vgchange \ +-aly HostVG diff --git a/tests/storagepoolxml2argvdata/pool-logical-noname.argv b/tests/storagepoolxml2argvdata/pool-logical-noname.argv index 9f7eda00bd..90fa7b6f02 100644 --- a/tests/storagepoolxml2argvdata/pool-logical-noname.argv +++ b/tests/storagepoolxml2argvdata/pool-logical-noname.argv @@ -1 +1,2 @@ -vgchange -aly zily +vgchange \ +-aly zily diff --git a/tests/storagepoolxml2argvdata/pool-logical-nopath.argv b/tests/storagepoolxml2argvdata/pool-logical-nopath.argv index 8c7f8c93f9..e22c05beb9 100644 --- a/tests/storagepoolxml2argvdata/pool-logical-nopath.argv +++ b/tests/storagepoolxml2argvdata/pool-logical-nopath.argv @@ -1 +1,2 @@ -vgchange -aly HostVG +vgchange \ +-aly HostVG diff --git a/tests/storagepoolxml2argvdata/pool-logical.argv b/tests/storagepoolxml2argvdata/pool-logical.argv index 8c7f8c93f9..e22c05beb9 100644 --- a/tests/storagepoolxml2argvdata/pool-logical.argv +++ b/tests/storagepoolxml2argvdata/pool-logical.argv @@ -1 +1,2 @@ -vgchange -aly HostVG +vgchange \ +-aly HostVG diff --git a/tests/storagepoolxml2argvdata/pool-netfs-auto-linux.argv b/tests/storagepoolxml2argvdata/pool-netfs-auto-linux.argv index b5e455090a..9974aea273 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-auto-linux.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-auto-linux.argv @@ -1,2 +1,4 @@ mount \ --o nodev,nosuid,noexec localhost:/var/lib/libvirt/images /mnt +-o nodev,nosuid,noexec \ +localhost:/var/lib/libvirt/images \ +/mnt diff --git a/tests/storagepoolxml2argvdata/pool-netfs-auto.argv b/tests/storagepoolxml2argvdata/pool-netfs-auto.argv index 888a0161b8..e49233cd93 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-auto.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-auto.argv @@ -1 +1,3 @@ -mount localhost:/var/lib/libvirt/images /mnt +mount \ +localhost:/var/lib/libvirt/images \ +/mnt diff --git a/tests/storagepoolxml2argvdata/pool-netfs-cifs-linux.argv b/tests/storagepoolxml2argvdata/pool-netfs-cifs-linux.argv index feb20d7bc8..3432ab11bd 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-cifs-linux.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-cifs-linux.argv @@ -1,3 +1,5 @@ mount \ -o nodev,nosuid,noexec,guest \ --t cifs //example.com/samba_share /mnt/cifs +-t cifs \ +//example.com/samba_share \ +/mnt/cifs diff --git a/tests/storagepoolxml2argvdata/pool-netfs-gluster-linux.argv b/tests/storagepoolxml2argvdata/pool-netfs-gluster-linux.argv index 4524bc921a..e622e0eb95 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-gluster-linux.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-gluster-linux.argv @@ -1,3 +1,5 @@ mount \ -o nodev,nosuid,noexec,direct-io-mode=1 \ --t glusterfs example.com:/volume /mnt/gluster +-t glusterfs \ +example.com:/volume \ +/mnt/gluster diff --git a/tests/storagepoolxml2argvdata/pool-netfs-linux.argv b/tests/storagepoolxml2argvdata/pool-netfs-linux.argv index ce0d88cfac..4012b04d7d 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-linux.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-linux.argv @@ -1,3 +1,5 @@ mount \ -o nodev,nosuid,noexec \ --t nfs localhost:/var/lib/libvirt/images /mnt +-t nfs \ +localhost:/var/lib/libvirt/images \ +/mnt diff --git a/tests/storagepoolxml2argvdata/pool-netfs-ns-mountopts-linux.argv b/tests/storagepoolxml2argvdata/pool-netfs-ns-mountopts-linux.argv index 517fdbb080..433b39d0e2 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-ns-mountopts-linux.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-ns-mountopts-linux.argv @@ -1,3 +1,5 @@ mount \ -o nodev,nosuid,noexec,nfsvers=3,sync,lazytime \ --t nfs localhost:/var/lib/libvirt/images /mnt +-t nfs \ +localhost:/var/lib/libvirt/images \ +/mnt diff --git a/tests/storagepoolxml2argvdata/pool-netfs-protocol-ver-linux.argv b/tests/storagepoolxml2argvdata/pool-netfs-protocol-ver-linux.argv index fc1d91c614..dac46a074f 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-protocol-ver-linux.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-protocol-ver-linux.argv @@ -1,3 +1,5 @@ mount \ -o nodev,nosuid,noexec,nfsvers=3 \ --t nfs localhost:/var/lib/libvirt/images /mnt +-t nfs \ +localhost:/var/lib/libvirt/images \ +/mnt diff --git a/tests/storagepoolxml2argvdata/pool-netfs.argv b/tests/storagepoolxml2argvdata/pool-netfs.argv index 04127c5087..0ed31b642b 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs.argv @@ -1 +1,4 @@ -mount -t nfs localhost:/var/lib/libvirt/images /mnt +mount \ +-t nfs \ +localhost:/var/lib/libvirt/images \ +/mnt diff --git a/tests/storagepoolxml2argvtest.c b/tests/storagepoolxml2argvtest.c index 0279437f63..58fb14b8b2 100644 --- a/tests/storagepoolxml2argvtest.c +++ b/tests/storagepoolxml2argvtest.c @@ -74,12 +74,12 @@ testCompareXMLToArgvFiles(bool shouldFail, goto cleanup; }; - if (!(actualCmdline = virCommandToStringFull(cmd, false, true))) { + if (!(actualCmdline = virCommandToStringFull(cmd, true, true))) { VIR_TEST_DEBUG("pool type '%s' failed to get commandline", defTypeStr); goto cleanup; } - if (virTestCompareToFile(actualCmdline, cmdline) < 0) + if (virTestCompareToFileFull(actualCmdline, cmdline, false) < 0) goto cleanup; ret = 0; -- 2.30.2

virCommandToString has the possibility to return an already wrapped string with better format than what we get from the test wrapper script. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/storagevolxml2argvdata/iso-input.argv | 4 +++- tests/storagevolxml2argvdata/iso.argv | 4 +++- .../storagevolxml2argvdata/logical-from-qcow2.argv | 4 +++- tests/storagevolxml2argvdata/luks-cipher.argv | 6 +++--- .../luks-convert-encrypt.argv | 12 +++++------- .../luks-convert-encrypt2fileqcow2.argv | 12 ++++++------ .../luks-convert-encrypt2fileraw.argv | 12 ++++++------ .../storagevolxml2argvdata/luks-convert-qcow2.argv | 11 +++++------ tests/storagevolxml2argvdata/luks-convert.argv | 10 +++++----- tests/storagevolxml2argvdata/luks.argv | 3 ++- tests/storagevolxml2argvdata/qcow2-1.1.argv | 4 +++- tests/storagevolxml2argvdata/qcow2-compat.argv | 4 +++- .../qcow2-from-logical-compat.argv | 4 +++- tests/storagevolxml2argvdata/qcow2-lazy.argv | 5 +++-- .../qcow2-luks-convert-encrypt.argv | 14 ++++++-------- .../qcow2-luks-convert-encrypt2fileqcow2.argv | 12 ++++++------ .../qcow2-luks-convert-encrypt2fileraw.argv | 12 ++++++------ tests/storagevolxml2argvdata/qcow2-luks.argv | 6 +++--- .../qcow2-nobacking-convert-prealloc-compat.argv | 4 ++-- .../qcow2-nobacking-prealloc-compat.argv | 5 +++-- .../qcow2-nocapacity-convert-prealloc.argv | 4 ++-- tests/storagevolxml2argvdata/qcow2-nocapacity.argv | 3 ++- .../storagevolxml2argvdata/qcow2-nocow-compat.argv | 5 +++-- .../storagevolxml2argvdata/qcow2-zerocapacity.argv | 4 +++- tests/storagevolxml2argvtest.c | 6 +++--- 25 files changed, 92 insertions(+), 78 deletions(-) diff --git a/tests/storagevolxml2argvdata/iso-input.argv b/tests/storagevolxml2argvdata/iso-input.argv index 203f27ca22..16e0e91a4c 100644 --- a/tests/storagevolxml2argvdata/iso-input.argv +++ b/tests/storagevolxml2argvdata/iso-input.argv @@ -1,4 +1,6 @@ qemu-img \ convert \ -f raw \ --O raw /var/lib/libvirt/images/test.iso /var/lib/libvirt/images/sparse.img +-O raw \ +/var/lib/libvirt/images/test.iso \ +/var/lib/libvirt/images/sparse.img diff --git a/tests/storagevolxml2argvdata/iso.argv b/tests/storagevolxml2argvdata/iso.argv index f74505ecec..52b29a51c2 100644 --- a/tests/storagevolxml2argvdata/iso.argv +++ b/tests/storagevolxml2argvdata/iso.argv @@ -1,3 +1,5 @@ qemu-img \ create \ --f raw /var/lib/libvirt/images/test.iso 1024K +-f raw \ +/var/lib/libvirt/images/test.iso \ +1024K diff --git a/tests/storagevolxml2argvdata/logical-from-qcow2.argv b/tests/storagevolxml2argvdata/logical-from-qcow2.argv index c1b3cef4b9..3da4dada9b 100644 --- a/tests/storagevolxml2argvdata/logical-from-qcow2.argv +++ b/tests/storagevolxml2argvdata/logical-from-qcow2.argv @@ -1,4 +1,6 @@ qemu-img \ convert \ -f qcow2 \ --O raw /var/lib/libvirt/images/OtherDemo.img /dev/HostVG/Swap +-O raw \ +/var/lib/libvirt/images/OtherDemo.img \ +/dev/HostVG/Swap diff --git a/tests/storagevolxml2argvdata/luks-cipher.argv b/tests/storagevolxml2argvdata/luks-cipher.argv index bb4438949c..f482018182 100644 --- a/tests/storagevolxml2argvdata/luks-cipher.argv +++ b/tests/storagevolxml2argvdata/luks-cipher.argv @@ -2,6 +2,6 @@ qemu-img \ create \ -f luks \ --object secret,id=LuksDemo.img_encrypt0,file=/path/to/secretFile \ --o key-secret=LuksDemo.img_encrypt0,cipher-alg=serpent-256,cipher-mode=cbc,\ -hash-alg=sha256,ivgen-alg=plain64,\ -ivgen-hash-alg=sha256 /var/lib/libvirt/images/LuksDemo.img 5242880K +-o key-secret=LuksDemo.img_encrypt0,cipher-alg=serpent-256,cipher-mode=cbc,hash-alg=sha256,ivgen-alg=plain64,ivgen-hash-alg=sha256 \ +/var/lib/libvirt/images/LuksDemo.img \ +5242880K diff --git a/tests/storagevolxml2argvdata/luks-convert-encrypt.argv b/tests/storagevolxml2argvdata/luks-convert-encrypt.argv index 456ae621d1..307e08c9b4 100644 --- a/tests/storagevolxml2argvdata/luks-convert-encrypt.argv +++ b/tests/storagevolxml2argvdata/luks-convert-encrypt.argv @@ -2,7 +2,8 @@ qemu-img \ create \ -f luks \ --object secret,id=LuksDemo.img_encrypt0,file=/path/to/secretFile \ --o key-secret=LuksDemo.img_encrypt0 /var/lib/libvirt/images/LuksDemo.img \ +-o key-secret=LuksDemo.img_encrypt0 \ +/var/lib/libvirt/images/LuksDemo.img \ 5242880K qemu-img \ convert \ @@ -10,9 +11,6 @@ convert \ -n \ --target-image-opts \ --object secret,id=LuksDemo.img_encrypt0,file=/path/to/secretFile \ ---object secret,id=OtherDemo.img_encrypt0,\ -file=/path/to/inputSecretFile driver=luks,\ -file.filename=/var/lib/libvirt/images/OtherDemo.img,\ -key-secret=OtherDemo.img_encrypt0 driver=luks,\ -file.filename=/var/lib/libvirt/images/LuksDemo.img,\ -key-secret=LuksDemo.img_encrypt0 +--object secret,id=OtherDemo.img_encrypt0,file=/path/to/inputSecretFile \ +driver=luks,file.filename=/var/lib/libvirt/images/OtherDemo.img,key-secret=OtherDemo.img_encrypt0 \ +driver=luks,file.filename=/var/lib/libvirt/images/LuksDemo.img,key-secret=LuksDemo.img_encrypt0 diff --git a/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv b/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv index 1320e2ee2f..4b9ccfe8dc 100644 --- a/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv +++ b/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv @@ -1,14 +1,14 @@ qemu-img \ create \ -f qcow2 \ --o compat=0.10 /var/lib/libvirt/images/sparse-qcow2.img 1073741824K +-o compat=0.10 \ +/var/lib/libvirt/images/sparse-qcow2.img \ +1073741824K qemu-img \ convert \ --image-opts \ -n \ --target-image-opts \ ---object secret,id=OtherDemo.img_encrypt0,\ -file=/path/to/inputSecretFile driver=luks,\ -file.filename=/var/lib/libvirt/images/OtherDemo.img,\ -key-secret=OtherDemo.img_encrypt0 driver=qcow2,\ -file.filename=/var/lib/libvirt/images/sparse-qcow2.img +--object secret,id=OtherDemo.img_encrypt0,file=/path/to/inputSecretFile \ +driver=luks,file.filename=/var/lib/libvirt/images/OtherDemo.img,key-secret=OtherDemo.img_encrypt0 \ +driver=qcow2,file.filename=/var/lib/libvirt/images/sparse-qcow2.img diff --git a/tests/storagevolxml2argvdata/luks-convert-encrypt2fileraw.argv b/tests/storagevolxml2argvdata/luks-convert-encrypt2fileraw.argv index e140850217..d48dbf371c 100644 --- a/tests/storagevolxml2argvdata/luks-convert-encrypt2fileraw.argv +++ b/tests/storagevolxml2argvdata/luks-convert-encrypt2fileraw.argv @@ -1,13 +1,13 @@ qemu-img \ create \ --f raw /var/lib/libvirt/images/sparse.img 1073741824K +-f raw \ +/var/lib/libvirt/images/sparse.img \ +1073741824K qemu-img \ convert \ --image-opts \ -n \ --target-image-opts \ ---object secret,id=OtherDemo.img_encrypt0,\ -file=/path/to/inputSecretFile driver=luks,\ -file.filename=/var/lib/libvirt/images/OtherDemo.img,\ -key-secret=OtherDemo.img_encrypt0 driver=raw,\ -file.filename=/var/lib/libvirt/images/sparse.img +--object secret,id=OtherDemo.img_encrypt0,file=/path/to/inputSecretFile \ +driver=luks,file.filename=/var/lib/libvirt/images/OtherDemo.img,key-secret=OtherDemo.img_encrypt0 \ +driver=raw,file.filename=/var/lib/libvirt/images/sparse.img diff --git a/tests/storagevolxml2argvdata/luks-convert-qcow2.argv b/tests/storagevolxml2argvdata/luks-convert-qcow2.argv index 78cd9a2a8d..050d6fce0d 100644 --- a/tests/storagevolxml2argvdata/luks-convert-qcow2.argv +++ b/tests/storagevolxml2argvdata/luks-convert-qcow2.argv @@ -2,15 +2,14 @@ qemu-img \ create \ -f luks \ --object secret,id=OtherDemo.img_encrypt0,file=/path/to/secretFile \ --o key-secret=OtherDemo.img_encrypt0 /var/lib/libvirt/images/OtherDemo.img \ +-o key-secret=OtherDemo.img_encrypt0 \ +/var/lib/libvirt/images/OtherDemo.img \ 5242880K qemu-img \ convert \ --image-opts \ -n \ --target-image-opts \ ---object secret,id=OtherDemo.img_encrypt0,\ -file=/path/to/secretFile driver=qcow2,\ -file.filename=/var/lib/libvirt/images/sparse-qcow2.img driver=luks,\ -file.filename=/var/lib/libvirt/images/OtherDemo.img,\ -key-secret=OtherDemo.img_encrypt0 +--object secret,id=OtherDemo.img_encrypt0,file=/path/to/secretFile \ +driver=qcow2,file.filename=/var/lib/libvirt/images/sparse-qcow2.img \ +driver=luks,file.filename=/var/lib/libvirt/images/OtherDemo.img,key-secret=OtherDemo.img_encrypt0 diff --git a/tests/storagevolxml2argvdata/luks-convert.argv b/tests/storagevolxml2argvdata/luks-convert.argv index e4a8277d7f..5b6bc7bc63 100644 --- a/tests/storagevolxml2argvdata/luks-convert.argv +++ b/tests/storagevolxml2argvdata/luks-convert.argv @@ -2,14 +2,14 @@ qemu-img \ create \ -f luks \ --object secret,id=OtherDemo.img_encrypt0,file=/path/to/secretFile \ --o key-secret=OtherDemo.img_encrypt0 /var/lib/libvirt/images/OtherDemo.img \ +-o key-secret=OtherDemo.img_encrypt0 \ +/var/lib/libvirt/images/OtherDemo.img \ 5242880K qemu-img \ convert \ --image-opts \ -n \ --target-image-opts \ ---object secret,id=OtherDemo.img_encrypt0,file=/path/to/secretFile driver=raw,\ -file.filename=/var/lib/libvirt/images/sparse.img driver=luks,\ -file.filename=/var/lib/libvirt/images/OtherDemo.img,\ -key-secret=OtherDemo.img_encrypt0 +--object secret,id=OtherDemo.img_encrypt0,file=/path/to/secretFile \ +driver=raw,file.filename=/var/lib/libvirt/images/sparse.img \ +driver=luks,file.filename=/var/lib/libvirt/images/OtherDemo.img,key-secret=OtherDemo.img_encrypt0 diff --git a/tests/storagevolxml2argvdata/luks.argv b/tests/storagevolxml2argvdata/luks.argv index 5013c8ca7f..41b5fd663c 100644 --- a/tests/storagevolxml2argvdata/luks.argv +++ b/tests/storagevolxml2argvdata/luks.argv @@ -2,5 +2,6 @@ qemu-img \ create \ -f luks \ --object secret,id=LuksDemo.img_encrypt0,file=/path/to/secretFile \ --o key-secret=LuksDemo.img_encrypt0 /var/lib/libvirt/images/LuksDemo.img \ +-o key-secret=LuksDemo.img_encrypt0 \ +/var/lib/libvirt/images/LuksDemo.img \ 5242880K diff --git a/tests/storagevolxml2argvdata/qcow2-1.1.argv b/tests/storagevolxml2argvdata/qcow2-1.1.argv index 5ee974afe9..40fbe065e0 100644 --- a/tests/storagevolxml2argvdata/qcow2-1.1.argv +++ b/tests/storagevolxml2argvdata/qcow2-1.1.argv @@ -2,4 +2,6 @@ qemu-img \ create \ -f qcow2 \ -b /dev/null \ --o backing_fmt=raw,compat=1.1 /var/lib/libvirt/images/OtherDemo.img 5242880K +-o backing_fmt=raw,compat=1.1 \ +/var/lib/libvirt/images/OtherDemo.img \ +5242880K diff --git a/tests/storagevolxml2argvdata/qcow2-compat.argv b/tests/storagevolxml2argvdata/qcow2-compat.argv index 3071d7a790..bf3a50a7f3 100644 --- a/tests/storagevolxml2argvdata/qcow2-compat.argv +++ b/tests/storagevolxml2argvdata/qcow2-compat.argv @@ -2,4 +2,6 @@ qemu-img \ create \ -f qcow2 \ -b /dev/null \ --o backing_fmt=raw,compat=0.10 /var/lib/libvirt/images/OtherDemo.img 5242880K +-o backing_fmt=raw,compat=0.10 \ +/var/lib/libvirt/images/OtherDemo.img \ +5242880K diff --git a/tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv b/tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv index 1971da200d..dbc7deb16a 100644 --- a/tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv +++ b/tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv @@ -2,4 +2,6 @@ qemu-img \ convert \ -f raw \ -O qcow2 \ --o compat=0.10 /dev/HostVG/Swap /var/lib/libvirt/images/OtherDemo.img +-o compat=0.10 \ +/dev/HostVG/Swap \ +/var/lib/libvirt/images/OtherDemo.img diff --git a/tests/storagevolxml2argvdata/qcow2-lazy.argv b/tests/storagevolxml2argvdata/qcow2-lazy.argv index 2621b01168..cd551be6e9 100644 --- a/tests/storagevolxml2argvdata/qcow2-lazy.argv +++ b/tests/storagevolxml2argvdata/qcow2-lazy.argv @@ -2,5 +2,6 @@ qemu-img \ create \ -f qcow2 \ -b /dev/null \ --o backing_fmt=raw,compat=1.1,\ -lazy_refcounts /var/lib/libvirt/images/OtherDemo.img 5242880K +-o backing_fmt=raw,compat=1.1,lazy_refcounts \ +/var/lib/libvirt/images/OtherDemo.img \ +5242880K diff --git a/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt.argv b/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt.argv index de8aef4233..d89622d4a6 100644 --- a/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt.argv +++ b/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt.argv @@ -2,17 +2,15 @@ qemu-img \ create \ -f qcow2 \ --object secret,id=OtherDemoLuks.img_encrypt0,file=/path/to/secretFile \ --o encrypt.format=luks,encrypt.key-secret=OtherDemoLuks.img_encrypt0,\ -compat=0.10 /var/lib/libvirt/images/OtherDemoLuks.img 5242880K +-o encrypt.format=luks,encrypt.key-secret=OtherDemoLuks.img_encrypt0,compat=0.10 \ +/var/lib/libvirt/images/OtherDemoLuks.img \ +5242880K qemu-img \ convert \ --image-opts \ -n \ --target-image-opts \ --object secret,id=OtherDemoLuks.img_encrypt0,file=/path/to/secretFile \ ---object secret,id=OtherDemoLuksConvert.img_encrypt0,\ -file=/path/to/inputSecretFile driver=qcow2,\ -file.filename=/var/lib/libvirt/images/OtherDemoLuksConvert.img,\ -encrypt.key-secret=OtherDemoLuksConvert.img_encrypt0 driver=qcow2,\ -file.filename=/var/lib/libvirt/images/OtherDemoLuks.img,\ -encrypt.key-secret=OtherDemoLuks.img_encrypt0 +--object secret,id=OtherDemoLuksConvert.img_encrypt0,file=/path/to/inputSecretFile \ +driver=qcow2,file.filename=/var/lib/libvirt/images/OtherDemoLuksConvert.img,encrypt.key-secret=OtherDemoLuksConvert.img_encrypt0 \ +driver=qcow2,file.filename=/var/lib/libvirt/images/OtherDemoLuks.img,encrypt.key-secret=OtherDemoLuks.img_encrypt0 diff --git a/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt2fileqcow2.argv b/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt2fileqcow2.argv index 517156ca83..4d910552d0 100644 --- a/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt2fileqcow2.argv +++ b/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt2fileqcow2.argv @@ -1,14 +1,14 @@ qemu-img \ create \ -f qcow2 \ --o compat=0.10 /var/lib/libvirt/images/sparse-qcow2.img 1073741824K +-o compat=0.10 \ +/var/lib/libvirt/images/sparse-qcow2.img \ +1073741824K qemu-img \ convert \ --image-opts \ -n \ --target-image-opts \ ---object secret,id=OtherDemoLuksConvert.img_encrypt0,\ -file=/path/to/inputSecretFile driver=qcow2,\ -file.filename=/var/lib/libvirt/images/OtherDemoLuksConvert.img,\ -encrypt.key-secret=OtherDemoLuksConvert.img_encrypt0 driver=qcow2,\ -file.filename=/var/lib/libvirt/images/sparse-qcow2.img +--object secret,id=OtherDemoLuksConvert.img_encrypt0,file=/path/to/inputSecretFile \ +driver=qcow2,file.filename=/var/lib/libvirt/images/OtherDemoLuksConvert.img,encrypt.key-secret=OtherDemoLuksConvert.img_encrypt0 \ +driver=qcow2,file.filename=/var/lib/libvirt/images/sparse-qcow2.img diff --git a/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt2fileraw.argv b/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt2fileraw.argv index 7483c864c1..24197bfd64 100644 --- a/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt2fileraw.argv +++ b/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt2fileraw.argv @@ -1,13 +1,13 @@ qemu-img \ create \ --f raw /var/lib/libvirt/images/sparse.img 1073741824K +-f raw \ +/var/lib/libvirt/images/sparse.img \ +1073741824K qemu-img \ convert \ --image-opts \ -n \ --target-image-opts \ ---object secret,id=OtherDemoLuksConvert.img_encrypt0,\ -file=/path/to/inputSecretFile driver=qcow2,\ -file.filename=/var/lib/libvirt/images/OtherDemoLuksConvert.img,\ -encrypt.key-secret=OtherDemoLuksConvert.img_encrypt0 driver=raw,\ -file.filename=/var/lib/libvirt/images/sparse.img +--object secret,id=OtherDemoLuksConvert.img_encrypt0,file=/path/to/inputSecretFile \ +driver=qcow2,file.filename=/var/lib/libvirt/images/OtherDemoLuksConvert.img,encrypt.key-secret=OtherDemoLuksConvert.img_encrypt0 \ +driver=raw,file.filename=/var/lib/libvirt/images/sparse.img diff --git a/tests/storagevolxml2argvdata/qcow2-luks.argv b/tests/storagevolxml2argvdata/qcow2-luks.argv index 4b51b374ca..308316c90c 100644 --- a/tests/storagevolxml2argvdata/qcow2-luks.argv +++ b/tests/storagevolxml2argvdata/qcow2-luks.argv @@ -3,6 +3,6 @@ create \ -f qcow2 \ -b /dev/null \ --object secret,id=OtherDemoLuks.img_encrypt0,file=/path/to/secretFile \ --o backing_fmt=raw,encrypt.format=luks,\ -encrypt.key-secret=OtherDemoLuks.img_encrypt0,\ -compat=0.10 /var/lib/libvirt/images/OtherDemoLuks.img 5242880K +-o backing_fmt=raw,encrypt.format=luks,encrypt.key-secret=OtherDemoLuks.img_encrypt0,compat=0.10 \ +/var/lib/libvirt/images/OtherDemoLuks.img \ +5242880K diff --git a/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc-compat.argv b/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc-compat.argv index 87489641d5..463ae26779 100644 --- a/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc-compat.argv +++ b/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc-compat.argv @@ -2,6 +2,6 @@ qemu-img \ convert \ -f raw \ -O qcow2 \ --o preallocation=metadata,\ -compat=0.10 /var/lib/libvirt/images/sparse.img \ +-o preallocation=metadata,compat=0.10 \ +/var/lib/libvirt/images/sparse.img \ /var/lib/libvirt/images/OtherDemo.img diff --git a/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc-compat.argv b/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc-compat.argv index a883030744..510e0c13f6 100644 --- a/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc-compat.argv +++ b/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc-compat.argv @@ -1,5 +1,6 @@ qemu-img \ create \ -f qcow2 \ --o preallocation=metadata,\ -compat=0.10 /var/lib/libvirt/images/OtherDemo.img 5242880K +-o preallocation=metadata,compat=0.10 \ +/var/lib/libvirt/images/OtherDemo.img \ +5242880K diff --git a/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv b/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv index 049d2d73b5..0152b1efb6 100644 --- a/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv +++ b/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv @@ -2,6 +2,6 @@ qemu-img \ convert \ -f raw \ -O qcow2 \ --o preallocation=falloc,\ -compat=0.10 /var/lib/libvirt/images/sparse.img \ +-o preallocation=falloc,compat=0.10 \ +/var/lib/libvirt/images/sparse.img \ /var/lib/libvirt/images/OtherDemo.img diff --git a/tests/storagevolxml2argvdata/qcow2-nocapacity.argv b/tests/storagevolxml2argvdata/qcow2-nocapacity.argv index 30bcfb00c7..047932a559 100644 --- a/tests/storagevolxml2argvdata/qcow2-nocapacity.argv +++ b/tests/storagevolxml2argvdata/qcow2-nocapacity.argv @@ -2,4 +2,5 @@ qemu-img \ create \ -f qcow2 \ -b /dev/null \ --o backing_fmt=raw,compat=0.10 /var/lib/libvirt/images/OtherDemo.img +-o backing_fmt=raw,compat=0.10 \ +/var/lib/libvirt/images/OtherDemo.img diff --git a/tests/storagevolxml2argvdata/qcow2-nocow-compat.argv b/tests/storagevolxml2argvdata/qcow2-nocow-compat.argv index 5e327dab0b..4cc7904cfc 100644 --- a/tests/storagevolxml2argvdata/qcow2-nocow-compat.argv +++ b/tests/storagevolxml2argvdata/qcow2-nocow-compat.argv @@ -2,5 +2,6 @@ qemu-img \ create \ -f qcow2 \ -b /dev/null \ --o backing_fmt=raw,nocow=on,\ -compat=0.10 /var/lib/libvirt/images/OtherDemo.img 5242880K +-o backing_fmt=raw,nocow=on,compat=0.10 \ +/var/lib/libvirt/images/OtherDemo.img \ +5242880K diff --git a/tests/storagevolxml2argvdata/qcow2-zerocapacity.argv b/tests/storagevolxml2argvdata/qcow2-zerocapacity.argv index 95dfc65d9b..607c642e6f 100644 --- a/tests/storagevolxml2argvdata/qcow2-zerocapacity.argv +++ b/tests/storagevolxml2argvdata/qcow2-zerocapacity.argv @@ -1,4 +1,6 @@ qemu-img \ create \ -f qcow2 \ --o compat=0.10 /var/lib/libvirt/images/OtherDemo.img 0K +-o compat=0.10 \ +/var/lib/libvirt/images/OtherDemo.img \ +0K diff --git a/tests/storagevolxml2argvtest.c b/tests/storagevolxml2argvtest.c index 5e62313441..1b639e157e 100644 --- a/tests/storagevolxml2argvtest.c +++ b/tests/storagevolxml2argvtest.c @@ -104,13 +104,13 @@ testCompareXMLToArgvFiles(bool shouldFail, } if (convertStep != VIR_STORAGE_VOL_ENCRYPT_CONVERT) { - if (!(actualCmdline = virCommandToString(cmd, false))) + if (!(actualCmdline = virCommandToString(cmd, true))) goto cleanup; } else { char *createCmdline = actualCmdline; g_autofree char *cvtCmdline = NULL; - if (!(cvtCmdline = virCommandToString(cmd, false))) + if (!(cvtCmdline = virCommandToString(cmd, true))) goto cleanup; actualCmdline = g_strdup_printf("%s\n%s", createCmdline, cvtCmdline); @@ -127,7 +127,7 @@ testCompareXMLToArgvFiles(bool shouldFail, } while (convertStep != VIR_STORAGE_VOL_ENCRYPT_DONE); - if (virTestCompareToFile(actualCmdline, cmdline) < 0) + if (virTestCompareToFileFull(actualCmdline, cmdline, false) < 0) goto cleanup; ret = 0; -- 2.30.2

virCommandSetDryRun allows to invoke virCommandToString so that the command string is already wrapped. We now also need to load the base arguments file without unwrapping the arguments. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/networkxml2firewalltest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/networkxml2firewalltest.c b/tests/networkxml2firewalltest.c index 16249c49fd..60cd79eeb2 100644 --- a/tests/networkxml2firewalltest.c +++ b/tests/networkxml2firewalltest.c @@ -98,7 +98,7 @@ static int testCompareXMLToArgvFiles(const char *xml, char *actual; g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); - virCommandSetDryRun(dryRunToken, &buf, false, true, testCommandDryRun, NULL); + virCommandSetDryRun(dryRunToken, &buf, true, true, testCommandDryRun, NULL); if (!(def = virNetworkDefParseFile(xml, NULL))) goto cleanup; @@ -115,7 +115,7 @@ static int testCompareXMLToArgvFiles(const char *xml, if (STRPREFIX(actual, baseargs)) actual += strlen(baseargs); - if (virTestCompareToFile(actual, cmdline) < 0) + if (virTestCompareToFileFull(actual, cmdline, false) < 0) goto cleanup; ret = 0; @@ -189,7 +189,7 @@ mymain(void) basefile = g_strdup_printf("%s/networkxml2firewalldata/base.args", abs_srcdir); - if (virTestLoadFile(basefile, &baseargs) < 0) + if (virFileReadAll(basefile, INT_MAX, &baseargs) < 0) return EXIT_FAILURE; DO_TEST("nat-default"); -- 2.30.2

As with previous commits use virCommandSetDryRun to invoke virCommandToString so that it returns pre-wrapped string. Since virCommand is better aware of where the arguments terminate we can see an improvement where comments are no longer line-wrapped. The changes to the 'commonRules' strings were done with the following regex: s/ -/ \\\\\\n-/ Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- build-aux/syntax-check.mk | 2 +- .../comment-linux.args | 9 +- .../target-linux.args | 81 ++++------ tests/nwfilterxml2firewalltest.c | 148 +++++++++--------- 4 files changed, 105 insertions(+), 135 deletions(-) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index 1c2ea1c98a..bfff8abece 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -1713,7 +1713,7 @@ sc_header-ifdef: $(PYTHON) $(top_srcdir)/scripts/header-ifdef.py sc_test-wrap-argv: - $(AM_V_GEN)$(VC_LIST) | $(GREP) -v -E 'qemuxml2argvdata' \ + $(AM_V_GEN)$(VC_LIST) | $(GREP) -v -E 'qemuxml2argvdata|nwfilterxml2firewalldata' \ |$(GREP) -E '\.(ldargs|args)' | $(RUNUTF8) xargs \ $(PYTHON) $(top_srcdir)/scripts/test-wrap-argv.py --check diff --git a/tests/nwfilterxml2firewalldata/comment-linux.args b/tests/nwfilterxml2firewalldata/comment-linux.args index 6233ccf9f5..c014538f09 100644 --- a/tests/nwfilterxml2firewalldata/comment-linux.args +++ b/tests/nwfilterxml2firewalldata/comment-linux.args @@ -195,8 +195,7 @@ ip6tables \ -m state \ --state ESTABLISHED \ -m comment \ ---comment 'tmp=`mktemp`; echo ${RANDOM} > ${tmp} ; cat < ${tmp}; rm \ --f ${tmp}' \ +--comment 'tmp=`mktemp`; echo ${RANDOM} > ${tmp} ; cat < ${tmp}; rm -f ${tmp}' \ -j RETURN ip6tables \ -w \ @@ -205,8 +204,7 @@ ip6tables \ -m state \ --state NEW,ESTABLISHED \ -m comment \ ---comment 'tmp=`mktemp`; echo ${RANDOM} > ${tmp} ; cat < ${tmp}; rm \ --f ${tmp}' \ +--comment 'tmp=`mktemp`; echo ${RANDOM} > ${tmp} ; cat < ${tmp}; rm -f ${tmp}' \ -j ACCEPT ip6tables \ -w \ @@ -215,6 +213,5 @@ ip6tables \ -m state \ --state ESTABLISHED \ -m comment \ ---comment 'tmp=`mktemp`; echo ${RANDOM} > ${tmp} ; cat < ${tmp}; rm \ --f ${tmp}' \ +--comment 'tmp=`mktemp`; echo ${RANDOM} > ${tmp} ; cat < ${tmp}; rm -f ${tmp}' \ -j RETURN diff --git a/tests/nwfilterxml2firewalldata/target-linux.args b/tests/nwfilterxml2firewalldata/target-linux.args index 5216c709dd..abb01debf9 100644 --- a/tests/nwfilterxml2firewalldata/target-linux.args +++ b/tests/nwfilterxml2firewalldata/target-linux.args @@ -52,8 +52,7 @@ iptables \ -m state \ --state NEW,ESTABLISHED \ -m comment \ ---comment 'accept rule \ --- dir out' \ +--comment 'accept rule -- dir out' \ -j RETURN iptables \ -w \ @@ -65,8 +64,7 @@ iptables \ -m state \ --state ESTABLISHED \ -m comment \ ---comment 'accept rule \ --- dir out' \ +--comment 'accept rule -- dir out' \ -j ACCEPT iptables \ -w \ @@ -80,8 +78,7 @@ iptables \ -m state \ --state NEW,ESTABLISHED \ -m comment \ ---comment 'accept rule \ --- dir out' \ +--comment 'accept rule -- dir out' \ -j RETURN iptables \ -w \ @@ -93,8 +90,7 @@ iptables \ -m dscp \ --dscp 2 \ -m comment \ ---comment 'drop rule \ --- dir out' \ +--comment 'drop rule -- dir out' \ -j DROP iptables \ -w \ @@ -104,8 +100,7 @@ iptables \ -m dscp \ --dscp 2 \ -m comment \ ---comment 'drop rule \ --- dir out' \ +--comment 'drop rule -- dir out' \ -j DROP iptables \ -w \ @@ -117,8 +112,7 @@ iptables \ -m dscp \ --dscp 2 \ -m comment \ ---comment 'drop rule \ --- dir out' \ +--comment 'drop rule -- dir out' \ -j DROP iptables \ -w \ @@ -130,8 +124,7 @@ iptables \ -m dscp \ --dscp 2 \ -m comment \ ---comment 'reject rule \ --- dir out' \ +--comment 'reject rule -- dir out' \ -j REJECT iptables \ -w \ @@ -141,8 +134,7 @@ iptables \ -m dscp \ --dscp 2 \ -m comment \ ---comment 'reject rule \ --- dir out' \ +--comment 'reject rule -- dir out' \ -j REJECT iptables \ -w \ @@ -154,8 +146,7 @@ iptables \ -m dscp \ --dscp 2 \ -m comment \ ---comment 'reject rule \ --- dir out' \ +--comment 'reject rule -- dir out' \ -j REJECT iptables \ -w \ @@ -167,8 +158,7 @@ iptables \ -m state \ --state ESTABLISHED \ -m comment \ ---comment 'accept rule \ --- dir in' \ +--comment 'accept rule -- dir in' \ -j RETURN iptables \ -w \ @@ -182,8 +172,7 @@ iptables \ -m state \ --state NEW,ESTABLISHED \ -m comment \ ---comment 'accept rule \ --- dir in' \ +--comment 'accept rule -- dir in' \ -j ACCEPT iptables \ -w \ @@ -195,8 +184,7 @@ iptables \ -m state \ --state ESTABLISHED \ -m comment \ ---comment 'accept rule \ --- dir in' \ +--comment 'accept rule -- dir in' \ -j RETURN iptables \ -w \ @@ -206,8 +194,7 @@ iptables \ -m dscp \ --dscp 33 \ -m comment \ ---comment 'drop rule \ --- dir in' \ +--comment 'drop rule -- dir in' \ -j DROP iptables \ -w \ @@ -219,8 +206,7 @@ iptables \ -m dscp \ --dscp 33 \ -m comment \ ---comment 'drop rule \ --- dir in' \ +--comment 'drop rule -- dir in' \ -j DROP iptables \ -w \ @@ -230,8 +216,7 @@ iptables \ -m dscp \ --dscp 33 \ -m comment \ ---comment 'drop rule \ --- dir in' \ +--comment 'drop rule -- dir in' \ -j DROP iptables \ -w \ @@ -241,8 +226,7 @@ iptables \ -m dscp \ --dscp 33 \ -m comment \ ---comment 'reject rule \ --- dir in' \ +--comment 'reject rule -- dir in' \ -j REJECT iptables \ -w \ @@ -254,8 +238,7 @@ iptables \ -m dscp \ --dscp 33 \ -m comment \ ---comment 'reject rule \ --- dir in' \ +--comment 'reject rule -- dir in' \ -j REJECT iptables \ -w \ @@ -265,78 +248,68 @@ iptables \ -m dscp \ --dscp 33 \ -m comment \ ---comment 'reject rule \ --- dir in' \ +--comment 'reject rule -- dir in' \ -j REJECT iptables \ -w \ -A FJ-vnet0 \ -p all \ -m comment \ ---comment 'accept rule \ --- dir inout' \ +--comment 'accept rule -- dir inout' \ -j RETURN iptables \ -w \ -A FP-vnet0 \ -p all \ -m comment \ ---comment 'accept rule \ --- dir inout' \ +--comment 'accept rule -- dir inout' \ -j ACCEPT iptables \ -w \ -A HJ-vnet0 \ -p all \ -m comment \ ---comment 'accept rule \ --- dir inout' \ +--comment 'accept rule -- dir inout' \ -j RETURN iptables \ -w \ -A FJ-vnet0 \ -p all \ -m comment \ ---comment 'drop rule \ --- dir inout' \ +--comment 'drop rule -- dir inout' \ -j DROP iptables \ -w \ -A FP-vnet0 \ -p all \ -m comment \ ---comment 'drop rule \ --- dir inout' \ +--comment 'drop rule -- dir inout' \ -j DROP iptables \ -w \ -A HJ-vnet0 \ -p all \ -m comment \ ---comment 'drop rule \ --- dir inout' \ +--comment 'drop rule -- dir inout' \ -j DROP iptables \ -w \ -A FJ-vnet0 \ -p all \ -m comment \ ---comment 'reject rule \ --- dir inout' \ +--comment 'reject rule -- dir inout' \ -j REJECT iptables \ -w \ -A FP-vnet0 \ -p all \ -m comment \ ---comment 'reject rule \ --- dir inout' \ +--comment 'reject rule -- dir inout' \ -j REJECT iptables \ -w \ -A HJ-vnet0 \ -p all \ -m comment \ ---comment 'reject rule \ --- dir inout' \ +--comment 'reject rule -- dir inout' \ -j REJECT diff --git a/tests/nwfilterxml2firewalltest.c b/tests/nwfilterxml2firewalltest.c index 44b2ad04ba..8a7eaf854d 100644 --- a/tests/nwfilterxml2firewalltest.c +++ b/tests/nwfilterxml2firewalltest.c @@ -58,90 +58,90 @@ struct _virNWFilterInst { static const char *commonRules[] = { /* Dropping ebtables rules */ - "ebtables --concurrent -t nat -D PREROUTING -i vnet0 -j libvirt-J-vnet0\n" - "ebtables --concurrent -t nat -D POSTROUTING -o vnet0 -j libvirt-P-vnet0\n" - "ebtables --concurrent -t nat -L libvirt-J-vnet0\n" - "ebtables --concurrent -t nat -L libvirt-P-vnet0\n" - "ebtables --concurrent -t nat -F libvirt-J-vnet0\n" - "ebtables --concurrent -t nat -X libvirt-J-vnet0\n" - "ebtables --concurrent -t nat -F libvirt-P-vnet0\n" - "ebtables --concurrent -t nat -X libvirt-P-vnet0\n", + "ebtables \\\n--concurrent \\\n-t nat \\\n-D PREROUTING \\\n-i vnet0 \\\n-j libvirt-J-vnet0\n" + "ebtables \\\n--concurrent \\\n-t nat \\\n-D POSTROUTING \\\n-o vnet0 \\\n-j libvirt-P-vnet0\n" + "ebtables \\\n--concurrent \\\n-t nat \\\n-L libvirt-J-vnet0\n" + "ebtables \\\n--concurrent \\\n-t nat \\\n-L libvirt-P-vnet0\n" + "ebtables \\\n--concurrent \\\n-t nat \\\n-F libvirt-J-vnet0\n" + "ebtables \\\n--concurrent \\\n-t nat \\\n-X libvirt-J-vnet0\n" + "ebtables \\\n--concurrent \\\n-t nat \\\n-F libvirt-P-vnet0\n" + "ebtables \\\n--concurrent \\\n-t nat \\\n-X libvirt-P-vnet0\n", /* Creating ebtables chains */ - "ebtables --concurrent -t nat -N libvirt-J-vnet0\n" - "ebtables --concurrent -t nat -N libvirt-P-vnet0\n", + "ebtables \\\n--concurrent \\\n-t nat \\\n-N libvirt-J-vnet0\n" + "ebtables \\\n--concurrent \\\n-t nat \\\n-N libvirt-P-vnet0\n", /* Dropping iptables rules */ - "iptables -w -D libvirt-out -m physdev --physdev-is-bridged --physdev-out vnet0 -g FP-vnet0\n" - "iptables -w -D libvirt-out -m physdev --physdev-out vnet0 -g FP-vnet0\n" - "iptables -w -D libvirt-in -m physdev --physdev-in vnet0 -g FJ-vnet0\n" - "iptables -w -D libvirt-host-in -m physdev --physdev-in vnet0 -g HJ-vnet0\n" - "iptables -w -F FP-vnet0\n" - "iptables -w -X FP-vnet0\n" - "iptables -w -F FJ-vnet0\n" - "iptables -w -X FJ-vnet0\n" - "iptables -w -F HJ-vnet0\n" - "iptables -w -X HJ-vnet0\n", + "iptables \\\n-w \\\n-D libvirt-out \\\n-m physdev \\\n--physdev-is-bridged \\\n--physdev-out vnet0 \\\n-g FP-vnet0\n" + "iptables \\\n-w \\\n-D libvirt-out \\\n-m physdev \\\n--physdev-out vnet0 \\\n-g FP-vnet0\n" + "iptables \\\n-w \\\n-D libvirt-in \\\n-m physdev \\\n--physdev-in vnet0 \\\n-g FJ-vnet0\n" + "iptables \\\n-w \\\n-D libvirt-host-in \\\n-m physdev \\\n--physdev-in vnet0 \\\n-g HJ-vnet0\n" + "iptables \\\n-w \\\n-F FP-vnet0\n" + "iptables \\\n-w \\\n-X FP-vnet0\n" + "iptables \\\n-w \\\n-F FJ-vnet0\n" + "iptables \\\n-w \\\n-X FJ-vnet0\n" + "iptables \\\n-w \\\n-F HJ-vnet0\n" + "iptables \\\n-w \\\n-X HJ-vnet0\n", /* Creating iptables chains */ - "iptables -w -N libvirt-in\n" - "iptables -w -N libvirt-out\n" - "iptables -w -N libvirt-in-post\n" - "iptables -w -N libvirt-host-in\n" - "iptables -w -D FORWARD -j libvirt-in\n" - "iptables -w -D FORWARD -j libvirt-out\n" - "iptables -w -D FORWARD -j libvirt-in-post\n" - "iptables -w -D INPUT -j libvirt-host-in\n" - "iptables -w -I FORWARD 1 -j libvirt-in\n" - "iptables -w -I FORWARD 2 -j libvirt-out\n" - "iptables -w -I FORWARD 3 -j libvirt-in-post\n" - "iptables -w -I INPUT 1 -j libvirt-host-in\n" - "iptables -w -N FP-vnet0\n" - "iptables -w -N FJ-vnet0\n" - "iptables -w -N HJ-vnet0\n" - "iptables -w -A libvirt-out -m physdev --physdev-is-bridged --physdev-out vnet0 -g FP-vnet0\n" - "iptables -w -A libvirt-in -m physdev --physdev-in vnet0 -g FJ-vnet0\n" - "iptables -w -A libvirt-host-in -m physdev --physdev-in vnet0 -g HJ-vnet0\n" - "iptables -w -D libvirt-in-post -m physdev --physdev-in vnet0 -j ACCEPT\n" - "iptables -w -A libvirt-in-post -m physdev --physdev-in vnet0 -j ACCEPT\n", + "iptables \\\n-w \\\n-N libvirt-in\n" + "iptables \\\n-w \\\n-N libvirt-out\n" + "iptables \\\n-w \\\n-N libvirt-in-post\n" + "iptables \\\n-w \\\n-N libvirt-host-in\n" + "iptables \\\n-w \\\n-D FORWARD \\\n-j libvirt-in\n" + "iptables \\\n-w \\\n-D FORWARD \\\n-j libvirt-out\n" + "iptables \\\n-w \\\n-D FORWARD \\\n-j libvirt-in-post\n" + "iptables \\\n-w \\\n-D INPUT \\\n-j libvirt-host-in\n" + "iptables \\\n-w \\\n-I FORWARD 1 \\\n-j libvirt-in\n" + "iptables \\\n-w \\\n-I FORWARD 2 \\\n-j libvirt-out\n" + "iptables \\\n-w \\\n-I FORWARD 3 \\\n-j libvirt-in-post\n" + "iptables \\\n-w \\\n-I INPUT 1 \\\n-j libvirt-host-in\n" + "iptables \\\n-w \\\n-N FP-vnet0\n" + "iptables \\\n-w \\\n-N FJ-vnet0\n" + "iptables \\\n-w \\\n-N HJ-vnet0\n" + "iptables \\\n-w \\\n-A libvirt-out \\\n-m physdev \\\n--physdev-is-bridged \\\n--physdev-out vnet0 \\\n-g FP-vnet0\n" + "iptables \\\n-w \\\n-A libvirt-in \\\n-m physdev \\\n--physdev-in vnet0 \\\n-g FJ-vnet0\n" + "iptables \\\n-w \\\n-A libvirt-host-in \\\n-m physdev \\\n--physdev-in vnet0 \\\n-g HJ-vnet0\n" + "iptables \\\n-w \\\n-D libvirt-in-post \\\n-m physdev \\\n--physdev-in vnet0 \\\n-j ACCEPT\n" + "iptables \\\n-w \\\n-A libvirt-in-post \\\n-m physdev \\\n--physdev-in vnet0 \\\n-j ACCEPT\n", /* Dropping ip6tables rules */ - "ip6tables -w -D libvirt-out -m physdev --physdev-is-bridged --physdev-out vnet0 -g FP-vnet0\n" - "ip6tables -w -D libvirt-out -m physdev --physdev-out vnet0 -g FP-vnet0\n" - "ip6tables -w -D libvirt-in -m physdev --physdev-in vnet0 -g FJ-vnet0\n" - "ip6tables -w -D libvirt-host-in -m physdev --physdev-in vnet0 -g HJ-vnet0\n" - "ip6tables -w -F FP-vnet0\n" - "ip6tables -w -X FP-vnet0\n" - "ip6tables -w -F FJ-vnet0\n" - "ip6tables -w -X FJ-vnet0\n" - "ip6tables -w -F HJ-vnet0\n" - "ip6tables -w -X HJ-vnet0\n", + "ip6tables \\\n-w \\\n-D libvirt-out \\\n-m physdev \\\n--physdev-is-bridged \\\n--physdev-out vnet0 \\\n-g FP-vnet0\n" + "ip6tables \\\n-w \\\n-D libvirt-out \\\n-m physdev \\\n--physdev-out vnet0 \\\n-g FP-vnet0\n" + "ip6tables \\\n-w \\\n-D libvirt-in \\\n-m physdev \\\n--physdev-in vnet0 \\\n-g FJ-vnet0\n" + "ip6tables \\\n-w \\\n-D libvirt-host-in \\\n-m physdev \\\n--physdev-in vnet0 \\\n-g HJ-vnet0\n" + "ip6tables \\\n-w \\\n-F FP-vnet0\n" + "ip6tables \\\n-w \\\n-X FP-vnet0\n" + "ip6tables \\\n-w \\\n-F FJ-vnet0\n" + "ip6tables \\\n-w \\\n-X FJ-vnet0\n" + "ip6tables \\\n-w \\\n-F HJ-vnet0\n" + "ip6tables \\\n-w \\\n-X HJ-vnet0\n", /* Creating ip6tables chains */ - "ip6tables -w -N libvirt-in\n" - "ip6tables -w -N libvirt-out\n" - "ip6tables -w -N libvirt-in-post\n" - "ip6tables -w -N libvirt-host-in\n" - "ip6tables -w -D FORWARD -j libvirt-in\n" - "ip6tables -w -D FORWARD -j libvirt-out\n" - "ip6tables -w -D FORWARD -j libvirt-in-post\n" - "ip6tables -w -D INPUT -j libvirt-host-in\n" - "ip6tables -w -I FORWARD 1 -j libvirt-in\n" - "ip6tables -w -I FORWARD 2 -j libvirt-out\n" - "ip6tables -w -I FORWARD 3 -j libvirt-in-post\n" - "ip6tables -w -I INPUT 1 -j libvirt-host-in\n" - "ip6tables -w -N FP-vnet0\n" - "ip6tables -w -N FJ-vnet0\n" - "ip6tables -w -N HJ-vnet0\n" - "ip6tables -w -A libvirt-out -m physdev --physdev-is-bridged --physdev-out vnet0 -g FP-vnet0\n" - "ip6tables -w -A libvirt-in -m physdev --physdev-in vnet0 -g FJ-vnet0\n" - "ip6tables -w -A libvirt-host-in -m physdev --physdev-in vnet0 -g HJ-vnet0\n" - "ip6tables -w -D libvirt-in-post -m physdev --physdev-in vnet0 -j ACCEPT\n" - "ip6tables -w -A libvirt-in-post -m physdev --physdev-in vnet0 -j ACCEPT\n", + "ip6tables \\\n-w \\\n-N libvirt-in\n" + "ip6tables \\\n-w \\\n-N libvirt-out\n" + "ip6tables \\\n-w \\\n-N libvirt-in-post\n" + "ip6tables \\\n-w \\\n-N libvirt-host-in\n" + "ip6tables \\\n-w \\\n-D FORWARD \\\n-j libvirt-in\n" + "ip6tables \\\n-w \\\n-D FORWARD \\\n-j libvirt-out\n" + "ip6tables \\\n-w \\\n-D FORWARD \\\n-j libvirt-in-post\n" + "ip6tables \\\n-w \\\n-D INPUT \\\n-j libvirt-host-in\n" + "ip6tables \\\n-w \\\n-I FORWARD 1 \\\n-j libvirt-in\n" + "ip6tables \\\n-w \\\n-I FORWARD 2 \\\n-j libvirt-out\n" + "ip6tables \\\n-w \\\n-I FORWARD 3 \\\n-j libvirt-in-post\n" + "ip6tables \\\n-w \\\n-I INPUT 1 \\\n-j libvirt-host-in\n" + "ip6tables \\\n-w \\\n-N FP-vnet0\n" + "ip6tables \\\n-w \\\n-N FJ-vnet0\n" + "ip6tables \\\n-w \\\n-N HJ-vnet0\n" + "ip6tables \\\n-w \\\n-A libvirt-out \\\n-m physdev \\\n--physdev-is-bridged \\\n--physdev-out vnet0 \\\n-g FP-vnet0\n" + "ip6tables \\\n-w \\\n-A libvirt-in \\\n-m physdev \\\n--physdev-in vnet0 \\\n-g FJ-vnet0\n" + "ip6tables \\\n-w \\\n-A libvirt-host-in \\\n-m physdev \\\n--physdev-in vnet0 \\\n-g HJ-vnet0\n" + "ip6tables \\\n-w \\\n-D libvirt-in-post \\\n-m physdev \\\n--physdev-in vnet0 \\\n-j ACCEPT\n" + "ip6tables \\\n-w \\\n-A libvirt-in-post \\\n-m physdev \\\n--physdev-in vnet0 \\\n-j ACCEPT\n", /* Inserting ebtables rules */ - "ebtables --concurrent -t nat -A PREROUTING -i vnet0 -j libvirt-J-vnet0\n" - "ebtables --concurrent -t nat -A POSTROUTING -o vnet0 -j libvirt-P-vnet0\n", + "ebtables \\\n--concurrent \\\n-t nat \\\n-A PREROUTING \\\n-i vnet0 \\\n-j libvirt-J-vnet0\n" + "ebtables \\\n--concurrent \\\n-t nat \\\n-A POSTROUTING \\\n-o vnet0 \\\n-j libvirt-P-vnet0\n", }; @@ -375,7 +375,7 @@ static int testCompareXMLToArgvFiles(const char *xml, memset(&inst, 0, sizeof(inst)); - virCommandSetDryRun(dryRunToken, &buf, false, true, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, true, true, NULL, NULL); if (!vars) goto cleanup; @@ -395,7 +395,7 @@ static int testCompareXMLToArgvFiles(const char *xml, testRemoveCommonRules(actualargv); - if (virTestCompareToFile(actualargv, cmdline) < 0) + if (virTestCompareToFileFull(actualargv, cmdline, false) < 0) goto cleanup; ret = 0; -- 2.30.2

virCommandToString has the possibility to return an already wrapped string with better format than what we get from the test wrapper script. The main advantage is that arguments for an option are always on the same line which makes it more easy to see what changed in a diff and prevents re-wrapping of the line if a wrapping point moves over the threshold. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- build-aux/syntax-check.mk | 2 +- .../bhyvexml2argv-acpiapic.args | 3 ++- .../bhyvexml2argv-acpiapic.ldargs | 3 ++- ...xml2argv-addr-isa-controller-on-slot-1.args | 3 ++- ...l2argv-addr-isa-controller-on-slot-1.ldargs | 3 ++- ...ml2argv-addr-isa-controller-on-slot-31.args | 3 ++- ...2argv-addr-isa-controller-on-slot-31.ldargs | 3 ++- ...exml2argv-addr-more-than-32-sata-disks.args | 18 ++++-------------- ...ml2argv-addr-more-than-32-sata-disks.ldargs | 3 ++- ...bhyvexml2argv-addr-multiple-sata-disks.args | 3 ++- ...yvexml2argv-addr-multiple-sata-disks.ldargs | 3 ++- ...yvexml2argv-addr-multiple-virtio-disks.args | 3 ++- ...exml2argv-addr-multiple-virtio-disks.ldargs | 3 ++- ...argv-addr-no32devs-multiple-sata-disks.args | 3 ++- ...gv-addr-no32devs-multiple-sata-disks.ldargs | 3 ++- ...ml2argv-addr-no32devs-single-sata-disk.args | 3 ++- ...2argv-addr-no32devs-single-sata-disk.ldargs | 3 ++- ...argv-addr-non-isa-controller-on-slot-1.args | 3 ++- .../bhyvexml2argv-addr-single-sata-disk.args | 3 ++- .../bhyvexml2argv-addr-single-sata-disk.ldargs | 3 ++- .../bhyvexml2argv-addr-single-virtio-disk.args | 3 ++- ...hyvexml2argv-addr-single-virtio-disk.ldargs | 3 ++- .../bhyvexml2argvdata/bhyvexml2argv-base.args | 3 ++- .../bhyvexml2argv-base.ldargs | 3 ++- .../bhyvexml2argv-bhyveload-bootorder.args | 3 ++- .../bhyvexml2argv-bhyveload-bootorder.ldargs | 3 ++- .../bhyvexml2argv-bhyveload-bootorder1.args | 3 ++- .../bhyvexml2argv-bhyveload-bootorder1.ldargs | 3 ++- .../bhyvexml2argv-bhyveload-bootorder3.args | 3 ++- .../bhyvexml2argv-bhyveload-bootorder3.ldargs | 3 ++- .../bhyvexml2argv-bhyveload-explicitargs.args | 3 ++- .../bhyvexml2argv-commandline.args | 5 ++++- .../bhyvexml2argv-commandline.ldargs | 3 ++- ...rgv-console-master-slave-not-specified.args | 3 ++- ...v-console-master-slave-not-specified.ldargs | 3 ++- .../bhyvexml2argv-console.args | 3 ++- .../bhyvexml2argv-console.ldargs | 3 ++- .../bhyvexml2argv-cputopology.args | 3 ++- .../bhyvexml2argv-cputopology.ldargs | 3 ++- .../bhyvexml2argv-custom-loader.args | 3 ++- .../bhyvexml2argv-disk-cdrom-grub.args | 3 ++- .../bhyvexml2argv-disk-cdrom-grub.ldargs | 3 ++- .../bhyvexml2argv-disk-cdrom.args | 3 ++- .../bhyvexml2argv-disk-cdrom.ldargs | 3 ++- .../bhyvexml2argv-disk-virtio.args | 3 ++- .../bhyvexml2argv-disk-virtio.ldargs | 3 ++- .../bhyvexml2argv-firmware-efi.args | 3 ++- .../bhyvexml2argv-fs-9p-readonly.args | 3 ++- .../bhyvexml2argv-fs-9p-readonly.ldargs | 3 ++- .../bhyvexml2argvdata/bhyvexml2argv-fs-9p.args | 3 ++- .../bhyvexml2argv-fs-9p.ldargs | 3 ++- .../bhyvexml2argv-grub-bootorder.args | 3 ++- .../bhyvexml2argv-grub-bootorder.ldargs | 3 ++- .../bhyvexml2argv-grub-bootorder2.args | 3 ++- .../bhyvexml2argv-grub-bootorder2.ldargs | 3 ++- .../bhyvexml2argv-grub-defaults.args | 3 ++- .../bhyvexml2argv-grub-defaults.ldargs | 3 ++- .../bhyvexml2argv-input-xhci-tablet.args | 3 ++- .../bhyvexml2argv-input-xhci-tablet.ldargs | 3 ++- .../bhyvexml2argv-isa-controller.args | 3 ++- .../bhyvexml2argv-isa-controller.ldargs | 3 ++- .../bhyvexml2argv-localtime.args | 3 ++- .../bhyvexml2argv-localtime.ldargs | 3 ++- .../bhyvexml2argv-macaddr.args | 3 ++- .../bhyvexml2argv-macaddr.ldargs | 3 ++- .../bhyvexml2argvdata/bhyvexml2argv-msrs.args | 3 ++- .../bhyvexml2argv-msrs.ldargs | 3 ++- .../bhyvexml2argv-net-e1000.args | 3 ++- .../bhyvexml2argv-net-e1000.ldargs | 3 ++- .../bhyvexml2argv-serial-grub-nocons.args | 3 ++- .../bhyvexml2argv-serial-grub-nocons.ldargs | 3 ++- .../bhyvexml2argv-serial-grub.args | 3 ++- .../bhyvexml2argv-serial-grub.ldargs | 3 ++- .../bhyvexml2argv-serial.args | 3 ++- .../bhyvexml2argv-serial.ldargs | 3 ++- .../bhyvexml2argvdata/bhyvexml2argv-sound.args | 3 ++- .../bhyvexml2argv-sound.ldargs | 3 ++- .../bhyvexml2argvdata/bhyvexml2argv-uefi.args | 3 ++- .../bhyvexml2argv-vnc-autoport.args | 3 ++- .../bhyvexml2argv-vnc-password.args | 3 ++- .../bhyvexml2argv-vnc-resolution.args | 3 ++- .../bhyvexml2argv-vnc-vgaconf-io.args | 3 ++- .../bhyvexml2argv-vnc-vgaconf-off.args | 3 ++- .../bhyvexml2argv-vnc-vgaconf-on.args | 3 ++- tests/bhyvexml2argvdata/bhyvexml2argv-vnc.args | 3 ++- .../bhyvexml2argvdata/bhyvexml2argv-wired.args | 3 ++- .../bhyvexml2argv-wired.ldargs | 3 ++- tests/bhyvexml2argvtest.c | 8 ++++---- 88 files changed, 181 insertions(+), 104 deletions(-) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index bfff8abece..d6eb26c5ec 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -1713,7 +1713,7 @@ sc_header-ifdef: $(PYTHON) $(top_srcdir)/scripts/header-ifdef.py sc_test-wrap-argv: - $(AM_V_GEN)$(VC_LIST) | $(GREP) -v -E 'qemuxml2argvdata|nwfilterxml2firewalldata' \ + $(AM_V_GEN)$(VC_LIST) | $(GREP) -v -E 'qemuxml2argvdata|nwfilterxml2firewalldata|bhyvexml2argvdata' \ |$(GREP) -E '\.(ldargs|args)' | $(RUNUTF8) xargs \ $(PYTHON) $(top_srcdir)/scripts/test-wrap-argv.py --check diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.args b/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.args index e71ceec84f..001e44147e 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.args @@ -8,4 +8,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:81:c4:b1 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:81:c4:b1 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.args index 910d1bbcfa..498455275a 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.args @@ -7,4 +7,5 @@ -s 0:0,hostbridge \ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.args index ee833eb460..70c44932c8 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.args @@ -7,4 +7,5 @@ -s 0:0,hostbridge \ -s 31:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.args index d7917bd8f3..bd987c86aa 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.args @@ -5,17 +5,7 @@ -H \ -P \ -s 0:0,hostbridge \ --s 2:0,ahci,hd:/tmp/freebsd1.img,hd:/tmp/freebsd2.img,hd:/tmp/freebsd3.img,\ -hd:/tmp/freebsd4.img,hd:/tmp/freebsd5.img,hd:/tmp/freebsd6.img,\ -hd:/tmp/freebsd7.img,hd:/tmp/freebsd8.img,hd:/tmp/freebsd9.img,\ -hd:/tmp/freebsd10.img,hd:/tmp/freebsd11.img,hd:/tmp/freebsd12.img,\ -hd:/tmp/freebsd12.img,hd:/tmp/freebsd13.img,hd:/tmp/freebsd14.img,\ -hd:/tmp/freebsd15.img,hd:/tmp/freebsd16.img,hd:/tmp/freebsd17.img,\ -hd:/tmp/freebsd18.img,hd:/tmp/freebsd19.img,hd:/tmp/freebsd20.img,\ -hd:/tmp/freebsd21.img,hd:/tmp/freebsd22.img,hd:/tmp/freebsd23.img,\ -hd:/tmp/freebsd24.img,hd:/tmp/freebsd25.img,hd:/tmp/freebsd26.img,\ -hd:/tmp/freebsd27.img,hd:/tmp/freebsd28.img,hd:/tmp/freebsd29.img,\ -hd:/tmp/freebsd30.img \ --s 3:0,ahci,hd:/tmp/freebsd31.img,hd:/tmp/freebsd32.img,hd:/tmp/freebsd33.img,\ -hd:/tmp/freebsd34.img,hd:/tmp/freebsd35.img \ --s 4:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 2:0,ahci,hd:/tmp/freebsd1.img,hd:/tmp/freebsd2.img,hd:/tmp/freebsd3.img,hd:/tmp/freebsd4.img,hd:/tmp/freebsd5.img,hd:/tmp/freebsd6.img,hd:/tmp/freebsd7.img,hd:/tmp/freebsd8.img,hd:/tmp/freebsd9.img,hd:/tmp/freebsd10.img,hd:/tmp/freebsd11.img,hd:/tmp/freebsd12.img,hd:/tmp/freebsd12.img,hd:/tmp/freebsd13.img,hd:/tmp/freebsd14.img,hd:/tmp/freebsd15.img,hd:/tmp/freebsd16.img,hd:/tmp/freebsd17.img,hd:/tmp/freebsd18.img,hd:/tmp/freebsd19.img,hd:/tmp/freebsd20.img,hd:/tmp/freebsd21.img,hd:/tmp/freebsd22.img,hd:/tmp/freebsd23.img,hd:/tmp/freebsd24.img,hd:/tmp/freebsd25.img,hd:/tmp/freebsd26.img,hd:/tmp/freebsd27.img,hd:/tmp/freebsd28.img,hd:/tmp/freebsd29.img,hd:/tmp/freebsd30.img \ +-s 3:0,ahci,hd:/tmp/freebsd31.img,hd:/tmp/freebsd32.img,hd:/tmp/freebsd33.img,hd:/tmp/freebsd34.img,hd:/tmp/freebsd35.img \ +-s 4:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.ldargs index 70b2224f26..ec3f482ca8 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd1.img bhyve +-d /tmp/freebsd1.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.args index 5665842b84..0bd1957e96 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd1.img,hd:/tmp/freebsd2.img,hd:/tmp/freebsd2.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.ldargs index 70b2224f26..ec3f482ca8 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd1.img bhyve +-d /tmp/freebsd1.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.args index 8cc1668949..73b1e2ad57 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.args @@ -8,4 +8,5 @@ -s 3:0,virtio-net,faketapdev,mac=52:54:00:bc:85:fe \ -s 2:0,virtio-blk,/tmp/freebsd.img \ -s 4:0,virtio-blk,/tmp/test.img \ --s 5:0,virtio-blk,/tmp/test2.img bhyve +-s 5:0,virtio-blk,/tmp/test2.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.args index 03bf381ffb..821cc58287 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.args @@ -8,4 +8,5 @@ -s 2:0,ahci-hd,/tmp/freebsd1.img \ -s 3:0,ahci-hd,/tmp/freebsd2.img \ -s 4:0,ahci-hd,/tmp/freebsd2.img \ --s 5:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 5:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.ldargs index 70b2224f26..ec3f482ca8 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd1.img bhyve +-d /tmp/freebsd1.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.args index d519241359..9923c4cd85 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci-hd,/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-non-isa-controller-on-slot-1.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-non-isa-controller-on-slot-1.args index cbbf768d71..12859f7d56 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-non-isa-controller-on-slot-1.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-non-isa-controller-on-slot-1.args @@ -8,4 +8,5 @@ -l bootrom,/path/to/test.fd \ -s 2:0,lpc \ -s 3:0,ahci,hd:/tmp/freebsd.img \ --s 1:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 1:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.args index 547485ba5d..edcb45a0ae 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.args index 4dcc40404b..3ee9614733 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:bc:85:fe \ --s 2:0,virtio-blk,/tmp/freebsd.img bhyve +-s 2:0,virtio-blk,/tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-base.args b/tests/bhyvexml2argvdata/bhyvexml2argv-base.args index 547485ba5d..edcb45a0ae 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-base.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-base.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-base.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-base.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-base.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-base.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.args b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.args index 4d7c7c92a8..f790f746a9 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img,cd:/tmp/cdrom.iso \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:8d:10:e1 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:8d:10:e1 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.ldargs index 24e0bc2bd9..b31d65cd06 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/cdrom.iso bhyve +-d /tmp/cdrom.iso \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.args b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.args index 8ec9799ccd..e621edbf0e 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img,cd:/tmp/cdrom.iso \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:92:68:0e bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:92:68:0e \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.args b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.args index f1c0bf3987..eedc36d35e 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img,cd:/tmp/cdrom.iso \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:7a:f5:a4 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:7a:f5:a4 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.ldargs index 24e0bc2bd9..b31d65cd06 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/cdrom.iso bhyve +-d /tmp/cdrom.iso \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.args b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.args index 17a1c83809..1c5aa009e8 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:11:bd:26 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:11:bd:26 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.args b/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.args index cb21b99cd6..153639c370 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.args @@ -6,4 +6,7 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 ARGUMENT1 ARGUMENT2 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +ARGUMENT1 \ +ARGUMENT2 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.args b/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.args index b24918e7eb..4d7cb11999 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.args @@ -8,4 +8,5 @@ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:b1:42:eb \ --l com1,/dev/nmdmdf3be7e7-a104-11e3-aeb0-50e5492bd3dcA bhyve +-l com1,/dev/nmdmdf3be7e7-a104-11e3-aeb0-50e5492bd3dcA \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-console.args b/tests/bhyvexml2argvdata/bhyvexml2argv-console.args index 25fbd4727e..8c6cb78c9f 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-console.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-console.args @@ -8,4 +8,5 @@ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:b1:42:eb \ --l com1,/dev/nmdm0A bhyve +-l com1,/dev/nmdm0A \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-console.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-console.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-console.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-console.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.args b/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.args index 2d175a4178..2c88b650b5 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.args b/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.args index f6bfc78374..aca701c3bf 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:35:99:c2 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:35:99:c2 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.args b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.args index 72f1d3538c..8f336d7ef2 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,cd:/tmp/cdrom.iso \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:6f:6a:53 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:6f:6a:53 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.ldargs index bcf901ef09..85990fc60b 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.ldargs @@ -1,4 +1,5 @@ /usr/local/sbin/grub-bhyve \ --root cd \ --device-map '<device.map>' \ ---memory 214 bhyve +--memory 214 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.args b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.args index 3e61b8fc8a..fd36515efc 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,cd:/tmp/cdrom.iso \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:e3:ec:9b bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:e3:ec:9b \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.ldargs index 24e0bc2bd9..b31d65cd06 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/cdrom.iso bhyve +-d /tmp/cdrom.iso \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.args b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.args index 4dcc40404b..3ee9614733 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:bc:85:fe \ --s 2:0,virtio-blk,/tmp/freebsd.img bhyve +-s 2:0,virtio-blk,/tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-firmware-efi.args b/tests/bhyvexml2argvdata/bhyvexml2argv-firmware-efi.args index 2f5aa4d783..b343469d19 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-firmware-efi.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-firmware-efi.args @@ -8,4 +8,5 @@ -l bootrom,fakefirmwaredir/BHYVE_UEFI.fd \ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.args b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.args index bfcd88e366..de986b4eb6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.args @@ -7,4 +7,5 @@ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ --s 4:0,virtio-9p,shared_dir=/shared/dir,ro bhyve +-s 4:0,virtio-9p,shared_dir=/shared/dir,ro \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.args b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.args index e890f7400b..8943ae211f 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.args @@ -7,4 +7,5 @@ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ --s 4:0,virtio-9p,shared_dir=/shared/dir bhyve +-s 4:0,virtio-9p,shared_dir=/shared/dir \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.args b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.args index e64e67b39d..1c400e1a7c 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd1.img,hd:/tmp/freebsd2.img,hd:/tmp/freebsd3.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:f4:6c:be bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:f4:6c:be \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.ldargs index 7d9a5155a1..9a50cf6537 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.ldargs @@ -1,4 +1,5 @@ /usr/local/sbin/grub-bhyve \ --root hd0,msdos1 \ --device-map '<device.map>' \ ---memory 214 bhyve +--memory 214 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.args b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.args index 872a69df3b..a09338d004 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd1.img,hd:/tmp/freebsd2.img,hd:/tmp/freebsd3.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:0e:d2:6f bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:0e:d2:6f \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.ldargs index 7d9a5155a1..9a50cf6537 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.ldargs @@ -1,4 +1,5 @@ /usr/local/sbin/grub-bhyve \ --root hd0,msdos1 \ --device-map '<device.map>' \ ---memory 214 bhyve +--memory 214 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.args b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.args index 3ba5c11608..91c06e3e3a 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:ee:f5:79 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:ee:f5:79 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.ldargs index 7d9a5155a1..9a50cf6537 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.ldargs @@ -1,4 +1,5 @@ /usr/local/sbin/grub-bhyve \ --root hd0,msdos1 \ --device-map '<device.map>' \ ---memory 214 bhyve +--memory 214 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.args b/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.args index b1c0c94d03..dfe1334edd 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,xhci,tablet \ --s 3:0,ahci-hd,/tmp/freebsd.img bhyve +-s 3:0,ahci-hd,/tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.args b/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.args index 910d1bbcfa..498455275a 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.args @@ -7,4 +7,5 @@ -s 0:0,hostbridge \ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.args b/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.args index 307d888c1f..e4f66080b9 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.args @@ -5,4 +5,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:82:ca:a3 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:82:ca:a3 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.args b/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.args index 5e13a9742d..c17f216cb6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:22:ee:11 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:22:ee:11 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.args b/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.args index dbe377421b..4b0e28ba41 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.args @@ -7,4 +7,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.args b/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.args index 09e30db46e..f6f45bdf43 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,e1000,faketapdev,mac=52:54:00:00:00:00 bhyve +-s 3:0,e1000,faketapdev,mac=52:54:00:00:00:00 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.args b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.args index 02846cb893..050452cfa2 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.args @@ -8,4 +8,5 @@ -s 1:0,lpc \ -s 2:0,ahci-hd,/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:a7:cd:5b \ --l com1,/dev/nmdm0A bhyve +-l com1,/dev/nmdm0A \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.ldargs index 7d9a5155a1..9a50cf6537 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.ldargs @@ -1,4 +1,5 @@ /usr/local/sbin/grub-bhyve \ --root hd0,msdos1 \ --device-map '<device.map>' \ ---memory 214 bhyve +--memory 214 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.args b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.args index e4712b448c..f51fa0834c 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.args @@ -8,4 +8,5 @@ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:f0:72:11 \ --l com1,/dev/nmdm0A bhyve +-l com1,/dev/nmdm0A \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.ldargs index 1ee7fd4cdf..10f8d92e6c 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.ldargs @@ -2,4 +2,5 @@ --root hd0,msdos1 \ --device-map '<device.map>' \ --memory 214 \ ---cons-dev /dev/nmdm0A bhyve +--cons-dev /dev/nmdm0A \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial.args b/tests/bhyvexml2argvdata/bhyvexml2argv-serial.args index f45a190137..df12646a88 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-serial.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial.args @@ -8,4 +8,5 @@ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:4f:f3:5b \ --l com1,/dev/nmdm0A bhyve +-l com1,/dev/nmdm0A \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-serial.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-serial.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-sound.args b/tests/bhyvexml2argvdata/bhyvexml2argv-sound.args index 05ff4965dd..8a99690ae5 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-sound.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-sound.args @@ -7,4 +7,5 @@ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ --s 4:0,hda,play=/dev/dsp0,rec=/dev/dsp0 bhyve +-s 4:0,hda,play=/dev/dsp0,rec=/dev/dsp0 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-sound.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-sound.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-sound.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-sound.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-uefi.args b/tests/bhyvexml2argvdata/bhyvexml2argv-uefi.args index 937b066e8c..22a21065db 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-uefi.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-uefi.args @@ -8,4 +8,5 @@ -l bootrom,/path/to/test.fd \ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-autoport.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-autoport.args index 551469dabe..8b692c1877 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-autoport.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-autoport.args @@ -9,4 +9,5 @@ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \ --s 4:0,fbuf,tcp=127.0.0.1:5900 bhyve +-s 4:0,fbuf,tcp=127.0.0.1:5900 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password.args index b3b1c244be..682b03b2e0 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password.args @@ -9,4 +9,5 @@ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \ --s 4:0,fbuf,tcp=127.0.0.1:5904,password=s3cr3t bhyve +-s 4:0,fbuf,tcp=127.0.0.1:5904,password=s3cr3t \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.args index 5e54da6ed7..4b4d62a68c 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.args @@ -7,4 +7,5 @@ -s 0:0,hostbridge \ -l bootrom,/path/to/test.fd \ -s 1:0,lpc \ --s 2:0,fbuf,tcp=127.0.0.1:5904,w=1920,h=1080 bhyve +-s 2:0,fbuf,tcp=127.0.0.1:5904,w=1920,h=1080 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.args index 47022e84cf..960b2dfe5e 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.args @@ -9,4 +9,5 @@ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \ --s 4:0,fbuf,tcp=127.0.0.1:5904,vga=io bhyve +-s 4:0,fbuf,tcp=127.0.0.1:5904,vga=io \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.args index 923098f3db..0639161ad0 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.args @@ -9,4 +9,5 @@ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \ --s 4:0,fbuf,tcp=127.0.0.1:5904,vga=off bhyve +-s 4:0,fbuf,tcp=127.0.0.1:5904,vga=off \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.args index 9225f5d133..caa9b0e9a6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.args @@ -9,4 +9,5 @@ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \ --s 4:0,fbuf,tcp=127.0.0.1:5904,vga=on bhyve +-s 4:0,fbuf,tcp=127.0.0.1:5904,vga=on \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc.args index cd7a543265..0301aa666e 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc.args @@ -9,4 +9,5 @@ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \ --s 4:0,fbuf,tcp=127.0.0.1:5904 bhyve +-s 4:0,fbuf,tcp=127.0.0.1:5904 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-wired.args b/tests/bhyvexml2argvdata/bhyvexml2argv-wired.args index 13d4f49095..f2c415ece5 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-wired.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-wired.args @@ -7,4 +7,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-wired.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-wired.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-wired.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-wired.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c index 34e40a6438..c4fe4ef17a 100644 --- a/tests/bhyvexml2argvtest.c +++ b/tests/bhyvexml2argvtest.c @@ -86,19 +86,19 @@ static int testCompareXMLToArgvFiles(const char *xml, goto out; } - if (!(actualargv = virCommandToString(cmd, false))) + if (!(actualargv = virCommandToString(cmd, true))) goto out; if (actualdm != NULL) virTrimSpaces(actualdm, NULL); - if (!(actualld = virCommandToString(ldcmd, false))) + if (!(actualld = virCommandToString(ldcmd, true))) goto out; - if (virTestCompareToFile(actualargv, cmdline) < 0) + if (virTestCompareToFileFull(actualargv, cmdline, false) < 0) goto out; - if (virTestCompareToFile(actualld, ldcmdline) < 0) + if (virTestCompareToFileFull(actualld, ldcmdline, false) < 0) goto out; if (virFileExists(dmcmdline) || actualdm) { -- 2.30.2

On Fri, Apr 09, 2021 at 02:50:25PM +0200, Peter Krempa wrote:
virCommandToString has the possibility to return an already wrapped string with better format than what we get from the test wrapper script.
The main advantage is that arguments for an option are always on the same line which makes it more easy to see what changed in a diff and prevents re-wrapping of the line if a wrapping point moves over the threshold.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- build-aux/syntax-check.mk | 2 +- .../bhyvexml2argv-acpiapic.args | 3 ++- .../bhyvexml2argv-acpiapic.ldargs | 3 ++- ...xml2argv-addr-isa-controller-on-slot-1.args | 3 ++- ...l2argv-addr-isa-controller-on-slot-1.ldargs | 3 ++- ...ml2argv-addr-isa-controller-on-slot-31.args | 3 ++- ...2argv-addr-isa-controller-on-slot-31.ldargs | 3 ++- ...exml2argv-addr-more-than-32-sata-disks.args | 18 ++++-------------- ...ml2argv-addr-more-than-32-sata-disks.ldargs | 3 ++- ...bhyvexml2argv-addr-multiple-sata-disks.args | 3 ++- ...yvexml2argv-addr-multiple-sata-disks.ldargs | 3 ++- ...yvexml2argv-addr-multiple-virtio-disks.args | 3 ++- ...exml2argv-addr-multiple-virtio-disks.ldargs | 3 ++- ...argv-addr-no32devs-multiple-sata-disks.args | 3 ++- ...gv-addr-no32devs-multiple-sata-disks.ldargs | 3 ++- ...ml2argv-addr-no32devs-single-sata-disk.args | 3 ++- ...2argv-addr-no32devs-single-sata-disk.ldargs | 3 ++- ...argv-addr-non-isa-controller-on-slot-1.args | 3 ++- .../bhyvexml2argv-addr-single-sata-disk.args | 3 ++- .../bhyvexml2argv-addr-single-sata-disk.ldargs | 3 ++- .../bhyvexml2argv-addr-single-virtio-disk.args | 3 ++- ...hyvexml2argv-addr-single-virtio-disk.ldargs | 3 ++- .../bhyvexml2argvdata/bhyvexml2argv-base.args | 3 ++- .../bhyvexml2argv-base.ldargs | 3 ++- .../bhyvexml2argv-bhyveload-bootorder.args | 3 ++- .../bhyvexml2argv-bhyveload-bootorder.ldargs | 3 ++- .../bhyvexml2argv-bhyveload-bootorder1.args | 3 ++- .../bhyvexml2argv-bhyveload-bootorder1.ldargs | 3 ++- .../bhyvexml2argv-bhyveload-bootorder3.args | 3 ++- .../bhyvexml2argv-bhyveload-bootorder3.ldargs | 3 ++- .../bhyvexml2argv-bhyveload-explicitargs.args | 3 ++- .../bhyvexml2argv-commandline.args | 5 ++++- .../bhyvexml2argv-commandline.ldargs | 3 ++- ...rgv-console-master-slave-not-specified.args | 3 ++- ...v-console-master-slave-not-specified.ldargs | 3 ++- .../bhyvexml2argv-console.args | 3 ++- .../bhyvexml2argv-console.ldargs | 3 ++- .../bhyvexml2argv-cputopology.args | 3 ++- .../bhyvexml2argv-cputopology.ldargs | 3 ++- .../bhyvexml2argv-custom-loader.args | 3 ++- .../bhyvexml2argv-disk-cdrom-grub.args | 3 ++- .../bhyvexml2argv-disk-cdrom-grub.ldargs | 3 ++- .../bhyvexml2argv-disk-cdrom.args | 3 ++- .../bhyvexml2argv-disk-cdrom.ldargs | 3 ++- .../bhyvexml2argv-disk-virtio.args | 3 ++- .../bhyvexml2argv-disk-virtio.ldargs | 3 ++- .../bhyvexml2argv-firmware-efi.args | 3 ++- .../bhyvexml2argv-fs-9p-readonly.args | 3 ++- .../bhyvexml2argv-fs-9p-readonly.ldargs | 3 ++- .../bhyvexml2argvdata/bhyvexml2argv-fs-9p.args | 3 ++- .../bhyvexml2argv-fs-9p.ldargs | 3 ++- .../bhyvexml2argv-grub-bootorder.args | 3 ++- .../bhyvexml2argv-grub-bootorder.ldargs | 3 ++- .../bhyvexml2argv-grub-bootorder2.args | 3 ++- .../bhyvexml2argv-grub-bootorder2.ldargs | 3 ++- .../bhyvexml2argv-grub-defaults.args | 3 ++- .../bhyvexml2argv-grub-defaults.ldargs | 3 ++- .../bhyvexml2argv-input-xhci-tablet.args | 3 ++- .../bhyvexml2argv-input-xhci-tablet.ldargs | 3 ++- .../bhyvexml2argv-isa-controller.args | 3 ++- .../bhyvexml2argv-isa-controller.ldargs | 3 ++- .../bhyvexml2argv-localtime.args | 3 ++- .../bhyvexml2argv-localtime.ldargs | 3 ++- .../bhyvexml2argv-macaddr.args | 3 ++- .../bhyvexml2argv-macaddr.ldargs | 3 ++- .../bhyvexml2argvdata/bhyvexml2argv-msrs.args | 3 ++- .../bhyvexml2argv-msrs.ldargs | 3 ++- .../bhyvexml2argv-net-e1000.args | 3 ++- .../bhyvexml2argv-net-e1000.ldargs | 3 ++- .../bhyvexml2argv-serial-grub-nocons.args | 3 ++- .../bhyvexml2argv-serial-grub-nocons.ldargs | 3 ++- .../bhyvexml2argv-serial-grub.args | 3 ++- .../bhyvexml2argv-serial-grub.ldargs | 3 ++- .../bhyvexml2argv-serial.args | 3 ++- .../bhyvexml2argv-serial.ldargs | 3 ++- .../bhyvexml2argvdata/bhyvexml2argv-sound.args | 3 ++- .../bhyvexml2argv-sound.ldargs | 3 ++- .../bhyvexml2argvdata/bhyvexml2argv-uefi.args | 3 ++- .../bhyvexml2argv-vnc-autoport.args | 3 ++- .../bhyvexml2argv-vnc-password.args | 3 ++- .../bhyvexml2argv-vnc-resolution.args | 3 ++- .../bhyvexml2argv-vnc-vgaconf-io.args | 3 ++- .../bhyvexml2argv-vnc-vgaconf-off.args | 3 ++- .../bhyvexml2argv-vnc-vgaconf-on.args | 3 ++- tests/bhyvexml2argvdata/bhyvexml2argv-vnc.args | 3 ++- .../bhyvexml2argvdata/bhyvexml2argv-wired.args | 3 ++- .../bhyvexml2argv-wired.ldargs | 3 ++- tests/bhyvexml2argvtest.c | 8 ++++---- 88 files changed, 181 insertions(+), 104 deletions(-)
diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index bfff8abece..d6eb26c5ec 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -1713,7 +1713,7 @@ sc_header-ifdef: $(PYTHON) $(top_srcdir)/scripts/header-ifdef.py
sc_test-wrap-argv: - $(AM_V_GEN)$(VC_LIST) | $(GREP) -v -E 'qemuxml2argvdata|nwfilterxml2firewalldata' \ + $(AM_V_GEN)$(VC_LIST) | $(GREP) -v -E 'qemuxml2argvdata|nwfilterxml2firewalldata|bhyvexml2argvdata' \ |$(GREP) -E '\.(ldargs|args)' | $(RUNUTF8) xargs \ $(PYTHON) $(top_srcdir)/scripts/test-wrap-argv.py --check
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.args b/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.args index e71ceec84f..001e44147e 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.args @@ -8,4 +8,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:81:c4:b1 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:81:c4:b1 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.args index 910d1bbcfa..498455275a 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.args @@ -7,4 +7,5 @@ -s 0:0,hostbridge \ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.args index ee833eb460..70c44932c8 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.args @@ -7,4 +7,5 @@ -s 0:0,hostbridge \ -s 31:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.args index d7917bd8f3..bd987c86aa 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.args @@ -5,17 +5,7 @@ -H \ -P \ -s 0:0,hostbridge \ --s 2:0,ahci,hd:/tmp/freebsd1.img,hd:/tmp/freebsd2.img,hd:/tmp/freebsd3.img,\ -hd:/tmp/freebsd4.img,hd:/tmp/freebsd5.img,hd:/tmp/freebsd6.img,\ -hd:/tmp/freebsd7.img,hd:/tmp/freebsd8.img,hd:/tmp/freebsd9.img,\ -hd:/tmp/freebsd10.img,hd:/tmp/freebsd11.img,hd:/tmp/freebsd12.img,\ -hd:/tmp/freebsd12.img,hd:/tmp/freebsd13.img,hd:/tmp/freebsd14.img,\ -hd:/tmp/freebsd15.img,hd:/tmp/freebsd16.img,hd:/tmp/freebsd17.img,\ -hd:/tmp/freebsd18.img,hd:/tmp/freebsd19.img,hd:/tmp/freebsd20.img,\ -hd:/tmp/freebsd21.img,hd:/tmp/freebsd22.img,hd:/tmp/freebsd23.img,\ -hd:/tmp/freebsd24.img,hd:/tmp/freebsd25.img,hd:/tmp/freebsd26.img,\ -hd:/tmp/freebsd27.img,hd:/tmp/freebsd28.img,hd:/tmp/freebsd29.img,\ -hd:/tmp/freebsd30.img \ --s 3:0,ahci,hd:/tmp/freebsd31.img,hd:/tmp/freebsd32.img,hd:/tmp/freebsd33.img,\ -hd:/tmp/freebsd34.img,hd:/tmp/freebsd35.img \ --s 4:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 2:0,ahci,hd:/tmp/freebsd1.img,hd:/tmp/freebsd2.img,hd:/tmp/freebsd3.img,hd:/tmp/freebsd4.img,hd:/tmp/freebsd5.img,hd:/tmp/freebsd6.img,hd:/tmp/freebsd7.img,hd:/tmp/freebsd8.img,hd:/tmp/freebsd9.img,hd:/tmp/freebsd10.img,hd:/tmp/freebsd11.img,hd:/tmp/freebsd12.img,hd:/tmp/freebsd12.img,hd:/tmp/freebsd13.img,hd:/tmp/freebsd14.img,hd:/tmp/freebsd15.img,hd:/tmp/freebsd16.img,hd:/tmp/freebsd17.img,hd:/tmp/freebsd18.img,hd:/tmp/freebsd19.img,hd:/tmp/freebsd20.img,hd:/tmp/freebsd21.img,hd:/tmp/freebsd22.img,hd:/tmp/freebsd23.img,hd:/tmp/freebsd24.img,hd:/tmp/freebsd25.img,hd:/tmp/freebsd26.img,hd:/tmp/freebsd27.img,hd:/tmp/freebsd28.img,hd:/tmp/freebsd29.img,hd:/tmp/freebsd30.img \ +-s 3:0,ahci,hd:/tmp/freebsd31.img,hd:/tmp/freebsd32.img,hd:/tmp/freebsd33.img,hd:/tmp/freebsd34.img,hd:/tmp/freebsd35.img \ +-s 4:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve
Not sure about this being an improvement. Since it is one looooong line any change to the line will be difficult to spot at first glance. But it's a trade-off where the new wrapping improves a lot of other cases so I guess we will have to live with this.
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.ldargs index 70b2224f26..ec3f482ca8 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd1.img bhyve +-d /tmp/freebsd1.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.args index 5665842b84..0bd1957e96 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd1.img,hd:/tmp/freebsd2.img,hd:/tmp/freebsd2.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.ldargs index 70b2224f26..ec3f482ca8 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd1.img bhyve +-d /tmp/freebsd1.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.args index 8cc1668949..73b1e2ad57 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.args @@ -8,4 +8,5 @@ -s 3:0,virtio-net,faketapdev,mac=52:54:00:bc:85:fe \ -s 2:0,virtio-blk,/tmp/freebsd.img \ -s 4:0,virtio-blk,/tmp/test.img \ --s 5:0,virtio-blk,/tmp/test2.img bhyve +-s 5:0,virtio-blk,/tmp/test2.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.args index 03bf381ffb..821cc58287 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.args @@ -8,4 +8,5 @@ -s 2:0,ahci-hd,/tmp/freebsd1.img \ -s 3:0,ahci-hd,/tmp/freebsd2.img \ -s 4:0,ahci-hd,/tmp/freebsd2.img \ --s 5:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 5:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.ldargs index 70b2224f26..ec3f482ca8 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd1.img bhyve +-d /tmp/freebsd1.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.args index d519241359..9923c4cd85 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci-hd,/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-non-isa-controller-on-slot-1.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-non-isa-controller-on-slot-1.args index cbbf768d71..12859f7d56 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-non-isa-controller-on-slot-1.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-non-isa-controller-on-slot-1.args @@ -8,4 +8,5 @@ -l bootrom,/path/to/test.fd \ -s 2:0,lpc \ -s 3:0,ahci,hd:/tmp/freebsd.img \ --s 1:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 1:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.args index 547485ba5d..edcb45a0ae 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.args index 4dcc40404b..3ee9614733 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:bc:85:fe \ --s 2:0,virtio-blk,/tmp/freebsd.img bhyve +-s 2:0,virtio-blk,/tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-base.args b/tests/bhyvexml2argvdata/bhyvexml2argv-base.args index 547485ba5d..edcb45a0ae 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-base.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-base.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-base.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-base.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-base.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-base.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.args b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.args index 4d7c7c92a8..f790f746a9 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img,cd:/tmp/cdrom.iso \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:8d:10:e1 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:8d:10:e1 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.ldargs index 24e0bc2bd9..b31d65cd06 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/cdrom.iso bhyve +-d /tmp/cdrom.iso \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.args b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.args index 8ec9799ccd..e621edbf0e 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img,cd:/tmp/cdrom.iso \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:92:68:0e bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:92:68:0e \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.args b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.args index f1c0bf3987..eedc36d35e 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img,cd:/tmp/cdrom.iso \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:7a:f5:a4 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:7a:f5:a4 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.ldargs index 24e0bc2bd9..b31d65cd06 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/cdrom.iso bhyve +-d /tmp/cdrom.iso \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.args b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.args index 17a1c83809..1c5aa009e8 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:11:bd:26 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:11:bd:26 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.args b/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.args index cb21b99cd6..153639c370 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.args @@ -6,4 +6,7 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 ARGUMENT1 ARGUMENT2 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +ARGUMENT1 \ +ARGUMENT2 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.args b/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.args index b24918e7eb..4d7cb11999 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.args @@ -8,4 +8,5 @@ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:b1:42:eb \ --l com1,/dev/nmdmdf3be7e7-a104-11e3-aeb0-50e5492bd3dcA bhyve +-l com1,/dev/nmdmdf3be7e7-a104-11e3-aeb0-50e5492bd3dcA \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-console.args b/tests/bhyvexml2argvdata/bhyvexml2argv-console.args index 25fbd4727e..8c6cb78c9f 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-console.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-console.args @@ -8,4 +8,5 @@ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:b1:42:eb \ --l com1,/dev/nmdm0A bhyve +-l com1,/dev/nmdm0A \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-console.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-console.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-console.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-console.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.args b/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.args index 2d175a4178..2c88b650b5 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.args b/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.args index f6bfc78374..aca701c3bf 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:35:99:c2 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:35:99:c2 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.args b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.args index 72f1d3538c..8f336d7ef2 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,cd:/tmp/cdrom.iso \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:6f:6a:53 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:6f:6a:53 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.ldargs index bcf901ef09..85990fc60b 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.ldargs @@ -1,4 +1,5 @@ /usr/local/sbin/grub-bhyve \ --root cd \ --device-map '<device.map>' \ ---memory 214 bhyve +--memory 214 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.args b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.args index 3e61b8fc8a..fd36515efc 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,cd:/tmp/cdrom.iso \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:e3:ec:9b bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:e3:ec:9b \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.ldargs index 24e0bc2bd9..b31d65cd06 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/cdrom.iso bhyve +-d /tmp/cdrom.iso \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.args b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.args index 4dcc40404b..3ee9614733 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:bc:85:fe \ --s 2:0,virtio-blk,/tmp/freebsd.img bhyve +-s 2:0,virtio-blk,/tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-firmware-efi.args b/tests/bhyvexml2argvdata/bhyvexml2argv-firmware-efi.args index 2f5aa4d783..b343469d19 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-firmware-efi.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-firmware-efi.args @@ -8,4 +8,5 @@ -l bootrom,fakefirmwaredir/BHYVE_UEFI.fd \ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.args b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.args index bfcd88e366..de986b4eb6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.args @@ -7,4 +7,5 @@ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ --s 4:0,virtio-9p,shared_dir=/shared/dir,ro bhyve +-s 4:0,virtio-9p,shared_dir=/shared/dir,ro \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.args b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.args index e890f7400b..8943ae211f 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.args @@ -7,4 +7,5 @@ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ --s 4:0,virtio-9p,shared_dir=/shared/dir bhyve +-s 4:0,virtio-9p,shared_dir=/shared/dir \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.args b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.args index e64e67b39d..1c400e1a7c 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd1.img,hd:/tmp/freebsd2.img,hd:/tmp/freebsd3.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:f4:6c:be bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:f4:6c:be \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.ldargs index 7d9a5155a1..9a50cf6537 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.ldargs @@ -1,4 +1,5 @@ /usr/local/sbin/grub-bhyve \ --root hd0,msdos1 \ --device-map '<device.map>' \ ---memory 214 bhyve +--memory 214 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.args b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.args index 872a69df3b..a09338d004 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd1.img,hd:/tmp/freebsd2.img,hd:/tmp/freebsd3.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:0e:d2:6f bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:0e:d2:6f \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.ldargs index 7d9a5155a1..9a50cf6537 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.ldargs @@ -1,4 +1,5 @@ /usr/local/sbin/grub-bhyve \ --root hd0,msdos1 \ --device-map '<device.map>' \ ---memory 214 bhyve +--memory 214 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.args b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.args index 3ba5c11608..91c06e3e3a 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:ee:f5:79 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:ee:f5:79 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.ldargs index 7d9a5155a1..9a50cf6537 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.ldargs @@ -1,4 +1,5 @@ /usr/local/sbin/grub-bhyve \ --root hd0,msdos1 \ --device-map '<device.map>' \ ---memory 214 bhyve +--memory 214 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.args b/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.args index b1c0c94d03..dfe1334edd 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,xhci,tablet \ --s 3:0,ahci-hd,/tmp/freebsd.img bhyve +-s 3:0,ahci-hd,/tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.args b/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.args index 910d1bbcfa..498455275a 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.args @@ -7,4 +7,5 @@ -s 0:0,hostbridge \ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.args b/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.args index 307d888c1f..e4f66080b9 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.args @@ -5,4 +5,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:82:ca:a3 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:82:ca:a3 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.args b/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.args index 5e13a9742d..c17f216cb6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:22:ee:11 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:22:ee:11 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.args b/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.args index dbe377421b..4b0e28ba41 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.args @@ -7,4 +7,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.args b/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.args index 09e30db46e..f6f45bdf43 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.args @@ -6,4 +6,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,e1000,faketapdev,mac=52:54:00:00:00:00 bhyve +-s 3:0,e1000,faketapdev,mac=52:54:00:00:00:00 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.args b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.args index 02846cb893..050452cfa2 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.args @@ -8,4 +8,5 @@ -s 1:0,lpc \ -s 2:0,ahci-hd,/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:a7:cd:5b \ --l com1,/dev/nmdm0A bhyve +-l com1,/dev/nmdm0A \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.ldargs index 7d9a5155a1..9a50cf6537 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.ldargs @@ -1,4 +1,5 @@ /usr/local/sbin/grub-bhyve \ --root hd0,msdos1 \ --device-map '<device.map>' \ ---memory 214 bhyve +--memory 214 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.args b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.args index e4712b448c..f51fa0834c 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.args @@ -8,4 +8,5 @@ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:f0:72:11 \ --l com1,/dev/nmdm0A bhyve +-l com1,/dev/nmdm0A \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.ldargs index 1ee7fd4cdf..10f8d92e6c 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.ldargs @@ -2,4 +2,5 @@ --root hd0,msdos1 \ --device-map '<device.map>' \ --memory 214 \ ---cons-dev /dev/nmdm0A bhyve +--cons-dev /dev/nmdm0A \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial.args b/tests/bhyvexml2argvdata/bhyvexml2argv-serial.args index f45a190137..df12646a88 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-serial.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial.args @@ -8,4 +8,5 @@ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:4f:f3:5b \ --l com1,/dev/nmdm0A bhyve +-l com1,/dev/nmdm0A \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-serial.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-serial.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-sound.args b/tests/bhyvexml2argvdata/bhyvexml2argv-sound.args index 05ff4965dd..8a99690ae5 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-sound.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-sound.args @@ -7,4 +7,5 @@ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ --s 4:0,hda,play=/dev/dsp0,rec=/dev/dsp0 bhyve +-s 4:0,hda,play=/dev/dsp0,rec=/dev/dsp0 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-sound.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-sound.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-sound.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-sound.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-uefi.args b/tests/bhyvexml2argvdata/bhyvexml2argv-uefi.args index 937b066e8c..22a21065db 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-uefi.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-uefi.args @@ -8,4 +8,5 @@ -l bootrom,/path/to/test.fd \ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-autoport.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-autoport.args index 551469dabe..8b692c1877 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-autoport.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-autoport.args @@ -9,4 +9,5 @@ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \ --s 4:0,fbuf,tcp=127.0.0.1:5900 bhyve +-s 4:0,fbuf,tcp=127.0.0.1:5900 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password.args index b3b1c244be..682b03b2e0 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password.args @@ -9,4 +9,5 @@ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \ --s 4:0,fbuf,tcp=127.0.0.1:5904,password=s3cr3t bhyve +-s 4:0,fbuf,tcp=127.0.0.1:5904,password=s3cr3t \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.args index 5e54da6ed7..4b4d62a68c 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.args @@ -7,4 +7,5 @@ -s 0:0,hostbridge \ -l bootrom,/path/to/test.fd \ -s 1:0,lpc \ --s 2:0,fbuf,tcp=127.0.0.1:5904,w=1920,h=1080 bhyve +-s 2:0,fbuf,tcp=127.0.0.1:5904,w=1920,h=1080 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.args index 47022e84cf..960b2dfe5e 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.args @@ -9,4 +9,5 @@ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \ --s 4:0,fbuf,tcp=127.0.0.1:5904,vga=io bhyve +-s 4:0,fbuf,tcp=127.0.0.1:5904,vga=io \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.args index 923098f3db..0639161ad0 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.args @@ -9,4 +9,5 @@ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \ --s 4:0,fbuf,tcp=127.0.0.1:5904,vga=off bhyve +-s 4:0,fbuf,tcp=127.0.0.1:5904,vga=off \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.args index 9225f5d133..caa9b0e9a6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.args @@ -9,4 +9,5 @@ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \ --s 4:0,fbuf,tcp=127.0.0.1:5904,vga=on bhyve +-s 4:0,fbuf,tcp=127.0.0.1:5904,vga=on \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc.args index cd7a543265..0301aa666e 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc.args @@ -9,4 +9,5 @@ -s 1:0,lpc \ -s 2:0,ahci,hd:/tmp/freebsd.img \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \ --s 4:0,fbuf,tcp=127.0.0.1:5904 bhyve +-s 4:0,fbuf,tcp=127.0.0.1:5904 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-wired.args b/tests/bhyvexml2argvdata/bhyvexml2argv-wired.args index 13d4f49095..f2c415ece5 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-wired.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-wired.args @@ -7,4 +7,5 @@ -P \ -s 0:0,hostbridge \ -s 2:0,ahci,hd:/tmp/freebsd.img \ --s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-wired.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-wired.ldargs index 32538b558e..91f9658137 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-wired.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-wired.ldargs @@ -1,3 +1,4 @@ /usr/sbin/bhyveload \ -m 214 \ --d /tmp/freebsd.img bhyve +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c index 34e40a6438..c4fe4ef17a 100644 --- a/tests/bhyvexml2argvtest.c +++ b/tests/bhyvexml2argvtest.c @@ -86,19 +86,19 @@ static int testCompareXMLToArgvFiles(const char *xml, goto out; }
- if (!(actualargv = virCommandToString(cmd, false))) + if (!(actualargv = virCommandToString(cmd, true))) goto out;
if (actualdm != NULL) virTrimSpaces(actualdm, NULL);
- if (!(actualld = virCommandToString(ldcmd, false))) + if (!(actualld = virCommandToString(ldcmd, true))) goto out;
- if (virTestCompareToFile(actualargv, cmdline) < 0) + if (virTestCompareToFileFull(actualargv, cmdline, false) < 0) goto out;
- if (virTestCompareToFile(actualld, ldcmdline) < 0) + if (virTestCompareToFileFull(actualld, ldcmdline, false) < 0) goto out;
if (virFileExists(dmcmdline) || actualdm) { -- 2.30.2

On Fri, Apr 09, 2021 at 17:36:40 +0200, Pavel Hrdina wrote:
On Fri, Apr 09, 2021 at 02:50:25PM +0200, Peter Krempa wrote:
virCommandToString has the possibility to return an already wrapped string with better format than what we get from the test wrapper script.
The main advantage is that arguments for an option are always on the same line which makes it more easy to see what changed in a diff and prevents re-wrapping of the line if a wrapping point moves over the threshold.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> ---
[...]
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.args index d7917bd8f3..bd987c86aa 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.args @@ -5,17 +5,7 @@ -H \ -P \ -s 0:0,hostbridge \ --s 2:0,ahci,hd:/tmp/freebsd1.img,hd:/tmp/freebsd2.img,hd:/tmp/freebsd3.img,\ -hd:/tmp/freebsd4.img,hd:/tmp/freebsd5.img,hd:/tmp/freebsd6.img,\ -hd:/tmp/freebsd7.img,hd:/tmp/freebsd8.img,hd:/tmp/freebsd9.img,\ -hd:/tmp/freebsd10.img,hd:/tmp/freebsd11.img,hd:/tmp/freebsd12.img,\ -hd:/tmp/freebsd12.img,hd:/tmp/freebsd13.img,hd:/tmp/freebsd14.img,\ -hd:/tmp/freebsd15.img,hd:/tmp/freebsd16.img,hd:/tmp/freebsd17.img,\ -hd:/tmp/freebsd18.img,hd:/tmp/freebsd19.img,hd:/tmp/freebsd20.img,\ -hd:/tmp/freebsd21.img,hd:/tmp/freebsd22.img,hd:/tmp/freebsd23.img,\ -hd:/tmp/freebsd24.img,hd:/tmp/freebsd25.img,hd:/tmp/freebsd26.img,\ -hd:/tmp/freebsd27.img,hd:/tmp/freebsd28.img,hd:/tmp/freebsd29.img,\ -hd:/tmp/freebsd30.img \ --s 3:0,ahci,hd:/tmp/freebsd31.img,hd:/tmp/freebsd32.img,hd:/tmp/freebsd33.img,\ -hd:/tmp/freebsd34.img,hd:/tmp/freebsd35.img \ --s 4:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve +-s 2:0,ahci,hd:/tmp/freebsd1.img,hd:/tmp/freebsd2.img,hd:/tmp/freebsd3.img,hd:/tmp/freebsd4.img,hd:/tmp/freebsd5.img,hd:/tmp/freebsd6.img,hd:/tmp/freebsd7.img,hd:/tmp/freebsd8.img,hd:/tmp/freebsd9.img,hd:/tmp/freebsd10.img,hd:/tmp/freebsd11.img,hd:/tmp/freebsd12.img,hd:/tmp/freebsd12.img,hd:/tmp/freebsd13.img,hd:/tmp/freebsd14.img,hd:/tmp/freebsd15.img,hd:/tmp/freebsd16.img,hd:/tmp/freebsd17.img,hd:/tmp/freebsd18.img,hd:/tmp/freebsd19.img,hd:/tmp/freebsd20.img,hd:/tmp/freebsd21.img,hd:/tmp/freebsd22.img,hd:/tmp/freebsd23.img,hd:/tmp/freebsd24.img,hd:/tmp/freebsd25.img,hd:/tmp/freebsd26.img,hd:/tmp/freebsd27.img,hd:/tmp/freebsd28.img,hd:/tmp/freebsd29.img,hd:/tmp/freebsd30.img \ +-s 3:0,ahci,hd:/tmp/freebsd31.img,hd:/tmp/freebsd32.img,hd:/tmp/freebsd33.img,hd:/tmp/freebsd34.img,hd:/tmp/freebsd35.img \ +-s 4:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ +bhyve
Not sure about this being an improvement. Since it is one looooong line any change to the line will be difficult to spot at first glance.
But it's a trade-off where the new wrapping improves a lot of other cases so I guess we will have to live with this.
The issue and main reason for change is in most cases default diff-view would be useless even if it were wrapped if the change triggered a re-wrap of the commandline, which was happening quite often. While when we have all arguments on one line: - you know that something has changed in that argument - you an use word-diff and word-diff regex to hilight what actually has changed - you don't get any noise from rewrapping In this very particular case the line is extremely long, but note that exactly the same wrapping would be in the VM log file anyways so I don't think it's that much worse.

Remove `nodedevCompareToFile` which was stripping the path to mdevctl since it's no longer needed if we use the new features of virCommandSetDryRun. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- ...19_36ea_4111_8f0a_8c9a70e21366-define.argv | 5 +++- ...019_36ea_4111_8f0a_8c9a70e21366-start.argv | 5 +++- ...39_495e_4243_ad9f_beb3f14c23d9-define.argv | 5 +++- ...d39_495e_4243_ad9f_beb3f14c23d9-start.argv | 5 +++- ...16_1ca8_49ac_b176_871d16c13076-define.argv | 5 +++- ...916_1ca8_49ac_b176_871d16c13076-start.argv | 5 +++- tests/nodedevmdevctldata/mdevctl-create.argv | 4 ++- .../mdevctl-list-defined.argv | 5 +++- tests/nodedevmdevctldata/mdevctl-stop.argv | 4 ++- .../nodedevmdevctldata/mdevctl-undefine.argv | 4 ++- tests/nodedevmdevctltest.c | 29 +++++-------------- 11 files changed, 44 insertions(+), 32 deletions(-) diff --git a/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-define.argv b/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-define.argv index 118ec7a8da..b8bb276f9f 100644 --- a/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-define.argv +++ b/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-define.argv @@ -1,2 +1,5 @@ -$MDEVCTL_BINARY$ define -p 0000:00:02.0 --jsonfile /dev/stdin \ +mdevctl \ +define \ +-p 0000:00:02.0 \ +--jsonfile /dev/stdin \ --uuid=d069d019-36ea-4111-8f0a-8c9a70e21366 diff --git a/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-start.argv b/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-start.argv index 129f438e4a..73a8046d84 100644 --- a/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-start.argv +++ b/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-start.argv @@ -1,2 +1,5 @@ -$MDEVCTL_BINARY$ start -p 0000:00:02.0 --jsonfile /dev/stdin \ +mdevctl \ +start \ +-p 0000:00:02.0 \ +--jsonfile /dev/stdin \ --uuid=d069d019-36ea-4111-8f0a-8c9a70e21366 diff --git a/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-define.argv b/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-define.argv index 773e98b963..bf8637ed57 100644 --- a/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-define.argv +++ b/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-define.argv @@ -1 +1,4 @@ -$MDEVCTL_BINARY$ define -p 0000:00:02.0 --jsonfile /dev/stdin +mdevctl \ +define \ +-p 0000:00:02.0 \ +--jsonfile /dev/stdin diff --git a/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-start.argv b/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-start.argv index eb7262035e..eae63f7a7f 100644 --- a/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-start.argv +++ b/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-start.argv @@ -1 +1,4 @@ -$MDEVCTL_BINARY$ start -p 0000:00:02.0 --jsonfile /dev/stdin +mdevctl \ +start \ +-p 0000:00:02.0 \ +--jsonfile /dev/stdin diff --git a/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-define.argv b/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-define.argv index 773e98b963..bf8637ed57 100644 --- a/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-define.argv +++ b/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-define.argv @@ -1 +1,4 @@ -$MDEVCTL_BINARY$ define -p 0000:00:02.0 --jsonfile /dev/stdin +mdevctl \ +define \ +-p 0000:00:02.0 \ +--jsonfile /dev/stdin diff --git a/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-start.argv b/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-start.argv index eb7262035e..eae63f7a7f 100644 --- a/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-start.argv +++ b/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-start.argv @@ -1 +1,4 @@ -$MDEVCTL_BINARY$ start -p 0000:00:02.0 --jsonfile /dev/stdin +mdevctl \ +start \ +-p 0000:00:02.0 \ +--jsonfile /dev/stdin diff --git a/tests/nodedevmdevctldata/mdevctl-create.argv b/tests/nodedevmdevctldata/mdevctl-create.argv index 802109340c..f19c9780dc 100644 --- a/tests/nodedevmdevctldata/mdevctl-create.argv +++ b/tests/nodedevmdevctldata/mdevctl-create.argv @@ -1 +1,3 @@ -$MDEVCTL_BINARY$ start -u 8a05ad83-3472-497d-8631-8142f31460e8 +mdevctl \ +start \ +-u 8a05ad83-3472-497d-8631-8142f31460e8 diff --git a/tests/nodedevmdevctldata/mdevctl-list-defined.argv b/tests/nodedevmdevctldata/mdevctl-list-defined.argv index 72b5906e9e..f6199681fa 100644 --- a/tests/nodedevmdevctldata/mdevctl-list-defined.argv +++ b/tests/nodedevmdevctldata/mdevctl-list-defined.argv @@ -1 +1,4 @@ -$MDEVCTL_BINARY$ list --dumpjson --defined +mdevctl \ +list \ +--dumpjson \ +--defined diff --git a/tests/nodedevmdevctldata/mdevctl-stop.argv b/tests/nodedevmdevctldata/mdevctl-stop.argv index 3dbaab671b..cc621191d6 100644 --- a/tests/nodedevmdevctldata/mdevctl-stop.argv +++ b/tests/nodedevmdevctldata/mdevctl-stop.argv @@ -1 +1,3 @@ -$MDEVCTL_BINARY$ stop -u e2451f73-c95b-4124-b900-e008af37c576 +mdevctl \ +stop \ +-u e2451f73-c95b-4124-b900-e008af37c576 diff --git a/tests/nodedevmdevctldata/mdevctl-undefine.argv b/tests/nodedevmdevctldata/mdevctl-undefine.argv index 54717455f7..f1a59c5242 100644 --- a/tests/nodedevmdevctldata/mdevctl-undefine.argv +++ b/tests/nodedevmdevctldata/mdevctl-undefine.argv @@ -1 +1,3 @@ -$MDEVCTL_BINARY$ undefine -u d76a6b78-45ed-4149-a325-005f9abc5281 +mdevctl \ +undefine \ +-u d76a6b78-45ed-4149-a325-005f9abc5281 diff --git a/tests/nodedevmdevctltest.c b/tests/nodedevmdevctltest.c index 48d4f9e818..27bdc67928 100644 --- a/tests/nodedevmdevctltest.c +++ b/tests/nodedevmdevctltest.c @@ -40,21 +40,6 @@ testCommandDryRunCallback(const char *const*args G_GNUC_UNUSED, *stdinbuf = g_strdup(input); } -/* We don't want the result of the test to depend on the path to the mdevctl - * binary on the developer's machine, so replace the path to mdevctl with a - * placeholder string before comparing to the expected output */ -static int -nodedevCompareToFile(const char *actual, - const char *filename) -{ - g_autofree char *replacedCmdline = NULL; - - replacedCmdline = virStringReplace(actual, MDEVCTL, "$MDEVCTL_BINARY$"); - - return virTestCompareToFile(replacedCmdline, filename); -} - - typedef virCommand* (*MdevctlCmdFunc)(virNodeDeviceDef *, char **, char **); @@ -87,14 +72,14 @@ testMdevctlStartOrDefine(const char *virt_type, if (!cmd) goto cleanup; - virCommandSetDryRun(dryRunToken, &buf, false, false, testCommandDryRunCallback, &stdinbuf); + virCommandSetDryRun(dryRunToken, &buf, true, true, testCommandDryRunCallback, &stdinbuf); if (virCommandRun(cmd, NULL) < 0) goto cleanup; if (!(actualCmdline = virBufferCurrentContent(&buf))) goto cleanup; - if (nodedevCompareToFile(actualCmdline, cmdfile) < 0) + if (virTestCompareToFileFull(actualCmdline, cmdfile, false) < 0) goto cleanup; if (virTestCompareToFile(stdinbuf, jsonfile) < 0) @@ -159,14 +144,14 @@ testMdevctlUuidCommand(const char *uuid, GetStopUndefineCmdFunc func, const char if (!cmd) goto cleanup; - virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, true, true, NULL, NULL); if (virCommandRun(cmd, NULL) < 0) goto cleanup; if (!(actualCmdline = virBufferCurrentContent(&buf))) goto cleanup; - if (nodedevCompareToFile(actualCmdline, outfile) < 0) + if (virTestCompareToFileFull(actualCmdline, outfile, false) < 0) goto cleanup; ret = 0; @@ -221,14 +206,14 @@ testMdevctlListDefined(const void *data G_GNUC_UNUSED) if (!cmd) goto cleanup; - virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, true, true, NULL, NULL); if (virCommandRun(cmd, NULL) < 0) goto cleanup; if (!(actualCmdline = virBufferCurrentContent(&buf))) goto cleanup; - if (nodedevCompareToFile(actualCmdline, cmdlinefile) < 0) + if (virTestCompareToFileFull(actualCmdline, cmdlinefile, false) < 0) goto cleanup; ret = 0; @@ -270,7 +255,7 @@ testMdevctlParse(const void *data) virBufferAddStr(&xmloutbuf, devxml); } - if (nodedevCompareToFile(virBufferCurrentContent(&xmloutbuf), xmloutfile) < 0) + if (virTestCompareToFileFull(virBufferCurrentContent(&xmloutbuf), xmloutfile, false) < 0) goto cleanup; ret = 0; -- 2.30.2

All tests which use files with 'ldargs' and 'args' suffix as output now use the internal and better line splitting. Remove the test-wrap-argv.py script, the syntax check which used it and the helper rewrapping the output when regenerating test output. For any further use, we require code to use virCommand anyways and thus it has internal wrapping now. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- build-aux/syntax-check.mk | 7 +- scripts/meson.build | 1 - scripts/test-wrap-argv.py | 168 -------------------------------------- tests/testutils.c | 35 +------- 4 files changed, 5 insertions(+), 206 deletions(-) delete mode 100755 scripts/test-wrap-argv.py diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index d6eb26c5ec..552d639119 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -1679,7 +1679,7 @@ sc_prohibit_path_max_allocation: $(_sc_search_regexp) ifneq ($(_gl-Makefile),) -syntax-check: sc_spacing-check sc_test-wrap-argv \ +syntax-check: sc_spacing-check \ sc_prohibit-duplicate-header sc_mock-noinline sc_group-qemu-caps \ sc_header-ifdef @if ! cppi --version >/dev/null 2>&1; then \ @@ -1712,11 +1712,6 @@ sc_header-ifdef: $(AM_V_GEN)$(VC_LIST) | $(GREP) '\.[h]$$' | $(RUNUTF8) xargs \ $(PYTHON) $(top_srcdir)/scripts/header-ifdef.py -sc_test-wrap-argv: - $(AM_V_GEN)$(VC_LIST) | $(GREP) -v -E 'qemuxml2argvdata|nwfilterxml2firewalldata|bhyvexml2argvdata' \ - |$(GREP) -E '\.(ldargs|args)' | $(RUNUTF8) xargs \ - $(PYTHON) $(top_srcdir)/scripts/test-wrap-argv.py --check - sc_group-qemu-caps: $(AM_V_GEN)$(RUNUTF8) $(PYTHON) $(top_srcdir)/scripts/group-qemu-caps.py \ --check --prefix $(top_srcdir)/ diff --git a/scripts/meson.build b/scripts/meson.build index 655ec0e0e2..421e3d2acd 100644 --- a/scripts/meson.build +++ b/scripts/meson.build @@ -29,7 +29,6 @@ scripts = [ 'meson-timestamp.py', 'mock-noinline.py', 'prohibit-duplicate-header.py', - 'test-wrap-argv.py', ] foreach name : scripts diff --git a/scripts/test-wrap-argv.py b/scripts/test-wrap-argv.py deleted file mode 100755 index 9ec572b479..0000000000 --- a/scripts/test-wrap-argv.py +++ /dev/null @@ -1,168 +0,0 @@ -#!/usr/bin/env python3 -# -# Copyright (C) 2019 Red Hat, Inc. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library. If not, see -# <http://www.gnu.org/licenses/>. -# -# This script is intended to be passed a list of .args files, used -# to store command line ARGV for the test suites. It will reformat -# them such that there is at most one '-param value' on each line -# of the file. Parameter values that are longer than 80 chars will -# also be split. -# -# If --in-place is supplied as the first parameter of this script, -# the files will be changed in place. -# If --check is the first parameter, the script will return -# a non-zero value if a file is not wrapped correctly. -# Otherwise the rewrapped files are printed to the standard output. - -import argparse -import subprocess -import sys - - -def rewrap_line(line): - bits = line.split(" ") - - # bits contains env vars, then the command line - # and then the arguments - env = [] - cmd = None - args = [] - - if "=" not in bits[0]: - cmd = bits[0] - bits = bits[1:] - - for bit in bits: - # If no command is defined yet, we must still - # have env vars - if cmd is None: - # Look for leading / to indicate command name - if bit.startswith("/"): - cmd = bit - else: - env.append(bit) - else: - # If there's a leading '-' then this is a new - # parameter, otherwise its a value for the prev - # parameter. - if bit.startswith("-") or len(args) == 0: - args.append(bit) - else: - args[-1] = args[-1] + " " + bit - - # We might have to split line argument values... - args = [rewrap_arg(arg) for arg in args] - - # Print env + command first - return " \\\n".join(env + [cmd] + args) + "\n" - - -def rewrap_arg(arg): - ret = [] - max_len = 78 - - while len(arg) > max_len: - split = arg.rfind(",", 0, max_len + 1) - if split == -1: - split = arg.rfind(":", 0, max_len + 1) - if split == -1: - split = arg.rfind(" ", 0, max_len + 1) - if split == -1: - print("cannot find nice place to split '%s' below 80 chars" % - arg, file=sys.stderr) - split = max_len - 1 - - split = split + 1 - - ret.append(arg[0:split]) - arg = arg[split:] - - ret.append(arg) - return "\\\n".join(ret) - - -def rewrap(filename, in_place, check): - # Read the original file - with open(filename, 'r') as fh: - orig_lines = [] - for line in fh: - orig_lines.append(line) - - if len(orig_lines) == 0: - return - - lines = [] - for line in orig_lines: - if line.endswith("\\\n"): - line = line[:-2] - lines.append(line) - - # Kill the last new line in the file - lines[-1] = lines[-1].rstrip("\n") - - # Reconstruct the master data by joining all lines - # and then split again based on the real desired - # newlines - lines = "".join(lines).split("\n") - - # Now each 'lines' entry represents a single command, we - # can process them - new_lines = [] - for line in lines: - new_lines.append(rewrap_line(line)) - - if in_place: - with open(filename, "w") as fh: - for line in new_lines: - print(line, file=fh, end='') - elif check: - orig = "".join(orig_lines) - new = "".join(new_lines) - if new != orig: - diff = subprocess.Popen(["diff", "-u", filename, "-"], - stdin=subprocess.PIPE) - diff.communicate(input=new.encode('utf-8')) - - print("Incorrect line wrapping in '%s'" % - filename, file=sys.stderr) - print("Use test-wrap-argv.py to wrap test data files", - file=sys.stderr) - return False - else: - for line in new_lines: - print(line, end='') - - return True - - -parser = argparse.ArgumentParser(description='Test arg line wrapper') -parser.add_argument('--in-place', '-i', action="store_true", - help='modify files in-place') -parser.add_argument('--check', action="store_true", - help='check existing files only') -parser.add_argument('files', nargs="+", - help="filenames to check") -args = parser.parse_args() - -errs = False -for filename in args.files: - if not rewrap(filename, args.in_place, args.check): - errs = True - -if errs: - sys.exit(1) -sys.exit(0) diff --git a/tests/testutils.c b/tests/testutils.c index 3363d7f0aa..0a719bc782 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -325,26 +325,6 @@ virTestLoadFileJSON(const char *p, ...) } -static int -virTestRewrapFile(const char *filename) -{ - g_autofree char *script = NULL; - g_autoptr(virCommand) cmd = NULL; - - if (!(virStringHasSuffix(filename, ".args") || - virStringHasSuffix(filename, ".argv") || - virStringHasSuffix(filename, ".ldargs"))) - return 0; - - script = g_strdup_printf("%s/scripts/test-wrap-argv.py", abs_top_srcdir); - - cmd = virCommandNewArgList(PYTHON3, script, "--in-place", filename, NULL); - if (virCommandRun(cmd, NULL) < 0) - return -1; - - return 0; -} - /** * @param stream: output stream to write differences to * @param expect: expected output text @@ -364,8 +344,7 @@ virTestDifferenceFullInternal(FILE *stream, const char *expectName, const char *actual, const char *actualName, - bool regenerate, - bool rewrap) + bool regenerate) { const char *expectStart; const char *expectEnd; @@ -387,12 +366,6 @@ virTestDifferenceFullInternal(FILE *stream, virDispatchError(NULL); return -1; } - - if (rewrap && - virTestRewrapFile(expectName) < 0) { - virDispatchError(NULL); - return -1; - } } if (!virTestGetDebug()) @@ -457,7 +430,7 @@ virTestDifferenceFull(FILE *stream, const char *actualName) { return virTestDifferenceFullInternal(stream, expect, expectName, - actual, actualName, true, true); + actual, actualName, true); } /** @@ -480,7 +453,7 @@ virTestDifferenceFullNoRegenerate(FILE *stream, const char *actualName) { return virTestDifferenceFullInternal(stream, expect, expectName, - actual, actualName, false, false); + actual, actualName, false); } /** @@ -607,7 +580,7 @@ virTestCompareToFileFull(const char *actual, if (STRNEQ_NULLABLE(cmpcontent, filecontent)) { virTestDifferenceFullInternal(stderr, filecontent, filename, - cmpcontent, NULL, true, unwrap); + cmpcontent, NULL, true); return -1; } -- 2.30.2

On a Friday in 2021, Peter Krempa wrote:
v2: - rebased on current master - added changes to nodedevmdevctltest - reworked the token for virCommandSetDryRun to avoid macro - truncated patch 17/25 to avoid getting stuck in list
For full version please fetch the changes from my repository:
git fetch https://gitlab.com/pipo.sk/libvirt.git test-wrap-3
commit dd78ecc4365d6e497bbdd1460bacb742b49d1fa0 Author: Peter Krempa <pkrempa@redhat.com> AuthorDate: 2021-04-06 16:49:47 +0200 Commit: Peter Krempa <pkrempa@redhat.com> CommitDate: 2021-04-09 14:26:14 +0200 Remove test 'args' file rewrapping infrastructure Reviewed-by: Ján Tomko <jtomko@redhat.com> Sadly, this reverts our percentage of scripts rewritten from Perl to Python a bit, but that's a fair price to pay for the cleanup. Jano

On Fri, Apr 09, 2021 at 02:50:02PM +0200, Peter Krempa wrote:
v2: - rebased on current master - added changes to nodedevmdevctltest - reworked the token for virCommandSetDryRun to avoid macro - truncated patch 17/25 to avoid getting stuck in list
For full version please fetch the changes from my repository:
git fetch https://gitlab.com/pipo.sk/libvirt.git test-wrap-3
Peter Krempa (25): qemuxml2argvdata: Remove unused 'args' files qemuxml2argvdata: Remove unused 'xml' files qemuxml2xmloutdata: Remove unused output XML files qemuxml2xmloutdata: Remove unused symlinks to test XML files virCommandToString: Allow stripping command path tests: storagepoolxml2argvtest: Use integrated command path stripping virCommandSetDryRun: Rework resetting of the dry run data virCommandSetDryRun: Add flags to linebreak and strip prefix from the command buffer networkxml2firewalltest: Strip path from test output via virCommandSetDryRun nwfilterxml2firewalltest: Strip path from test output via virCommandSetDryRun nwfilterebiptablestest: Strip path from test output via virCommandSetDryRun testutils: Remove unused virTestClearCommandPath virTestCompareToFile: Add possibility to skip unwrapping of input file virTestLoadFileJSON: Don't try to unwrap JSON documents virCommandToStringFull: Improve linebreaking behaviour syntax-check: Remove 90 char limit for 'argv' files qemuxml2argvtest: Use internal wrapping of command line arguments storage: Format mount options before positional arguments storagepoolxml2argvtest: Use internal wrapping of command line arguments storagevolxml2argvtest: Use internal wrapping of command line arguments networkxml2firewalltest: Use internal wrapping of command line arguments nwfilterxml2firewalldata: Use internal wrapping to wrap output files bhyvexml2argvtest: Use internal wrapping of command line arguments nodedevmdevctltest: Use internal linewrapping and variable command path stripping Remove test 'args' file rewrapping infrastructure
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
participants (3)
-
Ján Tomko
-
Pavel Hrdina
-
Peter Krempa