From d61da421abe643c8b3296b341344af4b9d114140 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Thu, 9 Aug 2018 12:28:56 +0200 Subject: [PATCH] tests: qemuxml2argv: Add 2 floppy drive tests for q35 with 2.9 and 2.11 machine MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The floppy drive command line is different on the q35 machine. Make sure to test that both drives are supported and also multiple machine versions as we generate the commandline differently. Note that both output files show wrong command line which will be fixed subsequently. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- .../disk-floppy-q35-2_11.x86_64-latest.args | 37 ++++++++++++++++++ .../qemuxml2argvdata/disk-floppy-q35-2_11.xml | 38 +++++++++++++++++++ .../disk-floppy-q35-2_9.x86_64-latest.args | 36 ++++++++++++++++++ .../qemuxml2argvdata/disk-floppy-q35-2_9.xml | 38 +++++++++++++++++++ tests/qemuxml2argvtest.c | 2 + 5 files changed, 151 insertions(+) create mode 100644 tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/disk-floppy-q35-2_11.xml create mode 100644 tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/disk-floppy-q35-2_9.xml diff --git a/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args b/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args new file mode 100644 index 0000000000..3c3d99f1d5 --- /dev/null +++ b/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args @@ -0,0 +1,37 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test \ +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-q35-2.11,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,fd=1729,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-device pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,\ +addr=0x1 \ +-device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \ +-device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \ +-drive file=/tmp/firmware.img,format=raw,if=none,id=drive-fdc0-0-0 \ +-global isa-fdc.driveA=drive-fdc0-0-0 \ +-global isa-fdc.bootindexA=1 \ +-drive file=/tmp/data.img,format=qcow2,if=none,id=drive-fdc0-0-1 \ +-global isa-fdc.driveB=drive-fdc0-0-1 \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ +resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/disk-floppy-q35-2_11.xml b/tests/qemuxml2argvdata/disk-floppy-q35-2_11.xml new file mode 100644 index 0000000000..6f51691a5c --- /dev/null +++ b/tests/qemuxml2argvdata/disk-floppy-q35-2_11.xml @@ -0,0 +1,38 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + +
+ + + + + +
+ + +
+ + + + + + + + diff --git a/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args b/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args new file mode 100644 index 0000000000..69be8616de --- /dev/null +++ b/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args @@ -0,0 +1,36 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test \ +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-q35-2.9,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,fd=1729,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-device pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,\ +addr=0x1 \ +-device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \ +-device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \ +-drive file=/tmp/firmware.img,format=raw,if=none,id=drive-fdc0-0-0 \ +-device isa-fdc,driveA=drive-fdc0-0-0,bootindexA=1 \ +-drive file=/tmp/data.img,format=qcow2,if=none,id=drive-fdc0-0-1 \ +-device isa-fdc,driveB=drive-fdc0-0-1 \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ +resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/disk-floppy-q35-2_9.xml b/tests/qemuxml2argvdata/disk-floppy-q35-2_9.xml new file mode 100644 index 0000000000..5301759279 --- /dev/null +++ b/tests/qemuxml2argvdata/disk-floppy-q35-2_9.xml @@ -0,0 +1,38 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + +
+ + + + + +
+ + +
+ + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 1ab2d7cb32..71e5947399 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -997,6 +997,8 @@ mymain(void) DO_TEST_CAPS_LATEST("disk-cdrom-tray"); DO_TEST("disk-floppy", NONE); DO_TEST_CAPS_LATEST("disk-floppy"); + DO_TEST_CAPS_LATEST("disk-floppy-q35-2_9"); + DO_TEST_CAPS_LATEST("disk-floppy-q35-2_11"); DO_TEST_FAILURE("disk-floppy-pseries", QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE); DO_TEST("disk-floppy-tray", NONE); -- 2.47.2