python: add a failed test to show Popen deadlock
authorJoe Guo <joeg@catalyst.net.nz>
Fri, 15 Sep 2017 03:31:34 +0000 (15:31 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 19 Oct 2017 03:33:10 +0000 (05:33 +0200)
commit8ed3cac9e558c60ab0b7e32133cea5e156ef9549
tree607670581491c2d78e0880a96216395c4bd8e4fa
parentea0cd977a3d1966f00861dc01728fe8b95b43f59
python: add a failed test to show Popen deadlock

`Popen.wait()` will deadlock when using stdout=PIPE and/or stderr=PIPE and the
child process generates large output to a pipe such that it blocks waiting for
the OS pipe buffer to accept more data. Use communicate() to avoid that.

This patch is commited to show the issue, a fix patch will come later.

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/blackbox/check_output.py [new file with mode: 0644]
selftest/knownfail.d/python-tests [new file with mode: 0644]
selftest/tests.py
source4/scripting/bin/gen_output.py [new file with mode: 0755]
source4/scripting/bin/wscript_build