Royce Lv has posted comments on this change.
Change subject: misc: handle properly timeout=-1 in NoIntrPoll ......................................................................
Patch Set 1: (2 inline comments)
.................................................... File tests/miscTests.py Line 1171: Line 1172: def testNoTimeoutPipePoll(self): Line 1173: def _sigChldAndWrite(fd): Line 1174: self._waitAndSigchld() Line 1175: time.sleep(self.SLEEP_INTERVAL) I'm not sure why do we sleep here? Line 1176: os.close(fd) Line 1177: Line 1178: myPipe, hisPipe = os.pipe() Line 1179:
Line 1184: intrThread.setDaemon(True) Line 1185: intrThread.start() Line 1186: Line 1187: try: Line 1188: self.assertTrue(len(misc.NoIntrPoll(poller.poll, -1)) > 0) This testcase proves infinite poll can catch POLLHUP after EINTR occurs, can you register fd with POLLHUP mask to make it more clear? Line 1189: finally: Line 1190: os.close(myPipe) Line 1191: Line 1192: def testClosedPipe(self):
-- To view, visit http://gerrit.ovirt.org/11394 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iefc4d17559d3335ef6699cb83923c3bd255c916b Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com