Backed out changeset e08c785a4008 (bug 798300) for frequent mochitest-bc window leaks.
authorRyan VanderMeulen <ryanvm@gmail.com>
Mon, 30 Mar 2015 14:25:34 -0400
changeset 236545 7dc91f45e2353d9071dba4861ec17ee2a1f7d698
parent 236544 a9137f699a087620c9f200087ce023e25e3edbe5
child 236546 9bf6a6c8404561bf9b29dbb1a69518cc14eba994
push id57714
push userryanvm@gmail.com
push dateMon, 30 Mar 2015 18:32:54 +0000
treeherdermozilla-inbound@7dc91f45e235 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs798300
milestone39.0a1
backs oute08c785a400858a14737bc0cce7b9628b4bd0a2a
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset e08c785a4008 (bug 798300) for frequent mochitest-bc window leaks.
testing/mozbase/mozprocess/mozprocess/processhandler.py
testing/mozbase/mozprocess/tests/gen_stdout_stderr.py
testing/mozbase/mozprocess/tests/test_mozprocess_output.py
--- a/testing/mozbase/mozprocess/mozprocess/processhandler.py
+++ b/testing/mozbase/mozprocess/mozprocess/processhandler.py
@@ -640,26 +640,19 @@ falling back to not using job objects fo
         onFinish = to_callable_list(onFinish)
 
         def on_timeout():
             self.didTimeout = True
             if kill_on_timeout:
                 self.kill()
         onTimeout.insert(0, on_timeout)
 
-        # Always use another stream for stderr else stdout/stderr may be merged
-        # (even on posix in case the streams of the processes are not opened
-        # fully unbuffered)
-        self._stderr = subprocess.PIPE
-        if not processStderrLine:
-            # default behaviour is to use the callbacks from processOutputLine
-            # for stdout and stderr if no processStderrLine callbacks are
-            # specified
-            processStderrLine = processOutputLine
-
+        self._stderr = subprocess.STDOUT
+        if processStderrLine:
+            self._stderr = subprocess.PIPE
         self.reader = ProcessReader(stdout_callback=processOutputLine,
                                     stderr_callback=processStderrLine,
                                     finished_callback=onFinish,
                                     timeout_callback=onTimeout)
 
         # It is common for people to pass in the entire array with the cmd and
         # the args together since this is how Popen uses it.  Allow for that.
         if isinstance(self.cmd, list):
deleted file mode 100644
--- a/testing/mozbase/mozprocess/tests/gen_stdout_stderr.py
+++ /dev/null
@@ -1,7 +0,0 @@
-import sys
-
-# try to write out enough output to overflow the OS buffer
-# for both stdout and stderr.
-for i in xrange(50):
-    print "O" * 100
-    print >>sys.stderr, "X" * 100
--- a/testing/mozbase/mozprocess/tests/test_mozprocess_output.py
+++ b/testing/mozbase/mozprocess/tests/test_mozprocess_output.py
@@ -1,11 +1,10 @@
 #!/usr/bin/env python
 
-import sys
 import io
 import os
 import unittest
 import proctest
 from mozprocess import processhandler
 
 here = os.path.dirname(os.path.abspath(__file__))
 
@@ -60,32 +59,10 @@ class ProcTestOutput(proctest.ProcTest):
         detected, output = proctest.check_for_process("proccountfive.py")
         self.determine_status(detected,
                               output,
                               p.proc.returncode,
                               p.didTimeout,
                               False,
                               ())
 
-    def test_stdout_stderr_mixing(self):
-        """
-        Test that stdout and stderr don't get intermingled within a line.
-        """
-        got_output = [False]
-        def processOutput(line):
-            got_output[0] = True
-            self.assertTrue(len(line) == 100 and
-                            (all(c == 'O' for c in line) or
-                            all(c == 'X' for c in line)),
-                            "stdout and stderr should not be mixed")
-
-        test_script = os.path.join(here, "gen_stdout_stderr.py")
-        proc = processhandler.ProcessHandler(
-            [sys.executable, test_script],
-            processOutputLine=[processOutput]
-        )
-        proc.run()
-        proc.wait()
-        self.assertTrue(got_output[0], "Saw output from process")
-
-
 if __name__ == '__main__':
     unittest.main()