mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-08 22:15:21 +00:00
tests: Add a test for correct disk device ordering
This commit is contained in:
parent
c1a98d8825
commit
f5534a135e
20
tests/qemuxml2argvdata/qemuxml2argv-disk-order.args
Normal file
20
tests/qemuxml2argvdata/qemuxml2argv-disk-order.args
Normal file
@ -0,0 +1,20 @@
|
||||
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu \
|
||||
-S \
|
||||
-M pc \
|
||||
-m 214 \
|
||||
-smp 1 \
|
||||
-nographic \
|
||||
-nodefaults \
|
||||
-monitor unix:/tmp/test-monitor,server,nowait \
|
||||
-no-acpi \
|
||||
-boot c \
|
||||
-drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-ide0-0-0 \
|
||||
-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
|
||||
-drive file=/dev/HostVG/QEMUGuest2,if=none,media=cdrom,id=drive-ide0-1-0 \
|
||||
-device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \
|
||||
-drive file=/tmp/data.img,if=none,id=drive-virtio-disk0 \
|
||||
-device virtio-blk-pci,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,id=virtio-disk0 \
|
||||
-drive file=/tmp/logs.img,if=none,id=drive-virtio-disk1 \
|
||||
-device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk1,id=virtio-disk1 \
|
||||
-usb \
|
||||
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5
|
37
tests/qemuxml2argvdata/qemuxml2argv-disk-order.xml
Normal file
37
tests/qemuxml2argvdata/qemuxml2argv-disk-order.xml
Normal file
@ -0,0 +1,37 @@
|
||||
<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='cdrom'>
|
||||
<source dev='/dev/HostVG/QEMUGuest2'/>
|
||||
<target dev='hdc' bus='ide'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/tmp/logs.img'/>
|
||||
<target dev='vdb' bus='virtio'/>
|
||||
</disk>
|
||||
<disk type='block' device='disk'>
|
||||
<source dev='/dev/HostVG/QEMUGuest1'/>
|
||||
<target dev='hda' bus='ide'/>
|
||||
</disk>
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/tmp/data.img'/>
|
||||
<target dev='vda' bus='virtio'/>
|
||||
</disk>
|
||||
<controller type='ide' index='0'/>
|
||||
<memballoon model='virtio'/>
|
||||
</devices>
|
||||
</domain>
|
@ -283,6 +283,8 @@ mymain(void)
|
||||
DO_TEST("disk-floppy", false, NONE);
|
||||
DO_TEST("disk-many", false, NONE);
|
||||
DO_TEST("disk-virtio", false, QEMU_CAPS_DRIVE, QEMU_CAPS_DRIVE_BOOT);
|
||||
DO_TEST("disk-order", false,
|
||||
QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE_BOOT);
|
||||
DO_TEST("disk-xenvbd", false, QEMU_CAPS_DRIVE, QEMU_CAPS_DRIVE_BOOT);
|
||||
DO_TEST("disk-drive-boot-disk", false,
|
||||
QEMU_CAPS_DRIVE, QEMU_CAPS_DRIVE_BOOT);
|
||||
|
Loading…
Reference in New Issue
Block a user