all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mathieu Othacehe <m.othacehe@gmail.com>
To: 33186@debbugs.gnu.org
Subject: [bug#33186] [PATCH 7/7] gnu: python-3.6: Disable congestion test.
Date: Sun, 28 Oct 2018 21:40:43 +0900	[thread overview]
Message-ID: <20181028124043.21773-8-m.othacehe@gmail.com> (raw)
In-Reply-To: <20181028124043.21773-2-m.othacehe@gmail.com>

The socket congestion test is known to hang or fail randomly. It is disabled
on python 3.6 branch upstream.

* gnu/packages/patches/python-disable-congestion-test.patch: New file.
* gnu/packages/python.scm (python-3.6)[patches]: Add the previous patch.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |  1 +
 .../python-disable-congestion-test.patch      | 60 +++++++++++++++++++
 gnu/packages/python.scm                       |  1 +
 3 files changed, 62 insertions(+)
 create mode 100644 gnu/packages/patches/python-disable-congestion-test.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 0828f4358..11974903d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1078,6 +1078,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/python-3-search-paths.patch		\
   %D%/packages/patches/python-3-fix-tests.patch			\
   %D%/packages/patches/python-CVE-2018-14647.patch		\
+  %D%/packages/patches/python-disable-congestion-test.patch     \
   %D%/packages/patches/python-axolotl-AES-fix.patch		\
   %D%/packages/patches/python-cairocffi-dlopen-path.patch	\
   %D%/packages/patches/python-fix-tests.patch			\
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
--- /dev/null
+++ b/gnu/packages/patches/python-disable-congestion-test.patch
@@ -0,0 +1,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,
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index fbb280224..37755287c 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -377,6 +377,7 @@ data types.")
               (uri (string-append "https://www.python.org/ftp/python/"
                                   version "/Python-" version ".tar.xz"))
               (patches (search-patches
+			"python-disable-congestion-test.patch"
                         "python-fix-tests.patch"
                         "python-3-fix-tests.patch"
                         "python-3-deterministic-build-info.patch"
-- 
2.17.1

  parent reply	other threads:[~2018-10-28 12:42 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-28 12:35 [bug#33186] [PATCH 0/7] Preliminary installer work Mathieu Othacehe
2018-10-28 12:40 ` [bug#33186] [PATCH 1/7] gnu: Add guile-newt Mathieu Othacehe
2018-10-28 12:40   ` [bug#33186] [PATCH 2/7] services: kmscon: Do not switch to vt at start Mathieu Othacehe
2018-11-06 15:35     ` Ludovic Courtès
2018-11-07  9:17       ` Mathieu Othacehe
2018-10-28 12:40   ` [bug#33186] [PATCH 3/7] services: kmscon: Add an auto-login option Mathieu Othacehe
2018-11-06 15:36     ` Ludovic Courtès
2018-11-07  9:23       ` Mathieu Othacehe
2018-10-28 12:40   ` [bug#33186] [PATCH 4/7] gnu: glibc: Export supported locales Mathieu Othacehe
2018-11-06 15:37     ` Ludovic Courtès
2018-11-07  9:49       ` Mathieu Othacehe
2018-10-28 12:40   ` [bug#33186] [PATCH 5/7] gnu: terminals: Change libtsm and kmscon repositories Mathieu Othacehe
2018-11-06 15:38     ` Ludovic Courtès
2018-11-07  9:27       ` Mathieu Othacehe
2018-10-28 12:40   ` [bug#33186] [PATCH 6/7] gnu: slang: Use a correct location for terminfo dirs Mathieu Othacehe
2018-11-06 15:40     ` Ludovic Courtès
2018-11-07  9:39       ` Mathieu Othacehe
2018-10-28 12:40   ` Mathieu Othacehe [this message]
2018-11-06 15:43     ` [bug#33186] [PATCH 7/7] gnu: python-3.6: Disable congestion test Ludovic Courtès
2018-11-06 15:59       ` Marius Bakke
2018-11-06 16:29         ` Gábor Boskovits
2018-11-27 10:27         ` bug#33186: " Ludovic Courtès
2018-11-06 15:34   ` [bug#33186] [PATCH 1/7] gnu: Add guile-newt Ludovic Courtès
2018-11-07  9:12     ` Mathieu Othacehe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181028124043.21773-8-m.othacehe@gmail.com \
    --to=m.othacehe@gmail.com \
    --cc=33186@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.