From ca6db4fdae9e2a7369502218b46b03c2624a0836 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Wed, 16 Jul 2025 17:54:04 +0200 Subject: [PATCH] [3.14] gh-127146: Emscripten: more regular stack overflow skips (GH-136708) (#136712) Makes the Emscripten stack overflow skip message consistent with WASI, and replaces some ad-hoc skips. (cherry picked from commit c730952aa64b790c75c437cb63a1242dc08c2e97) Co-authored-by: Hood Chatham --- Lib/test/support/__init__.py | 2 +- Lib/test/test_descr.py | 2 +- Lib/test/test_xml_etree_c.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index ce18518bb8aa..001ecec4dcd4 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -570,7 +570,7 @@ is_emscripten = sys.platform == "emscripten" is_wasi = sys.platform == "wasi" def skip_emscripten_stack_overflow(): - return unittest.skipIf(is_emscripten, "Exhausts limited stack on Emscripten") + return unittest.skipIf(is_emscripten, "Exhausts stack on Emscripten") def skip_wasi_stack_overflow(): return unittest.skipIf(is_wasi, "Exhausts stack on WASI") diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index ea076ba4fef2..d420f097e747 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -3942,7 +3942,7 @@ class ClassPropertiesAndMethods(unittest.TestCase): # it as a leak. del C.__del__ - @unittest.skipIf(support.is_emscripten, "Seems to works in Pyodide?") + @support.skip_emscripten_stack_overflow() @support.skip_wasi_stack_overflow() def test_slots_trash(self): # Testing slot trash... diff --git a/Lib/test/test_xml_etree_c.py b/Lib/test/test_xml_etree_c.py index 9ed0f4096a45..270b9d6da8e7 100644 --- a/Lib/test/test_xml_etree_c.py +++ b/Lib/test/test_xml_etree_c.py @@ -58,7 +58,7 @@ class MiscTests(unittest.TestCase): self.assertEqual(element.attrib, {'A': 'B', 'C': 'D'}) @support.skip_wasi_stack_overflow() - @unittest.skipIf(support.is_emscripten, "segfaults") + @support.skip_emscripten_stack_overflow() def test_trashcan(self): # If this test fails, it will most likely die via segfault. e = root = cET.Element('root') -- 2.47.3