diff --git a/tests/testlib/sigpipe-remote.py b/tests/testlib/sigpipe-remote.py --- a/tests/testlib/sigpipe-remote.py +++ b/tests/testlib/sigpipe-remote.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 from __future__ import print_function +import io import os import subprocess import sys @@ -16,6 +17,10 @@ print('SIGPIPE-HELPER: %s is running %s' % (exe, ver), file=sys.stderr) sys.exit(255) +if isinstance(sys.stdout.buffer, io.BufferedWriter): + print('SIGPIPE-HELPER: script need unbuffered output', file=sys.stderr) + sys.exit(255) + DEBUG_FILE = os.environ.get('SIGPIPE_REMOTE_DEBUG_FILE') if DEBUG_FILE is None: debug_stream = sys.stderr.buffer