mozprocess broken on python 3.6+
Categories
(Testing :: Mozbase, defect, P2)
Tracking
(firefox68 fixed)
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: tarek, Assigned: tarek)
References
Details
Attachments
(1 file)
subprocess.Process._wait() can have a timeout option
ProcessHandlerMixin.Process._wait() should have one too
[task 2019-03-05T11:45:18.963Z] 0:52.01 =================================== FAILURES ===================================
[task 2019-03-05T11:45:18.963Z] 0:52.01 ______________ ProcTestPoll.test_poll_after_kill_no_process_group ______________
[task 2019-03-05T11:45:18.963Z] 0:52.01
[task 2019-03-05T11:45:18.963Z] 0:52.01 self = <test_poll.ProcTestPoll testMethod=test_poll_after_kill_no_process_group>
[task 2019-03-05T11:45:18.963Z] 0:52.01
[task 2019-03-05T11:45:18.963Z] 0:52.01 def test_poll_after_kill_no_process_group(self):
[task 2019-03-05T11:45:18.963Z] 0:52.01 """Process (no group) is killed, and poll() is called."""
[task 2019-03-05T11:45:18.963Z] 0:52.01 p = processhandler.ProcessHandler([self.python, self.proclaunch,
[task 2019-03-05T11:45:18.963Z] 0:52.01 "process_normal_finish_no_process_group.ini"],
[task 2019-03-05T11:45:18.963Z] 0:52.01 cwd=here,
[task 2019-03-05T11:45:18.963Z] 0:52.01 ignore_children=True
[task 2019-03-05T11:45:18.963Z] 0:52.01 )
[task 2019-03-05T11:45:18.963Z] 0:52.01 p.run()
[task 2019-03-05T11:45:18.964Z] 0:52.01 > returncode = p.kill()
[task 2019-03-05T11:45:18.964Z] 0:52.01
[task 2019-03-05T11:45:18.964Z] 0:52.01 testing/mozbase/mozprocess/tests/test_poll.py:70:
[task 2019-03-05T11:45:18.964Z] 0:52.01 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[task 2019-03-05T11:45:18.964Z] 0:52.01 testing/mozbase/mozprocess/mozprocess/processhandler.py:812: in kill
[task 2019-03-05T11:45:18.964Z] 0:52.01 self.proc.kill(sig=sig)
[task 2019-03-05T11:45:18.964Z] 0:52.01 testing/mozbase/mozprocess/mozprocess/processhandler.py:208: in kill
[task 2019-03-05T11:45:18.964Z] 0:52.01 self.returncode = self.wait()
[task 2019-03-05T11:45:18.964Z] 0:52.01 testing/mozbase/mozprocess/mozprocess/processhandler.py:229: in wait
[task 2019-03-05T11:45:18.964Z] 0:52.02 self.returncode = self._wait()
[task 2019-03-05T11:45:18.964Z] 0:52.02 testing/mozbase/mozprocess/mozprocess/processhandler.py:665: in _wait
[task 2019-03-05T11:45:18.964Z] 0:52.02 subprocess.Popen.wait(self)
[task 2019-03-05T11:45:18.964Z] 0:52.02 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[task 2019-03-05T11:45:18.964Z] 0:52.02
[task 2019-03-05T11:45:18.964Z] 0:52.02 self = <mozprocess.processhandler.ProcessHandlerMixin.Process object at 0x10f97a3c8>
[task 2019-03-05T11:45:18.965Z] 0:52.02 timeout = None
[task 2019-03-05T11:45:18.965Z] 0:52.02
[task 2019-03-05T11:45:18.965Z] 0:52.02 def wait(self, timeout=None):
[task 2019-03-05T11:45:18.965Z] 0:52.02 """Wait for child process to terminate; returns self.returncode."""
[task 2019-03-05T11:45:18.967Z] 0:52.02 if timeout is not None:
[task 2019-03-05T11:45:18.967Z] 0:52.02 endtime = _time() + timeout
[task 2019-03-05T11:45:18.967Z] 0:52.02 try:
[task 2019-03-05T11:45:18.967Z] 0:52.02 > return self._wait(timeout=timeout)
[task 2019-03-05T11:45:18.967Z] 0:52.02 E TypeError: _wait() got an unexpected keyword argument 'timeout'
[task 2019-03-05T11:45:18.967Z] 0:52.02
[task 2019-03-05T11:45:18.967Z] 0:52.02 /tools/python37/lib/python3.7/subprocess.py:984: TypeError
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
Assignee | ||
Comment 2•6 years ago
|
||
Assignee | ||
Comment 3•6 years ago
|
||
Make sure ProcessHandlerMixin.Process works also under 3.6.
3.6 introduced a _wait() method in its Popen class, that
conflicts with the one in mozprocess. The patch renames it
and also adds timeout where possible.
![]() |
||
Comment 4•6 years ago
|
||
(In reply to Tarek Ziadé (:tarek) from comment #2)
https://treeherder.mozilla.org/#/
jobs?repo=try&revision=53cea0339e8a443fcdd0e4bf6fda4decf7bf7cfb
I couldn't see any test results here, nor in comment 1. Here's a new push:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=6cba2afeae02b335900498be6b6a31e709ba4686
![]() |
||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 5•6 years ago
|
||
try run
https://treeherder.mozilla.org/#/jobs?repo=try&revision=5a1b30c9672a2abf68f26ab8fddadf61fe92b6e3
not that the mozfile failure is unrelated to this change
Comment 7•6 years ago
|
||
bugherder |
Comment hidden (Intermittent Failures Robot) |
Description
•