Dan Kenigsberg has posted comments on this change.
Change subject: tests: Adding functional tests for networking
......................................................................
Patch Set 18: (3 inline comments)
(very partial review)
....................................................
File tests/functional/utils.py
Line 41: "/usr/sbin/service", # Fedora
Line 42: )
Line 43:
Line 44:
Line 45: def create_dummy():
mixedCase may be confusing, but let's conform. Your other functions do not use
underscore separator.
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)
Either RequireRoot or checkSudo
Line 55: attempts += 1
Line 56: if rc == SUCCESS:
Line 57: return dummy_name
Line 58: else:
....................................................
File tests/testValidation.py
Line 105: @wraps(f)
Line 106: def wrapper(*args, **kwargs):
Line 107: cmd_modprobe = [modprobe.cmd, "dummy"]
Line 108: if not os.path.exists('/sys/module/dummy'):
Line 109: rc, out, err = utils.execCmd(cmd_modprobe, sudo=True)
this would explode if the host does not have "sudoers" configured. You should
either skip-if-not-root, or use checkSudo()
Line 110: return f(*args, **kwargs)
Line 111: return wrapper
Line 112:
Line 113:
--
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