[virt-tools-list] [virt-manager PATCH 2/3] tests: Add test for vhostuser
Lin Ma
lma at suse.com
Fri Oct 20 09:08:28 UTC 2017
Signed-off-by: Lin Ma <lma at suse.com>
---
tests/xmlparse-xml/add-devices-out.xml | 5 +++++
tests/xmlparse.py | 12 ++++++++++++
2 files changed, 17 insertions(+)
diff --git a/tests/xmlparse-xml/add-devices-out.xml b/tests/xmlparse-xml/add-devices-out.xml
index e7e153b..563c8da 100644
--- a/tests/xmlparse-xml/add-devices-out.xml
+++ b/tests/xmlparse-xml/add-devices-out.xml
@@ -44,6 +44,11 @@
<mac address="1A:2A:3A:4A:5A:6A"/>
<address type="spapr-vio"/>
</interface>
+ <interface type="vhostuser">
+ <source type="unix" path="/tmp/vhost1.sock" mode="server"/>
+ <mac address="00:11:22:33:44:66"/>
+ <model type="virtio"/>
+ </interface>
<watchdog model="i6300esb" action="reset"/>
</devices>
<seclabel type="static" model="selinux">
diff --git a/tests/xmlparse.py b/tests/xmlparse.py
index 1cceebc..90e399a 100644
--- a/tests/xmlparse.py
+++ b/tests/xmlparse.py
@@ -968,6 +968,18 @@ class XMLParseTest(unittest.TestCase):
guest.remove_device(adddev)
guest.add_device(adddev)
+ adddev1 = virtinst.VirtualNetworkInterface(conn=conn)
+ adddev1.type = "vhostuser"
+ adddev1.source_type = "unix"
+ adddev1.source_mode = "server"
+ adddev1.source_path = "/tmp/vhost1.sock"
+ adddev1.model = "virtio"
+ adddev1.macaddr = "00:11:22:33:44:66"
+
+ guest.add_device(adddev1)
+ guest.remove_device(adddev1)
+ guest.add_device(adddev1)
+
guest.add_device(virtinst.VirtualAudio(conn,
parsexml="""<sound model='pcspk'/>"""))
--
2.9.2
More information about the virt-tools-list
mailing list