From 5c08b12521f60dcb86e69bd26d18c12e2c1131ac Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Wed, 12 Nov 2014 10:16:52 -0500 Subject: [PATCH] qemu: Add tests for new blkdeviotune arguments The recent commit to add support for block_set_io_throttle parameters from version 1.7 of qemu did not add any tests - this adds the tests Signed-off-by: John Ferlan --- .../qemuxml2argv-blkdeviotune-max.args | 12 +++++ .../qemuxml2argv-blkdeviotune-max.xml | 51 +++++++++++++++++++ tests/qemuxml2argvtest.c | 3 ++ 3 files changed, 66 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune-max.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune-max.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune-max.args b/tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune-max.args new file mode 100644 index 0000000000..2629c34207 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune-max.args @@ -0,0 +1,12 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ +/usr/bin/qemu \ +-name QEMUGuest1 -S -M pc -m 214 -smp 1 -nographic -nodefaults \ +-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \ +-usb -drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-ide0-0-0,cache=off,\ +bps=5000,iops=6000,bps_max=10000,iops_max=11000 -device \ +ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ +-drive file=/dev/HostVG/QEMUGuest2,if=none,id=drive-ide0-0-1,cache=off,\ +bps_rd=5000,bps_wr=5500,iops_rd=3500,iops_wr=4000,bps_rd_max=6000,\ +bps_wr_max=6500,iops_rd_max=7000,iops_wr_max=7500,iops_size=2000 \ +-device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune-max.xml b/tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune-max.xml new file mode 100644 index 0000000000..8b3e05c2e0 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune-max.xml @@ -0,0 +1,51 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu + + + + + + 5000 + 6000 + 10000 + 11000 + +
+ + + + + + + 5000 + 5500 + 3500 + 4000 + 6000 + 6500 + 7000 + 7500 + 2000 + +
+ + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 623237b735..b2e60e82e5 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1284,6 +1284,9 @@ mymain(void) DO_TEST("numad-static-memory-auto-vcpu", NONE); DO_TEST("blkdeviotune", QEMU_CAPS_NAME, QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE, QEMU_CAPS_DRIVE_IOTUNE); + DO_TEST("blkdeviotune-max", QEMU_CAPS_NAME, QEMU_CAPS_DEVICE, + QEMU_CAPS_DRIVE, QEMU_CAPS_DRIVE_IOTUNE, + QEMU_CAPS_DRIVE_IOTUNE_MAX); DO_TEST("multifunction-pci-device", QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, -- 2.47.2