Martin Polednik has uploaded a new change for review. Change subject: hostdev: add test for SR-IOV VF ......................................................................
hostdev: add test for SR-IOV VF Hostdev uses interface element for SR-IOV VFs, and therefore needs to be also covered with additional test. Change-Id: I1bf2e07f492508757be2691417c706219ded54af Signed-off-by: Martin Polednik <[email protected]> --- M tests/hostdevTests.py 1 file changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/94/43094/1 diff --git a/tests/hostdevTests.py b/tests/hostdevTests.py index 4e198a7..ba6cc96 100644 --- a/tests/hostdevTests.py +++ b/tests/hostdevTests.py @@ -116,6 +116,20 @@ </source> %s </hostdev> + ''', + _SRIOV_VF: + ''' + <interface managed="no" type="hostdev"> + <driver name="vfio"/> + <source> + <address bus="5" domain="0" function="7" slot="16" + type="pci"/> + </source> + <mac address="ff:ff:ff:ff:ff:ff"/> + <vlan> + <tag id="3"/> + </vlan> + </interface> '''} DEVICES_PARSED = {u'pci_0000_00_1b_0': {'product': '6 Series/C200 Series ' @@ -392,3 +406,10 @@ _DEVICE_XML[device_name] % ('<address bus="0x01" domain="0x0000" function="0x0" slot="0x02" \ type="pci"/>')) + + def testCreateSRIOVVF(self): + dev_spec = {'type': 'hostdev', 'device': _SRIOV_VF, + 'specParams': + {'macAddr': 'ff:ff:ff:ff:ff:ff', 'vlanId': 3}} + device = hostdevice.HostDevice(self.conf, self.log, **dev_spec) + self.assertXMLEqual(device.getXML().toxml(), _DEVICE_XML[_SRIOV_VF]) -- To view, visit https://gerrit.ovirt.org/43094 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1bf2e07f492508757be2691417c706219ded54af Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
