Dan Kenigsberg has posted comments on this change. Change subject: vdsm: add tests for hostdev module ......................................................................
Patch Set 5: Code-Review-1 (4 comments) I would not mind squashing this patch into the previous one, which introduced the tested module. http://gerrit.ovirt.org/#/c/31766/5/tests/hostdevTests.py File tests/hostdevTests.py: Line 17: # Line 18: # Refer to the README and COPYING files for full details of the license Line 19: # Line 20: Line 21: from xml.dom.minidom import parseString don't you want to move to etree everywhere? Line 22: Line 23: import hostdev Line 24: from testlib import VdsmTestCase as TestCaseBase Line 25: from vdsm import libvirtconnection Line 21: from xml.dom.minidom import parseString Line 22: Line 23: import hostdev Line 24: from testlib import VdsmTestCase as TestCaseBase Line 25: from vdsm import libvirtconnection funny import order Line 26: from testlib import permutations, expandPermutations Line 27: Line 28: Line 29: DEVICES_PARSED = {u'pci_0000_00_1b_0': {'product': '6 Series/C200 Series ' Line 397: </capability> Line 398: </device> Line 399: """ Line 400: Line 401: VMCONTAINER = {'dummy1': ConfStub({'devices': [{'device': 'hostdev', 'vmid1' would be a clearer name than 'dummy1' Line 402: 'name': 'usb_1_1_4'}]}), Line 403: 'dummy2': ConfStub({'devices': [{'device': 'hostdev', Line 404: 'name': 'pci_0000_00_19_0'} Line 405: ]})} Line 450: ConnectionStub.VMCONTAINER) Line 451: Line 452: self.assertEqual(DEVICE_TO_VM_MAPPING, device_to_vm) Line 453: Line 454: @permutations([[''], [('pci',)], [('usb_device',)], The empty string means 'everything'? The empty tuple makes more sense. Line 455: [('pci', 'usb_device')]]) Line 456: def testListByCaps(self, caps): Line 457: devices = hostdev.list_by_caps(ConnectionStub.VMCONTAINER, caps) Line 458: -- To view, visit http://gerrit.ovirt.org/31766 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I15ba986c77ec710f6becd0244e86d27ec2023e27 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Martin Polednik <[email protected]> Gerrit-Reviewer: Michal Skrivanek <[email protected]> Gerrit-Reviewer: Vinzenz Feenstra <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
