Dan Kenigsberg has posted comments on this change.
Change subject: utils: Moved pgrep and getCmdArgs from storage/misc
......................................................................
Patch Set 1: Code-Review+1
(2 comments)
....................................................
File lib/vdsm/utils.py
Line 268: def pgrep(name):
Line 269: res = []
Line 270: for pid in iteratePids():
Line 271: try:
Line 272: pid = int(pid)
It is not your fault, but in a follow up patch, this redundant coercion to int
should be dropped: iteratePid does it already.
Line 273: except ValueError:
Line 274: continue
Line 275:
Line 276: try:
....................................................
File tests/utilsTests.py
Line 74: for i in range(3):
Line 75: sleepProcs.append(utils.execCmd([EXT_SLEEP, "3"],
sync=False,
Line 76: sudo=False))
Line 77:
Line 78: pids = utils.pgrep("sleep")
Better use EXT_SLEEP, it seems.
Line 79: for proc in sleepProcs:
Line 80: self.assertTrue(proc.pid in pids, "pid %d was not located
by pgrep"
Line 81: % proc.pid)
Line 82:
--
To view, visit http://gerrit.ovirt.org/23040
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia9a933bec0df3f7773c0f8e47fc0bf0492149031
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[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