[webkit-reviews] review denied: [Bug 187581] webkitpy.port.server_process_unittest.TestServerProcess.test_basic failed on Windows Python : [Attachment 344936] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 18 19:08:39 PDT 2018


Fujii Hironori <Hironori.Fujii at sony.com> has denied Fujii Hironori
<Hironori.Fujii at sony.com>'s request for review:
Bug 187581: webkitpy.port.server_process_unittest.TestServerProcess.test_basic
failed on Windows Python
https://bugs.webkit.org/show_bug.cgi?id=187581

Attachment 344936: Patch

https://bugs.webkit.org/attachment.cgi?id=344936&action=review




--- Comment #13 from Fujii Hironori <Hironori.Fujii at sony.com> ---
Comment on attachment 344936
  --> https://bugs.webkit.org/attachment.cgi?id=344936
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=344936&action=review

Thank you for the review.

>> Tools/ChangeLog:23
>> +	    condition for Windows. Add a new test to check proc.poll() retruns
> 
> Retruns => returns

Will fix.

>> Tools/Scripts/webkitpy/port/server_process_unittest.py:102
>> +	    cmd = [sys.executable, '-c', 'import sys; print "stdout";
sys.stdout.flush(); print >>sys.stderr, "stderr"; sys.stderr.flush();
sys.stdin.readline();']
> 
> Can you please explain why the flush is needed on Windows? I would have
expected stderr to be unbuffered.

There are similar questions that stdout is buffered on pipe under Python for
Windows.

  Python C program subprocess hangs at "for line in iter" - Stack Overflow
 
https://stackoverflow.com/questions/20503671/python-c-program-subprocess-hangs-
at-for-line-in-iter

  fflush - How fo force subprocess to refresh stdout buffer? - Stack Overflow
 
https://stackoverflow.com/questions/22527010/how-fo-force-subprocess-to-refresh
-stdout-buffer

  buffer - windows console program stdout is buffered when using pipe
redirection - Stack Overflow
 
https://stackoverflow.com/questions/9037177/windows-console-program-stdout-is-b
uffered-when-using-pipe-redirection

I found a useful command switch for this issue. I will remake the patch by
using this command switch.

https://docs.python.org/2/using/cmdline.html

> -u 
> Force stdin, stdout and stderr to be totally unbuffered.


More information about the webkit-reviews mailing list