aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJ.B. Joret <jb@linux.vnet.ibm.com>2012-08-20 15:58:51 +0200
committerEric Blake <eblake@redhat.com>2012-08-21 15:35:48 -0600
commita46af26004c9625b5fba0984377f4febfda99e30 (patch)
treeeff6c5d13e33e34881a725f5b6a5a6cb8a9b5500 /tests
parentSupport for Disk Geometry Override (diff)
downloadlibvirt-a46af26004c9625b5fba0984377f4febfda99e30.tar.gz
libvirt-a46af26004c9625b5fba0984377f4febfda99e30.tar.bz2
libvirt-a46af26004c9625b5fba0984377f4febfda99e30.zip
qemu: Disk Geometry Override Support
Qemu command line generation for geometry override and testcases. Signed-off-by: J.B. Joret <jb@linux.vnet.ibm.com> Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/qemuxml2argvdata/qemuxml2argv-disk-geometry.args5
-rw-r--r--tests/qemuxml2argvdata/qemuxml2argv-disk-geometry.xml26
-rw-r--r--tests/qemuxml2argvtest.c2
3 files changed, 33 insertions, 0 deletions
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-geometry.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-geometry.args
new file mode 100644
index 000000000..c0de2ed9d
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-geometry.args
@@ -0,0 +1,5 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M \
+pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi -boot c -drive file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0,\
+cyls=16383,heads=16,secs=63,trans=lba \
+-net none -serial none -parallel none -usb
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-geometry.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-geometry.xml
new file mode 100644
index 000000000..f0cf4ae76
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-geometry.xml
@@ -0,0 +1,26 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
+ <vcpu>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</emulator>
+ <disk type='block' device='disk'>
+ <source dev='/dev/HostVG/QEMUGuest1'/>
+ <geometry cyls='16383' heads='16' secs='63' trans='lba'/>
+ <target dev='hda' bus='ide'/>
+ <address type='drive' controller='0' bus='0' unit='0'/>
+ </disk>
+ <controller type='ide' index='0'/>
+ <memballoon model='virtio'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index f8d8db56f..71513fb2a 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -788,6 +788,8 @@ mymain(void)
QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG,
QEMU_CAPS_IDE_CD);
+ DO_TEST("disk-geometry", QEMU_CAPS_DRIVE);
+
VIR_FREE(driver.stateDir);
virCapabilitiesFree(driver.caps);
VIR_FREE(map);