Message187738
Ok, what does the following patch do for you:
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -3168,7 +3168,7 @@ class SignalsTest(unittest.TestCase):
select = support.import_module("select")
# A quantity that exceeds the buffer size of an anonymous pipe's
# write end.
- N = 1024 * 1024
+ N = 1024 * 1024 + 1
r, w = os.pipe()
fdopen_kwargs["closefd"] = False
# We need a separate thread to read from the pipe and allow the
@@ -3191,6 +3191,12 @@ class SignalsTest(unittest.TestCase):
signal.signal(signal.SIGALRM, alarm1)
try:
wio = self.io.open(w, **fdopen_kwargs)
+ if sys.platform.startswith('linux') and fcntl is not None:
+ # Issue #17835: try to limit pipe size using F_SETPIPE_SZ
+ pipe_size = fcntl.fcntl(w, 1031, 4096)
+ if pipe_size >= N:
+ self.skipTest("can't set pipe size to less than %d bytes: %d"
+ % (N, pipe_size))
signal.alarm(1)
# Expected behaviour:
# - first raw write() is partial (because of the limited pipe buffer |
|
Date |
User |
Action |
Args |
2013-04-24 20:40:59 | pitrou | set | recipients:
+ pitrou, neologix, David.Edelsohn |
2013-04-24 20:40:59 | pitrou | set | messageid: <1366836059.95.0.085419558621.issue17835@psf.upfronthosting.co.za> |
2013-04-24 20:40:59 | pitrou | link | issue17835 messages |
2013-04-24 20:40:59 | pitrou | create | |
|