Giuseppe Vallarelli has posted comments on this change.

Change subject: tests: Adding functional tests for networking
......................................................................


Patch Set 18: No score

(2 inline comments)

....................................................
File tests/functional/utils.py
Line 41:                             "/usr/sbin/service",  # Fedora
Line 42:                             )
Line 43: 
Line 44: 
Line 45: def create_dummy():
Done
Line 46:     rc = -1
Line 47:     attempts = 0
Line 48:     dummy_name = None
Line 49: 


Line 50:     while rc != SUCCESS and attempts < 100:
Line 51:         dummy_name = 'dummy_%s' % randrange(0, 100)
Line 52:         ip_add_dummy = [ip.cmd, 'link', 'add', dummy_name,
Line 53:                         'type', 'dummy']
Line 54:         rc, out, err = utils.execCmd(ip_add_dummy, sudo=True)
I didn't want to check for sudo or requireRoot in more than once place. This 
function is used after a test is validated to be run with root privileges, 
perhaps I should document this assumption.
Line 55:         attempts += 1
Line 56:     if rc == SUCCESS:
Line 57:         return dummy_name
Line 58:     else:


--
To view, visit http://gerrit.ovirt.org/14840
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic3be71db9dc0b92c443b87e22fe06f920055c4d3
Gerrit-PatchSet: 18
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Vallarelli <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Giuseppe Vallarelli <[email protected]>
Gerrit-Reviewer: Livnat Peer <[email protected]>
Gerrit-Reviewer: Mark Wu <[email protected]>
Gerrit-Reviewer: Zhou Zheng Sheng <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to