]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
python3: fix tests on x86 (32 bit)
authorAlexander Kanavin <alex.kanavin@gmail.com>
Fri, 2 Dec 2022 16:37:38 +0000 (17:37 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 5 Dec 2022 22:28:10 +0000 (22:28 +0000)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/recipes-devtools/python/python3/0001-test_marshal.py-add-more-elements-in-test_determinis.patch [new file with mode: 0644]
meta/recipes-devtools/python/python3_3.11.0.bb

diff --git a/meta/recipes-devtools/python/python3/0001-test_marshal.py-add-more-elements-in-test_determinis.patch b/meta/recipes-devtools/python/python3/0001-test_marshal.py-add-more-elements-in-test_determinis.patch
new file mode 100644 (file)
index 0000000..9da7f94
--- /dev/null
@@ -0,0 +1,27 @@
+From 076a4f9ab06105b94c87386c0dfe17b823502a13 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Thu, 1 Dec 2022 19:02:51 +0100
+Subject: [PATCH] test_marshal.py: add more elements in test_deterministic_sets
+
+Existing elements do produce different output on x86_64, but they
+do not on x86. Let's make the data longer to ensure it differs.
+
+Upstream-Status: Submitted [https://github.com/python/cpython/pull/99935]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ Lib/test/test_marshal.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Lib/test/test_marshal.py b/Lib/test/test_marshal.py
+index aae86cc..29d95ad 100644
+--- a/Lib/test/test_marshal.py
++++ b/Lib/test/test_marshal.py
+@@ -352,7 +352,7 @@ class BugsTestCase(unittest.TestCase):
+             for elements in (
+                 "float('nan'), b'a', b'b', b'c', 'x', 'y', 'z'",
+                 # Also test for bad interactions with backreferencing:
+-                "('Spam', 0), ('Spam', 1), ('Spam', 2)",
++                "('Spam', 0), ('Spam', 1), ('Spam', 2), ('Spam', 3), ('Spam', 4), ('Spam', 5)",
+             ):
+                 s = f"{kind}([{elements}])"
+                 with self.subTest(s):
index 16a9e04cc9082d19b3e1c323f7fe4c283137b3ee..c4fa8c65cd2a4bbbfcd5b54d4da270f8e7951e76 100644 (file)
@@ -35,6 +35,7 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
            file://deterministic_imports.patch \
            file://0001-Avoid-shebang-overflow-on-python-config.py.patch \
            file://cve-2022-37460.patch \
+           file://0001-test_marshal.py-add-more-elements-in-test_determinis.patch \
            "
 
 SRC_URI:append:class-native = " \