Re: [v2 12/13] Add a usb1 & usb2 qemuxml2argv test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 26, 2011 at 01:44:28AM +0300, Marc-André Lureau wrote:
> ---
>  tests/qemuxml2argvdata/qemuxml2argv-usb1-usb2.args |   15 ++++
>  tests/qemuxml2argvdata/qemuxml2argv-usb1-usb2.xml  |   74 ++++++++++++++++++++
>  tests/qemuxml2argvtest.c                           |    4 +
>  3 files changed, 93 insertions(+), 0 deletions(-)
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-usb1-usb2.args
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-usb1-usb2.xml
> 
> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb1-usb2.args b/tests/qemuxml2argvdata/qemuxml2argv-usb1-usb2.args
> new file mode 100644
> index 0000000..be4a78e
> --- /dev/null
> +++ b/tests/qemuxml2argvdata/qemuxml2argv-usb1-usb2.args
> @@ -0,0 +1,15 @@
> +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c \
> +-device piix3-usb-uhci,id=usb,bus=pci.0,multifunction=on,addr=0x1.0x2 \
> +-device ich9-usb-ehci1,id=usb1,bus=pci.0,multifunction=on,addr=0x4.0x7 \
> +-device ich9-usb-uhci1,masterbus=usb1.0,firstport=0,bus=pci.0,multifunction=on,addr=0x4.0x0 \
> +-device ich9-usb-uhci2,masterbus=usb1.0,firstport=2,bus=pci.0,multifunction=on,addr=0x4.0x1 \
> +-device ich9-usb-uhci3,masterbus=usb1.0,firstport=4,bus=pci.0,multifunction=on,addr=0x4.0x2 \
> +-device ich9-usb-ehci1,id=usb2,bus=pci.0,multifunction=on,addr=0x5.0x7 \
> +-device ich9-usb-uhci1,masterbus=usb2.0,firstport=0,bus=pci.0,multifunction=on,addr=0x5.0x0 \
> +-device ich9-usb-uhci2,masterbus=usb2.0,firstport=2,bus=pci.0,multifunction=on,addr=0x5.0x1 \
> +-device ich9-usb-uhci3,masterbus=usb2.0,firstport=4,bus=pci.0,multifunction=on,addr=0x5.0x2 \
> +-device usb-hub,id=hub0,bus=usb1.0,port=1 \
> +-device usb-tablet,id=input0,bus=usb.0,port=2 \
> +-device usb-host,hostbus=14,hostaddr=6,id=hostdev0,bus=usb2.0,port=1 \
> +-device usb-host,hostbus=14,hostaddr=7,id=hostdev1,bus=usb2.0,port=2 \
> +-device virtio-balloon-pci,id=balloon0,bus=pci.0,multifunction=on,addr=0x3.0x0
> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb1-usb2.xml b/tests/qemuxml2argvdata/qemuxml2argv-usb1-usb2.xml
> new file mode 100644
> index 0000000..e8ada4d
> --- /dev/null
> +++ b/tests/qemuxml2argvdata/qemuxml2argv-usb1-usb2.xml
> @@ -0,0 +1,74 @@
> +<domain type='qemu'>
> +  <name>QEMUGuest1</name>
> +  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
> +  <memory>219136</memory>
> +  <currentMemory>219200</currentMemory>
> +  <vcpu>1</vcpu>
> +  <os>
> +    <type arch='i686' machine='pc'>hvm</type>
> +    <boot dev='hd'/>
> +  </os>
> +  <devices>
> +    <emulator>/usr/bin/qemu</emulator>
> +    <memballoon model='virtio'/>
> +
> +    <controller type='usb' index='0' model='piix3-uhci'>
> +      <address type='pci' domain='0' bus='0' slot='1' function='2'/>
> +    </controller>
> +
> +    <controller type='usb' index='1' model='ich9-ehci1'>
> +      <address type='pci' domain='0' bus='0' slot='4' function='7'/>
> +    </controller>
> +    <controller type='usb' index='1' model='ich9-uhci1'>
> +      <master startport='0'/>
> +      <address type='pci' domain='0' bus='0' slot='4' function='0'/>
> +    </controller>
> +    <controller type='usb' index='1' model='ich9-uhci2'>
> +      <master startport='2'/>
> +      <address type='pci' domain='0' bus='0' slot='4' function='1'/>
> +    </controller>
> +    <controller type='usb' index='1' model='ich9-uhci3'>
> +      <master startport='4'/>
> +      <address type='pci' domain='0' bus='0' slot='4' function='2'/>
> +    </controller>
> +
> +    <controller type='usb' index='2' model='ich9-ehci1'>
> +      <address type='pci' domain='0' bus='0' slot='5' function='7'/>
> +    </controller>
> +    <controller type='usb' index='2' model='ich9-uhci1'>
> +      <master startport='0'/>
> +      <address type='pci' domain='0' bus='0' slot='5' function='0'/>
> +    </controller>
> +    <controller type='usb' index='2' model='ich9-uhci2'>
> +      <master startport='2'/>
> +      <address type='pci' domain='0' bus='0' slot='5' function='1'/>
> +    </controller>
> +    <controller type='usb' index='2' model='ich9-uhci3'>
> +      <master startport='4'/>
> +      <address type='pci' domain='0' bus='0' slot='5' function='2'/>
> +    </controller>
> +
> +    <input type='tablet' bus='usb'>
> +      <address type='usb' bus='0' port='2'/>
> +    </input>
> +
> +    <hub type='usb'>
> +      <address type='usb' bus='1' port='1'/>
> +    </hub>
> +
> +    <hostdev mode='subsystem' type='usb'>
> +      <source>
> +        <address bus='14' device='6'/>
> +      </source>
> +      <address type='usb' bus='2' port='1'/>
> +    </hostdev>
> +
> +    <hostdev mode='subsystem' type='usb'>
> +      <source>
> +        <address bus='14' device='7'/>
> +      </source>
> +      <address type='usb' bus='2' port='2'/>
> +    </hostdev>
> +
> +  </devices>
> +</domain>
> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
> index a8e7259..9a8ecca 100644
> --- a/tests/qemuxml2argvtest.c
> +++ b/tests/qemuxml2argvtest.c
> @@ -504,6 +504,10 @@ mymain(void)
>      DO_TEST("usb-ports", false,
>              QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE, QEMU_CAPS_USB_HUB,
>              QEMU_CAPS_NODEFCONFIG);
> +    DO_TEST("usb1-usb2", false,
> +            QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG,
> +            QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_PIIX3_USB_UHCI,
> +            QEMU_CAPS_USB_HUB, QEMU_CAPS_ICH9_USB_EHCI1);
>  
>      DO_TEST("smbios", false, QEMU_CAPS_SMBIOS_TYPE);
>  

ACK


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]