mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
tests: qemuxml2argv: Add CDROM disks for all untested buses
Add full and empty cdroms on 'usb' and 'sd' bus to have test coverage. Note that this does not guarantee that qemu will accept them. Signed-off-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
5d884f3d3c
commit
ea13c12940
@ -0,0 +1,38 @@
|
||||
LC_ALL=C \
|
||||
PATH=/bin \
|
||||
HOME=/home/test \
|
||||
USER=test \
|
||||
LOGNAME=test \
|
||||
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,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 \
|
||||
-drive file=/root/boot.iso,format=raw,if=none,id=drive-usb-disk0,media=cdrom,\
|
||||
readonly=on \
|
||||
-device usb-storage,bus=usb.0,port=1,drive=drive-usb-disk0,id=usb-disk0,\
|
||||
removable=off \
|
||||
-drive if=none,id=drive-usb-disk1,media=cdrom,readonly=on \
|
||||
-device usb-storage,bus=usb.0,port=2,drive=drive-usb-disk1,id=usb-disk1,\
|
||||
removable=off \
|
||||
-drive file=/root/boot2.iso,format=raw,if=sd,index=2,media=cdrom,readonly=on \
|
||||
-drive if=sd,index=3,media=cdrom,readonly=on \
|
||||
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
|
||||
resourcecontrol=deny \
|
||||
-msg timestamp=on
|
47
tests/qemuxml2argvdata/disk-cdrom-bus-other.xml
Normal file
47
tests/qemuxml2argvdata/disk-cdrom-bus-other.xml
Normal file
@ -0,0 +1,47 @@
|
||||
<domain type='qemu'>
|
||||
<name>QEMUGuest1</name>
|
||||
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||
<description>This test is meant for testing CDROMS with buses which don't really support them</description>
|
||||
<memory unit='KiB'>219100</memory>
|
||||
<currentMemory unit='KiB'>219100</currentMemory>
|
||||
<vcpu placement='static'>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-system-i686</emulator>
|
||||
<disk type='file' device='cdrom'>
|
||||
<driver name='qemu' type='raw'/>
|
||||
<source file='/root/boot.iso'/>
|
||||
<target dev='sda' bus='usb'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
<disk type='file' device='cdrom'>
|
||||
<driver name='qemu' type='raw'/>
|
||||
<target dev='sdb' bus='usb'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
<disk type='file' device='cdrom'>
|
||||
<driver name='qemu' type='raw'/>
|
||||
<source file='/root/boot2.iso'/>
|
||||
<target dev='sdc' bus='sd'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
<disk type='file' device='cdrom'>
|
||||
<driver name='qemu' type='raw'/>
|
||||
<target dev='sdd' bus='sd'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
<controller type='usb' index='0'/>
|
||||
<controller type='ide' index='0'/>
|
||||
<controller type='pci' index='0' model='pci-root'/>
|
||||
<input type='mouse' bus='ps2'/>
|
||||
<input type='keyboard' bus='ps2'/>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
</domain>
|
@ -1011,6 +1011,7 @@ mymain(void)
|
||||
DO_TEST("disk-cdrom", NONE);
|
||||
DO_TEST_CAPS_VER("disk-cdrom", "2.12.0");
|
||||
DO_TEST_CAPS_LATEST("disk-cdrom");
|
||||
DO_TEST_CAPS_LATEST("disk-cdrom-bus-other");
|
||||
DO_TEST("disk-iscsi", NONE);
|
||||
DO_TEST("disk-cdrom-network", QEMU_CAPS_KVM);
|
||||
DO_TEST_CAPS_VER("disk-cdrom-network", "2.12.0");
|
||||
|
51
tests/qemuxml2xmloutdata/disk-cdrom-bus-other.xml
Normal file
51
tests/qemuxml2xmloutdata/disk-cdrom-bus-other.xml
Normal file
@ -0,0 +1,51 @@
|
||||
<domain type='qemu'>
|
||||
<name>QEMUGuest1</name>
|
||||
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||
<description>This test is meant for testing CDROMS with buses which don't really support them</description>
|
||||
<memory unit='KiB'>219100</memory>
|
||||
<currentMemory unit='KiB'>219100</currentMemory>
|
||||
<vcpu placement='static'>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-system-i686</emulator>
|
||||
<disk type='file' device='cdrom'>
|
||||
<driver name='qemu' type='raw'/>
|
||||
<source file='/root/boot.iso'/>
|
||||
<target dev='sda' bus='usb'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
<disk type='file' device='cdrom'>
|
||||
<driver name='qemu' type='raw'/>
|
||||
<target dev='sdb' bus='usb'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
<disk type='file' device='cdrom'>
|
||||
<driver name='qemu' type='raw'/>
|
||||
<source file='/root/boot2.iso'/>
|
||||
<target dev='sdc' bus='sd'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
<disk type='file' device='cdrom'>
|
||||
<driver name='qemu' type='raw'/>
|
||||
<target dev='sdd' bus='sd'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
<controller type='usb' index='0'>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
|
||||
</controller>
|
||||
<controller type='ide' index='0'>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
|
||||
</controller>
|
||||
<controller type='pci' index='0' model='pci-root'/>
|
||||
<input type='mouse' bus='ps2'/>
|
||||
<input type='keyboard' bus='ps2'/>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
</domain>
|
@ -346,6 +346,7 @@ mymain(void)
|
||||
DO_TEST("qemu-ns-no-env", NONE);
|
||||
DO_TEST("disk-aio", NONE);
|
||||
DO_TEST("disk-cdrom", NONE);
|
||||
DO_TEST("disk-cdrom-bus-other", NONE);
|
||||
DO_TEST("disk-floppy", NONE);
|
||||
DO_TEST("disk-usb-device", NONE);
|
||||
DO_TEST("disk-virtio", NONE);
|
||||
|
Loading…
Reference in New Issue
Block a user