]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-145335: Skip Emscripten for os.execve() test (#145528)
authorHood Chatham <roberthoodchatham@gmail.com>
Thu, 5 Mar 2026 11:29:34 +0000 (12:29 +0100)
committerGitHub <noreply@github.com>
Thu, 5 Mar 2026 11:29:34 +0000 (12:29 +0100)
Emscripten's os.execve() always fails with ENOEXEC.

Co-authored-by: Victor Stinner <vstinner@python.org>
Lib/test/test_os/test_os.py

index 3cab8ff9536d232d631e9f0937f80507ac88b98b..06f69caad12bc8bac5865e6f7336658301b80fd0 100644 (file)
@@ -2824,7 +2824,8 @@ class TestInvalidFD(unittest.TestCase):
                     func(*args)
                 self.assertEqual(ctx.exception.errno, errno.EBADF)
 
-        if hasattr(os, "execve") and os.execve in os.supports_fd:
+        if (hasattr(os, "execve") and os.execve in os.supports_fd
+            and support.has_subprocess_support):
             # glibc fails with EINVAL, musl fails with EBADF
             with self.assertRaises(OSError) as ctx:
                 os.execve(fd, [sys.executable, "-c", "pass"], os.environ)