Test the memory locking command line with different QEMU versions
to prepare for changing it for latest QEMU.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
.../mlock-off.x86_64-3.0.0.args | 32 +++++++++++++++++++
.../mlock-on.x86_64-3.0.0.args | 32 +++++++++++++++++++
tests/qemuxml2argvtest.c | 3 ++
3 files changed, 67 insertions(+)
create mode 100644 tests/qemuxml2argvdata/mlock-off.x86_64-3.0.0.args
create mode 100644 tests/qemuxml2argvdata/mlock-on.x86_64-3.0.0.args
diff --git a/tests/qemuxml2argvdata/mlock-off.x86_64-3.0.0.args
b/tests/qemuxml2argvdata/mlock-off.x86_64-3.0.0.args
new file mode 100644
index 0000000000..cea23c4d8a
--- /dev/null
+++ b/tests/qemuxml2argvdata/mlock-off.x86_64-3.0.0.args
@@ -0,0 +1,32 @@
+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-i686 \
+-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-3.0,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 piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
+resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/mlock-on.x86_64-3.0.0.args
b/tests/qemuxml2argvdata/mlock-on.x86_64-3.0.0.args
new file mode 100644
index 0000000000..2ea145d798
--- /dev/null
+++ b/tests/qemuxml2argvdata/mlock-on.x86_64-3.0.0.args
@@ -0,0 +1,32 @@
+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-i686 \
+-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-3.0,accel=tcg,usb=off,dump-guest-core=off \
+-m 214 \
+-realtime mlock=on \
+-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 piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
+resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 498892c4fd..f77853582a 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -2404,6 +2404,9 @@ mymain(void)
DO_TEST("mlock-off", QEMU_CAPS_REALTIME_MLOCK);
DO_TEST("mlock-unsupported", NONE);
+ DO_TEST_CAPS_VER("mlock-on", "3.0.0");
+ DO_TEST_CAPS_VER("mlock-off", "3.0.0");
+
DO_TEST_PARSE_ERROR("pci-bridge-negative-index-invalid", NONE);
DO_TEST_PARSE_ERROR("pci-bridge-duplicate-index", NONE);
DO_TEST_PARSE_ERROR("pci-root-nonzero-index", NONE);
--
2.19.2