Dactyloidae/testing
Mike Hommey 62562b80d0 Bug 1384062 - Make SystemResourceMonitor.stop more resilient to errors. r=ahal,gps
The poll() call in SystemResourceMonitor.stop might fail even though
there is something to read from the pipe, in some corner cases, and
python won't let us know about it. In that case, an exception is thrown,
leaving the SystemResourceMonitor (and its callers) in a weird state. In
practice, this leads BuildMonitor.__exit__ to recall stop, which then
fails.

So when poll() throws an exception, we pretend there's still something
to read, and we try to read anyways. If there is something to read,
recv() will return it, otherwise, it will throw an exception of its own,
which we catch, pretending we're done.

Furthermore, when there is nothing to read from the pipe, poll() simply
returns False, and our loop never sets `done` to True, and we then hit
an assert, which doesn't have its place here, so we remove it.

Finally, the other end of the pipe might have died at any time, making
sending over the pipe fail, so we also protect against that.

With all these changes, it feels like the reason to backout bug 1239939
in bug 1272782 should have been dealt with, and we can drop the timeout
again.

--HG--
extra : rebase_source : ac72dd5b2602cf3ffddfb429f95e02380f939893
2019-02-15 23:58:04 +08:00
..
config import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
crashtest import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
docker import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
firefox-ui import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
gtest Remove base conditional code for crash reporter and injector. 2019-02-15 23:39:53 +08:00
instrumentation import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
marionette Remove other gonk widget conditionals and unused files. 2019-02-15 23:57:15 +08:00
mochitest Remove other gonk widget conditionals and unused files. 2019-02-15 23:57:15 +08:00
modules Remove other gonk widget conditionals and unused files. 2019-02-15 23:57:15 +08:00
mozbase Bug 1384062 - Make SystemResourceMonitor.stop more resilient to errors. r=ahal,gps 2019-02-15 23:58:04 +08:00
mozharness Add Pale Moon 2018-02-02 03:35:06 -05:00
profiles moebius#90: CSS - implement text-justify property 2019-02-15 23:54:04 +08:00
runtimes import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
specialpowers Remove MOZ_B2G leftovers and some dead B2G-only components. 2019-02-15 23:57:05 +08:00
talos moebius#231: Consider blocking top level window data: URIs (tests) 2019-02-15 23:56:35 +08:00
tools import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
tps Add Pale Moon 2018-02-02 03:35:06 -05:00
web-platform moebius#231: Consider blocking top level window data: URIs (tests) 2019-02-15 23:56:35 +08:00
xpcshell Remove other gonk widget conditionals and unused files. 2019-02-15 23:57:15 +08:00
cppunittest.ini import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
mach_commands.py import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
README.txt import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
remotecppunittests.py import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
runcppunittests.py Remove base conditional code for crash reporter and injector. 2019-02-15 23:39:53 +08:00
testsuite-targets.mk Remove MOZ_B2G leftovers and some dead B2G-only components. 2019-02-15 23:57:05 +08:00

Common testing tools for mozilla codebase projects, test suite definitions
for automated test runs, tests that don't fit anywhere else, and other fun
stuff