Skip to content

Commit b116237

Browse files
miss-islingtonvstinnerencukou
authored
[3.10] gh-100005: Skip test_script_as_dev_fd() on FreeBSD (GH-100006) (#125109)
gh-100005: Skip test_script_as_dev_fd() on FreeBSD (GH-100006) On FreeBSD, skip test_script_as_dev_fd() of test_cmd_line_script if fdescfs is not mounted (at /dev/fd). (cherry picked from commit 038b151) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Petr Viktorin <encukou@gmail.com>
1 parent e44b32f commit b116237

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Lib/test/test_cmd_line_script.py

+3
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,9 @@ def test_nonexisting_script(self):
739739
self.assertNotEqual(proc.returncode, 0)
740740

741741
@unittest.skipUnless(os.path.exists('/dev/fd/0'), 'requires /dev/fd platform')
742+
@unittest.skipIf(sys.platform.startswith("freebsd") and
743+
os.stat("/dev").st_dev == os.stat("/dev/fd").st_dev,
744+
"Requires fdescfs mounted on /dev/fd on FreeBSD")
742745
def test_script_as_dev_fd(self):
743746
# GH-87235: On macOS passing a non-trivial script to /dev/fd/N can cause
744747
# problems because all open /dev/fd/N file descriptors share the same

Lib/test/test_subprocess.py

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

27962796
@unittest.skipIf(sys.platform.startswith("freebsd") and
27972797
os.stat("/dev").st_dev == os.stat("/dev/fd").st_dev,
2798-
"Requires fdescfs mounted on /dev/fd on FreeBSD.")
2798+
"Requires fdescfs mounted on /dev/fd on FreeBSD")
27992799
def test_close_fds_when_max_fd_is_lowered(self):
28002800
"""Confirm that issue21618 is fixed (may fail under valgrind)."""
28012801
fd_status = support.findfile("fd_status.py", subdir="subprocessdata")

0 commit comments

Comments
 (0)