https://github.com/python/cpython/commit/23a4e3ba3c44b423eff635672c56d614f5ea3899
commit: 23a4e3ba3c44b423eff635672c56d614f5ea3899
branch: main
author: Hood Chatham <[email protected]>
committer: vstinner <[email protected]>
date: 2026-03-05T12:29:34+01:00
summary:

gh-145335: Skip Emscripten for os.execve() test (#145528)

Emscripten's os.execve() always fails with ENOEXEC.

Co-authored-by: Victor Stinner <[email protected]>

files:
M Lib/test/test_os/test_os.py

diff --git a/Lib/test/test_os/test_os.py b/Lib/test/test_os/test_os.py
index 3cab8ff9536d23..06f69caad12bc8 100644
--- a/Lib/test/test_os/test_os.py
+++ b/Lib/test/test_os/test_os.py
@@ -2824,7 +2824,8 @@ def test_negative_fd_ebadf(self, fd):
                     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)

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to