Bug 1354750 - Disable loading mozlog plugin with pytest for wpt, r=ato draft
authorJames Graham <james@hoppipolla.co.uk>
Wed, 21 Jun 2017 16:46:39 +0100
changeset 598842 4c107fe49f7194dcdc9467adc72fe38797bbd204
parent 598150 2b07ef4f3381eafab2183a46704bed50800bede3
child 634600 fefccf847634bd3ee2fe65ea8ba2f6ed2ef41a30
push id65341
push userbmo:james@hoppipolla.co.uk
push dateThu, 22 Jun 2017 09:33:50 +0000
reviewersato
bugs1354750
milestone56.0a1
Bug 1354750 - Disable loading mozlog plugin with pytest for wpt, r=ato Loading mozlog from within the executor process makes us prone to deadlocks since we can't guarantee that the log mutex isn't acquired when we fork() the parent process, and the python multiprocessing module doesn't respect posix guidelines about execv()ing a new process after a fork(). To avoid this specific instance of the probelm we stop pytest loading the mozlog plugin which we aren't actually using but is loaded by default when mozlog is available. MozReview-Commit-ID: IIllNZVOUJz
testing/web-platform/tests/tools/wptrunner/wptrunner/executors/pytestrunner/runner.py
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/pytestrunner/runner.py
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/pytestrunner/runner.py
@@ -51,16 +51,17 @@ def run(path, server_config, session_con
 
     # TODO(ato): Deal with timeouts
 
     with TemporaryDirectory() as cache:
         pytest.main(["--strict",  # turn warnings into errors
                      "--verbose",  # show each individual subtest
                      "--capture", "no",  # enable stdout/stderr from tests
                      "--basetemp", cache,  # temporary directory
+                     "-p", "no:mozlog",
                      path],
                     plugins=plugins)
 
     return recorder.results
 
 
 class SubtestResultRecorder(object):
     def __init__(self):