Change in vdsm[master]: clean dhclient processes that are left after functional tests
ibarkan at redhat.com
ibarkan at redhat.com
Tue Oct 28 06:31:23 UTC 2014
Ido Barkan has posted comments on this change.
Change subject: clean dhclient processes that are left after functional tests
......................................................................
Patch Set 5: Verified+1
(3 comments)
http://gerrit.ovirt.org/#/c/34366/5/tests/functional/dhcp.py
File tests/functional/dhcp.py:
Line 116: try:
Line 117: os.kill(self.pid, signal)
Line 118: except OSError as err:
Line 119: if err.errno == ESRCH:
Line 120: return True
> You are hiding now unexpected OSError, like EPERM!
Done
Line 121:
Line 122: start = time()
Line 123: while True:
Line 124: if time() - start > timeout:
Line 125: return False
Line 126: elif self._is_running():
Line 127: sleep(0.5)
Line 128: else:
Line 129: return True
> This works, but we can make more general and effective by sending multiple
Done
Line 130:
Line 131: def _is_running(self):
Line 132: return os.path.exists('/proc/%d' % (self.pid,))
Line 133:
Line 128: else:
Line 129: return True
Line 130:
Line 131: def _is_running(self):
Line 132: return os.path.exists('/proc/%d' % (self.pid,))
> This works, but little racy - you may find another process using same pid o
Done
Line 133:
Line 134:
Line 135: def addNMplaceholderConnection(interface, connection):
Line 136: """Creating our own 'connection' with a static address prevents Network
--
To view, visit http://gerrit.ovirt.org/34366
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I458aa38415c697d3863e173444ff921d759166a2
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list