diff mbox series

[meta-openembedded,walnascar] python3-m2crypto: fix test_IP_call

Message ID 20251012100138.1014334-1-haixiao.yan.cn@windriver.com
State New
Headers show
Series [meta-openembedded,walnascar] python3-m2crypto: fix test_IP_call | expand

Commit Message

Yan, Haixiao (CN) Oct. 12, 2025, 10:01 a.m. UTC
From: Haixiao Yan <haixiao.yan.cn@windriver.com>

Fix the following test hang:

test_IP_call (tests.test_ssl.HttpslibSSLSNIClientTestCase.test_IP_call)
...

Signed-off-by: Haixiao Yan <haixiao.yan.cn@windriver.com>
---
 ...01-tests-Don-t-pass-debug-to-openssl.patch | 57 +++++++++++++++++++
 .../python/python3-m2crypto_0.44.0.bb         |  1 +
 2 files changed, 58 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-m2crypto/0001-tests-Don-t-pass-debug-to-openssl.patch
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-m2crypto/0001-tests-Don-t-pass-debug-to-openssl.patch b/meta-python/recipes-devtools/python/python3-m2crypto/0001-tests-Don-t-pass-debug-to-openssl.patch
new file mode 100644
index 000000000000..2507d32912e9
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-m2crypto/0001-tests-Don-t-pass-debug-to-openssl.patch
@@ -0,0 +1,57 @@ 
+From 8bd51ee831e13412fda63c7e5ae8a74f8adc89f8 Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
+Date: Thu, 8 May 2025 18:46:37 +0200
+Subject: [PATCH] tests: Don't pass `-debug' to openssl.
+
+The HttpslibSSLSNIClientTestCase test starts "openssl s_server" as the
+server side and passes `-debug' as one of the arguments. This option
+increases the output while its content is not considered/ parsed by the
+test suite as far as I can observe.
+OpenSSL 3.5 (currently alpha) added post-quantum hybrid key agreement
+support. As part of this support keys for X25519MLKEM768 are sent during
+the client-hello phase and not just X25519. Since the keys for MLKEM768
+are large, the client-hello and server-hello messages become
+significantly bigger (since now X25519MLKEM768 is now supported on both
+sides). This in turn increases the output generated by the `-debug'
+switch.
+
+The output of `openssl s_server' is not consumed while the application
+is running but cached in the PIPE and consumed after the server has been
+terminated and the output is parsed in self.stop_server().
+Due to the big increase of the output due the additional keys the
+`test_IP_call' test stalls now because OpenSSL's write to the output
+blocks until the reader consumes it but this is not happening until
+after the tests completes. So the test stalls.
+
+The additional content generated by the `-debug' switch is not important
+for the tests. The `-msg' switch is used for hostname verification.
+
+Don't pass `-debug' to openssl.
+
+Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
+
+Bug-Debian: https://bugs.debian.org/1101045
+Fixes: https://todo.sr.ht/~mcepl/m2crypto/292
+Last-Update: 2025-03-24
+
+Upstream-Status: Backport [https://gitlab.com/m2crypto/m2crypto/-/commit/9c27fb1ebe28c2fa2a7ec850bbd716101e9ba108]
+Signed-off-by: Haixiao Yan <haixiao.yan.cn@windriver.com>
+---
+ tests/test_ssl.py | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/tests/test_ssl.py b/tests/test_ssl.py
+index d80218f3fc31..c9648ea080f6 100644
+--- a/tests/test_ssl.py
++++ b/tests/test_ssl.py
+@@ -291,7 +291,6 @@ class HttpslibSSLSNIClientTestCase(BaseSSLClientTestCase):
+             's_server',
+             '-servername',
+             srv_host,
+-            '-debug',
+             '-www',
+             '-msg',
+             '-cert',
+-- 
+2.34.1
+
diff --git a/meta-python/recipes-devtools/python/python3-m2crypto_0.44.0.bb b/meta-python/recipes-devtools/python/python3-m2crypto_0.44.0.bb
index 5afaed4cfea8..6a0adb618dd6 100644
--- a/meta-python/recipes-devtools/python/python3-m2crypto_0.44.0.bb
+++ b/meta-python/recipes-devtools/python/python3-m2crypto_0.44.0.bb
@@ -9,6 +9,7 @@  SRC_URI[sha256sum] = "384bb4cbd178ee0e74015311b7b1f9f2c377e3686e03fa070b3ec2f494
 SRC_URI += " \
            file://0001-setup.py-Make-the-cmd-available.patch \
            file://0001-timeout.py-use-qq-format-when-time_t-is-64bit-on-32b.patch \
+           file://0001-tests-Don-t-pass-debug-to-openssl.patch \
 "
 
 inherit pypi siteinfo python_setuptools_build_meta