all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob eca2379cff716c52d22f8ad2242991bc0f644d37 2377 bytes (raw)
name: gnu/packages/patches/python-disable-congestion-test.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
 
This patch is taken from python upstream repository:
     https://bugs.python.org/issue34587.

From 7484bdfd1e2e33fdd2c44dd4ffa044aacd495337 Mon Sep 17 00:00:00 2001
From: Victor Stinner <vstinner@redhat.com>
Date: Mon, 17 Sep 2018 14:01:20 -0700
Subject: [PATCH] bpo-34587, test_socket: remove RDSTest.testCongestion()
 (GH-9277)

The test tries to fill the receiver's socket buffer and expects an
error. But the RDS protocol doesn't require that. Moreover, the Linux
implementation of RDS expects that the producer of the messages
reduces its rate, it's not the role of the receiver to trigger an
error.

The test fails on Fedora 28 by design, so remove it.
---
 Lib/test/test_socket.py                       | 27 -------------------
 .../2018-09-13-20-58-07.bpo-34587.rCcxp3.rst  |  5 ++++
 2 files changed, 5 insertions(+), 27 deletions(-)
 create mode 100644 Misc/NEWS.d/next/Tests/2018-09-13-20-58-07.bpo-34587.rCcxp3.rst

diff --git Lib/test/test_socket.py Lib/test/test_socket.py
index 4f3c4774e4..f4d58ebf71 100644
--- Lib/test/test_socket.py
+++ Lib/test/test_socket.py
@@ -2054,33 +2054,6 @@ class RDSTest(ThreadedRDSSocketTest):
         self.data = b'select'
         self.cli.sendto(self.data, 0, (HOST, self.port))
 
-    def testCongestion(self):
-        # wait until the sender is done
-        self.evt.wait()
-
-    def _testCongestion(self):
-        # test the behavior in case of congestion
-        self.data = b'fill'
-        self.cli.setblocking(False)
-        try:
-            # try to lower the receiver's socket buffer size
-            self.cli.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, 16384)
-        except OSError:
-            pass
-        with self.assertRaises(OSError) as cm:
-            try:
-                # fill the receiver's socket buffer
-                while True:
-                    self.cli.sendto(self.data, 0, (HOST, self.port))
-            finally:
-                # signal the receiver we're done
-                self.evt.set()
-        # sendto() should have failed with ENOBUFS
-        self.assertEqual(cm.exception.errno, errno.ENOBUFS)
-        # and we should have received a congestion notification through poll
-        r, w, x = select.select([self.serv], [], [], 3.0)
-        self.assertIn(self.serv, r)
-
 
 @unittest.skipIf(fcntl is None, "need fcntl")
 @unittest.skipUnless(HAVE_SOCKET_VSOCK,

debug log:

solving eca2379cf ...
found eca2379cf in https://yhetil.org/guix/20181028124043.21773-8-m.othacehe@gmail.com/

applying [1/1] https://yhetil.org/guix/20181028124043.21773-8-m.othacehe@gmail.com/
diff --git a/gnu/packages/patches/python-disable-congestion-test.patch b/gnu/packages/patches/python-disable-congestion-test.patch
new file mode 100644
index 000000000..eca2379cf

1:36: trailing whitespace.
 
1:64: trailing whitespace.
 
Checking patch gnu/packages/patches/python-disable-congestion-test.patch...
Applied patch gnu/packages/patches/python-disable-congestion-test.patch cleanly.
warning: 2 lines add whitespace errors.

index at:
100644 eca2379cff716c52d22f8ad2242991bc0f644d37	gnu/packages/patches/python-disable-congestion-test.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.