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

Re: [libvirt] [v3 12/14] Add a usb1 & usb2 qemuxml2argv test



On Fri, Sep 02, 2011 at 03:18:22AM +0200, 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);

  I am skipping that patch, I get a make check error:

121) QEMU XML-2-ARGV usb1-usb2
... libvir: QEMU error : internal error unable to reserve PCI address
0:0:1.2
FAILED

  since it's test only we can solve this later,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


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