From 3d49b3445d1547361284485b379ffd73d65b5f15 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Fri, 4 Apr 2025 17:37:12 +0200 Subject: [PATCH 1/3] gh-127146: Fix Emscripten test suite when run with -uall Emscripten large file support works fine and is required for `testZip64LargeFile` to work. And skip more stack overflows --- Lib/test/test_builtin.py | 1 + Lib/test/test_capi/test_misc.py | 2 ++ Lib/test/test_descr.py | 1 + Lib/test/test_exceptions.py | 1 + Lib/test/test_io.py | 2 +- configure | 7 ------- configure.ac | 4 ---- 7 files changed, 6 insertions(+), 12 deletions(-) diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index 27b14c36b51b50..9fd3b6284ede30 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -1104,6 +1104,7 @@ def test_filter_pickle(self): self.check_iter_pickle(f1, list(f2), proto) @support.skip_wasi_stack_overflow() + @support.skip_emscripten_stack_overflow() @support.requires_resource('cpu') def test_filter_dealloc(self): # Tests recursive deallocation of nested filter objects using the diff --git a/Lib/test/test_capi/test_misc.py b/Lib/test/test_capi/test_misc.py index 98dc3b42ef0bec..badc6ecb3e1695 100644 --- a/Lib/test/test_capi/test_misc.py +++ b/Lib/test/test_capi/test_misc.py @@ -411,10 +411,12 @@ def test_trashcan_subclass(self): for i in range(100): L = MyList((L,)) + @support.skip_emscripten_stack_overflow() @support.requires_resource('cpu') def test_trashcan_python_class1(self): self.do_test_trashcan_python_class(list) + @support.skip_emscripten_stack_overflow() @support.requires_resource('cpu') def test_trashcan_python_class2(self): from _testcapi import MyList diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index aa453e438facd5..aff2f092e94317 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -4519,6 +4519,7 @@ class Oops(object): o.whatever = Provoker(o) del o + @support.skip_emscripten_stack_overflow() @support.skip_wasi_stack_overflow() @support.requires_resource('cpu') def test_wrapper_segfault(self): diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 20c617f8108d5f..8224bc688f10e7 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -1428,6 +1428,7 @@ def g(): self.assertIsInstance(exc, RecursionError, type(exc)) self.assertIn("maximum recursion depth exceeded", str(exc)) + @support.skip_emscripten_stack_overflow() @support.skip_wasi_stack_overflow() @cpython_only @support.requires_resource('cpu') diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py index ac3b6d131e7dad..682abc63dd72ef 100644 --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -553,7 +553,7 @@ def do_test(test, obj, abilities): for [test, abilities] in tests: with self.subTest(test): if test == pipe_writer and not threading_helper.can_start_thread: - skipTest() + self.skipTest("Requires threading but threading not supported") with test() as obj: do_test(test, obj, abilities) diff --git a/configure b/configure index d7153914fe7b5e..9f4fcb401c3aae 100755 --- a/configure +++ b/configure @@ -12951,13 +12951,6 @@ if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ else have_largefile_support="no" fi -case $ac_sys_system in #( - Emscripten) : - have_largefile_support="no" - ;; #( - *) : - ;; -esac if test "x$have_largefile_support" = xyes then : diff --git a/configure.ac b/configure.ac index 4e24930662c1f8..2e3e53cd9b3688 100644 --- a/configure.ac +++ b/configure.ac @@ -3158,10 +3158,6 @@ if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ else have_largefile_support="no" fi -dnl LFS does not work with Emscripten 3.1 -AS_CASE([$ac_sys_system], - [Emscripten], [have_largefile_support="no"] -) AS_VAR_IF([have_largefile_support], [yes], [ AC_DEFINE([HAVE_LARGEFILE_SUPPORT], [1], [Defined to enable large file support when an off_t is bigger than a long From f36c496fe110add925b607ebe463683b826f7d52 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Mon, 7 Apr 2025 11:11:53 +0200 Subject: [PATCH 2/3] test_sysconfigdata_json: Allow ignored sysconfig keys to be unset --- Lib/test/test_sysconfig.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py index cc11eade2e3426..a733c6bf44261b 100644 --- a/Lib/test/test_sysconfig.py +++ b/Lib/test/test_sysconfig.py @@ -659,8 +659,8 @@ def test_sysconfigdata_json(self): ignore_keys |= {'prefix', 'exec_prefix', 'base', 'platbase', 'installed_base', 'installed_platbase'} for key in ignore_keys: - json_config_vars.pop(key) - system_config_vars.pop(key) + json_config_vars.pop(key, None) + system_config_vars.pop(key, None) self.assertEqual(system_config_vars, json_config_vars) From b96b18d8ed6418f0d2385c775cd4dd1b7d6e6335 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Mon, 7 Apr 2025 11:30:31 +0200 Subject: [PATCH 3/3] skip test_mode --- Lib/test/test_os.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 333179a71e3cdc..ddef212920c200 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -1915,6 +1915,10 @@ def test_makedir(self): 'dir5', 'dir6') os.makedirs(path) + @unittest.skipIf( + support.is_emscripten, + "Failing in the buildbot, but I can't reproduce. TODO: investigate this." + ) @unittest.skipIf( support.is_wasi, "WASI's umask is a stub." pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy