[libvirt] [PATCH 9/8] qemu: xml/args tests for VFIO hostdev and interface type='hostdev'/

2013-04-25 Thread Laine Stump
These should be squashed in with the patch that adds commandline
handling of vfio (they would fail at any earlier time).
---
 .../qemuxml2argv-hostdev-vfio.args |  5 +++
 .../qemuxml2argvdata/qemuxml2argv-hostdev-vfio.xml | 33 +
 .../qemuxml2argv-net-hostdev-vfio.args |  6 
 .../qemuxml2argv-net-hostdev-vfio.xml  | 41 ++
 tests/qemuxml2argvtest.c   |  6 
 tests/qemuxml2xmltest.c|  2 ++
 6 files changed, 93 insertions(+)
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-vfio.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-vfio.xml
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-net-hostdev-vfio.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-net-hostdev-vfio.xml

diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-vfio.args 
b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-vfio.args
new file mode 100644
index 000..e6e42de
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-vfio.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 -nodefconfig -nodefaults -monitor \
+unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb -hda \
+/dev/HostVG/QEMUGuest2 -device vfio-pci,host=06:12.5,id=hostdev0,\
+bus=pci.0,addr=0x3 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-vfio.xml 
b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-vfio.xml
new file mode 100644
index 000..8daa53a
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-vfio.xml
@@ -0,0 +1,33 @@
+domain type='qemu'
+  nameQEMUGuest2/name
+  uuidc7a5fdbd-edaf-9466-926a-d65c16db1809/uuid
+  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_poweroffdestroy/on_poweroff
+  on_rebootrestart/on_reboot
+  on_crashdestroy/on_crash
+  devices
+emulator/usr/bin/qemu/emulator
+disk type='block' device='disk'
+  source dev='/dev/HostVG/QEMUGuest2'/
+  target dev='hda' bus='ide'/
+  address type='drive' controller='0' bus='0' target='0' unit='0'/
+/disk
+controller type='usb' index='0'/
+controller type='ide' index='0'/
+controller type='pci' index='0' model='pci-root'/
+hostdev mode='subsystem' type='pci' managed='yes'
+  driver name='vfio'/
+  source
+address domain='0x' bus='0x06' slot='0x12' function='0x5'/
+  /source
+/hostdev
+memballoon model='virtio'/
+  /devices
+/domain
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-hostdev-vfio.args 
b/tests/qemuxml2argvdata/qemuxml2argv-net-hostdev-vfio.args
new file mode 100644
index 000..da5886e
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-hostdev-vfio.args
@@ -0,0 +1,6 @@
+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 -monitor \
+unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \
+-usb -hda /dev/HostVG/QEMUGuest1 \
+-device vfio-pci,host=03:07.1,id=hostdev0,bus=pci.0,addr=0x3 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-hostdev-vfio.xml 
b/tests/qemuxml2argvdata/qemuxml2argv-net-hostdev-vfio.xml
new file mode 100644
index 000..90419a4
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-hostdev-vfio.xml
@@ -0,0 +1,41 @@
+domain type='qemu'
+  nameQEMUGuest1/name
+  uuidc7a5fdbd-edaf-9455-926a-d65c16db1809/uuid
+  memory unit='KiB'219136/memory
+  currentMemory unit='KiB'219136/currentMemory
+  vcpu placement='static'1/vcpu
+  os
+type arch='i686' machine='pc'hvm/type
+boot dev='hd'/
+  /os
+  clock offset='utc'/
+  on_poweroffdestroy/on_poweroff
+  on_rebootrestart/on_reboot
+  on_crashdestroy/on_crash
+  devices
+emulator/usr/bin/qemu/emulator
+disk type='block' device='disk'
+  source dev='/dev/HostVG/QEMUGuest1'/
+  target dev='hda' bus='ide'/
+  address type='drive' controller='0' bus='0' target='0' unit='0'/
+/disk
+controller type='usb' index='0'/
+controller type='ide' index='0'/
+controller type='pci' index='0' model='pci-root'/
+interface type='hostdev' managed='yes'
+  mac address='00:11:22:33:44:55'/
+  driver name='vfio'/
+  source
+address type='pci' domain='0x0002' bus='0x03' slot='0x07' 
function='0x1'/
+  /source
+  vlan
+tag id='42'/
+  /vlan
+  virtualport type='802.1Qbg'
+parameters managerid='11' typeid='1193047' typeidversion='2' 
instanceid='09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f'/
+  /virtualport
+  model type='rtl8139'/
+/interface
+memballoon model='virtio'/
+  /devices
+/domain
diff --git 

Re: [libvirt] [PATCH 9/8] qemu: xml/args tests for VFIO hostdev and interface type='hostdev'/

2013-04-25 Thread Eric Blake
On 04/25/2013 12:37 PM, Laine Stump wrote:
 These should be squashed in with the patch that adds commandline
 handling of vfio (they would fail at any earlier time).
 ---
  .../qemuxml2argv-hostdev-vfio.args |  5 +++
  .../qemuxml2argvdata/qemuxml2argv-hostdev-vfio.xml | 33 +
  .../qemuxml2argv-net-hostdev-vfio.args |  6 
  .../qemuxml2argv-net-hostdev-vfio.xml  | 41 
 ++
  tests/qemuxml2argvtest.c   |  6 
  tests/qemuxml2xmltest.c|  2 ++
  6 files changed, 93 insertions(+)
  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-vfio.args
  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-vfio.xml
  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-net-hostdev-vfio.args
  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-net-hostdev-vfio.xml
 

ACK.

-- 
Eric Blake   eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list