This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients David.Edelsohn, neologix, pitrou
Date 2013-04-24.20:40:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1366836059.95.0.085419558621.issue17835@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2013-04-24 20:40:59pitrousetrecipients: + pitrou, neologix, David.Edelsohn
2013-04-24 20:40:59pitrousetmessageid: <1366836059.95.0.085419558621.issue17835@psf.upfronthosting.co.za>
2013-04-24 20:40:59pitroulinkissue17835 messages
2013-04-24 20:40:59pitroucreate