]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
QEMU Tests for reboot-timeout
authorMartin Kletzander <mkletzan@redhat.com>
Tue, 18 Sep 2012 10:32:07 +0000 (12:32 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Thu, 20 Sep 2012 14:41:02 +0000 (16:41 +0200)
tests/qemuargv2xmltest.c
tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-disabled.args [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-disabled.xml [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-enabled.args [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-enabled.xml [new file with mode: 0644]
tests/qemuxml2argvtest.c
tests/qemuxml2xmltest.c

index ad5f45ba32b0118cfaf66d306ecea6be060058e6..c4c2cd946fcec77be32bb1b7cc0258d6d7a63abb 100644 (file)
@@ -151,6 +151,10 @@ mymain(void)
 
     /* Can't roundtrip xenner arch */
     /*DO_TEST("bootloader");*/
+
+    DO_TEST("reboot-timeout-enabled");
+    DO_TEST("reboot-timeout-disabled");
+
     DO_TEST("clock-utc");
     DO_TEST("clock-localtime");
     DO_TEST("disk-cdrom");
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-disabled.args b/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-disabled.args
new file mode 100644 (file)
index 0000000..1a2bf4d
--- /dev/null
@@ -0,0 +1,3 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc \
+-m 214 -smp 6 -nographic -monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi -boot order=n,reboot-timeout=-1 -net none -serial none -parallel none -usb
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-disabled.xml b/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-disabled.xml
new file mode 100644 (file)
index 0000000..38a0f52
--- /dev/null
@@ -0,0 +1,21 @@
+<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'>6</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='network'/>
+    <bios rebootTimeout='-1'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <controller type='usb' index='0'/>
+    <memballoon model='virtio'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-enabled.args b/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-enabled.args
new file mode 100644 (file)
index 0000000..ab18b30
--- /dev/null
@@ -0,0 +1,3 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc \
+-m 214 -smp 6 -nographic -monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi -boot order=n,reboot-timeout=128 -net none -serial none -parallel none -usb
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-enabled.xml b/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-enabled.xml
new file mode 100644 (file)
index 0000000..3a9cd6f
--- /dev/null
@@ -0,0 +1,21 @@
+<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'>6</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='network'/>
+    <bios rebootTimeout='128'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <controller type='usb' index='0'/>
+    <memballoon model='virtio'/>
+  </devices>
+</domain>
index 0ec3c2cb69d627b4efa8ccfec9263dd5dd490c76..629d7679a755eeb4fdc2b004914a61d44f778868 100644 (file)
@@ -373,6 +373,11 @@ mymain(void)
             QEMU_CAPS_BOOTINDEX,
             QEMU_CAPS_VIRTIO_BLK_SCSI, QEMU_CAPS_VIRTIO_BLK_SG_IO);
     DO_TEST("bootloader", QEMU_CAPS_DOMID, QEMU_CAPS_KVM);
+
+    DO_TEST("reboot-timeout-disabled", QEMU_CAPS_REBOOT_TIMEOUT);
+    DO_TEST("reboot-timeout-enabled", QEMU_CAPS_REBOOT_TIMEOUT);
+    DO_TEST_FAILURE("reboot-timeout-enabled", NONE);
+
     DO_TEST("bios", QEMU_CAPS_DEVICE, QEMU_CAPS_SGA);
     DO_TEST("clock-utc", NONE);
     DO_TEST("clock-localtime", NONE);
index 0a6da984bc425d108853eab6b5e98972cdae1ca9..b968566e5abfc6ef2d5f08e00033ae24e1fa32d4 100644 (file)
@@ -133,6 +133,10 @@ mymain(void)
     DO_TEST("boot-menu-disable");
     DO_TEST("boot-order");
     DO_TEST("bootloader");
+
+    DO_TEST("reboot-timeout-enabled");
+    DO_TEST("reboot-timeout-disabled");
+
     DO_TEST("clock-utc");
     DO_TEST("clock-localtime");
     DO_TEST("cpu-kvmclock");