Skip to content

Commit 9d93f19

Browse files
hoodmanevstinner
authored andcommitted
pythongh-145335: Skip Emscripten for os.execve() test (python#145528)
Emscripten's os.execve() always fails with ENOEXEC. Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent a56065d commit 9d93f19

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/test/test_os/test_os.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2824,7 +2824,8 @@ def test_negative_fd_ebadf(self, fd):
28242824
func(*args)
28252825
self.assertEqual(ctx.exception.errno, errno.EBADF)
28262826

2827-
if hasattr(os, "execve") and os.execve in os.supports_fd:
2827+
if (hasattr(os, "execve") and os.execve in os.supports_fd
2828+
and support.has_subprocess_support):
28282829
# glibc fails with EINVAL, musl fails with EBADF
28292830
with self.assertRaises(OSError) as ctx:
28302831
os.execve(fd, [sys.executable, "-c", "pass"], os.environ)

0 commit comments

Comments
 (0)