public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python3.6] rawhide: Fix test_pha_required_nocert() race condition on s390x
@ 2026-09-23 18:59 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-09-23 18:59 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/python3.6
            Branch : rawhide
            Commit : bee4e939c52a07c674c323d980cb278ab2708713
            Author : Miro Hrončok <miro@hroncok.cz>
            Date   : 2026-08-12T20:58:17+02:00
            Stats  : +63/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/python3.6/c/bee4e939c52a07c674c323d980cb278ab2708713?branch=rawhide

            Log:
            Fix test_pha_required_nocert() race condition on s390x

- Fixes: rhbz#2504606

Assisted-By: Claude Opus 4.6

---
diff --git a/00493-fix-test_pha_required_nocert-race-condition.patch b/00493-fix-test_pha_required_nocert-race-condition.patch
new file mode 100644
index 0000000..48be0de
--- /dev/null
+++ b/00493-fix-test_pha_required_nocert-race-condition.patch
@@ -0,0 +1,54 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Christian Heimes <christian@python.org>
+Date: Wed, 12 Aug 2026 15:32:48 +0200
+Subject: 00493: Fix test_pha_required_nocert() race condition
+
+Backported from CPython main, combining:
+- bpo-43921: also accept EOF in post-handshake auth test (GH-25574)
+- bpo-43921: Fix test_ssl.test_pha_required_nocert() (GH-26489)
+- gh-115627: Fix ssl test_pha_required_nocert() (GH-117821)
+
+Co-authored-by: Victor Stinner <vstinner@python.org>
+---
+ Lib/test/test_ssl.py | 27 +++++++++++++++++++--------
+ 1 file changed, 19 insertions(+), 8 deletions(-)
+
+diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
+index 32854853d3..58af775710 100644
+--- a/Lib/test/test_ssl.py
++++ b/Lib/test/test_ssl.py
+@@ -3848,15 +3848,26 @@ class TestPostHandshakeAuth(unittest.TestCase):
+                                             server_hostname=hostname) as s:
+                 s.connect((HOST, server.port))
+                 s.write(b'PHA')
+-                # receive CertificateRequest
+-                self.assertEqual(s.recv(1024), b'OK\n')
+-                # send empty Certificate + Finish
+-                s.write(b'HASCERT')
+-                # receive alert
++                # test sometimes fails with EOF error. Test passes as long as
++                # server aborts connection with an error.
+                 with self.assertRaisesRegex(
+-                        ssl.SSLError,
+-                        'tlsv13 alert certificate required'):
+-                    s.recv(1024)
++                    OSError,
++                    ('certificate required'
++                     '|EOF occurred'
++                     '|Connection reset by peer'
++                     '|Broken pipe')
++                ):
++                    # receive CertificateRequest
++                    data = s.recv(1024)
++                    if not data:
++                        raise ssl.SSLError(1, "EOF occurred")
++                    self.assertEqual(data, b'OK\n')
++                    # send empty Certificate + Finish
++                    s.write(b'HASCERT')
++                    # receive alert
++                    data = s.recv(1024)
++                    if not data:
++                        raise ssl.SSLError(1, "EOF occurred")
+ 
+     def test_pha_optional(self):
+         if support.verbose:

diff --git a/python3.6.spec b/python3.6.spec
index 3bf8cee..889d2bc 100644
--- a/python3.6.spec
+++ b/python3.6.spec
@@ -955,6 +955,15 @@ Patch482: 00482-cve-2026-6100.patch
 # (cherry-picked from commit acfe02f3b05436658d92add6b168538b30f357f0)
 Patch489: 00489-openssl-3.5.7.patch
 
+# 00493 # 57d78c7216e6c9192422f834f78ef67795971e01
+# Fix test_pha_required_nocert() race condition
+#
+# Backported from CPython main, combining:
+# - bpo-43921: also accept EOF in post-handshake auth test (GH-25574)
+# - bpo-43921: Fix test_ssl.test_pha_required_nocert() (GH-26489)
+# - gh-115627: Fix ssl test_pha_required_nocert() (GH-117821)
+Patch493: 00493-fix-test_pha_required_nocert-race-condition.patch
+
 # (New patches go here ^^^)
 #
 # When adding new patches to "python" and "python3" in Fedora, EL, etc.,

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-23 18:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-23 18:59 [rpms/python3.6] rawhide: Fix test_pha_required_nocert() race condition on s390x 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox