gh-100005: Skip test_script_as_dev_fd() on FreeBSD (GH-100006) · python/cpython@5533cf6

GitHub

Original file line numberDiff line numberDiff line change@@ -741,6 +741,9 @@ def test_nonexisting_script(self):

741741self.assertNotEqual(proc.returncode, 0)

[email protected](os.path.exists('/dev/fd/0'), 'requires /dev/fd platform')

[email protected](sys.platform.startswith("freebsd") and

745+os.stat("/dev").st_dev==os.stat("/dev/fd").st_dev,

746+"Requires fdescfs mounted on /dev/fd on FreeBSD")

744747deftest_script_as_dev_fd(self):

745748# GH-87235: On macOS passing a non-trivial script to /dev/fd/N can cause

746749# problems because all open /dev/fd/N file descriptors share the same

Original file line numberDiff line numberDiff line change@@ -2832,7 +2832,7 @@ def test_close_fds(self):

[email protected](sys.platform.startswith("freebsd") and

28342834os.stat("/dev").st_dev==os.stat("/dev/fd").st_dev,

2835-"Requires fdescfs mounted on /dev/fd on FreeBSD.")

2835+"Requires fdescfs mounted on /dev/fd on FreeBSD")

28362836deftest_close_fds_when_max_fd_is_lowered(self):

28372837"""Confirm that issue21618 is fixed (may fail under valgrind)."""

28382838fd_status=support.findfile("fd_status.py", subdir="subprocessdata")