https://github.com/python/cpython/commit/b11623759252c348755072df405271d85c1ec147
commit: b11623759252c348755072df405271d85c1ec147
branch: 3.10
author: Miss Islington (bot) <[email protected]>
committer: pablogsal <[email protected]>
date: 2024-10-22T12:11:04+01:00
summary:

[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 038b151963d9d4a5f4c852544fb5b0402ffcb218)

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

files:
M Lib/test/test_cmd_line_script.py
M Lib/test/test_subprocess.py

diff --git a/Lib/test/test_cmd_line_script.py b/Lib/test/test_cmd_line_script.py
index ccacfd606d186f..86bcafcf0e3cb3 100644
--- a/Lib/test/test_cmd_line_script.py
+++ b/Lib/test/test_cmd_line_script.py
@@ -739,6 +739,9 @@ def test_nonexisting_script(self):
         self.assertNotEqual(proc.returncode, 0)
 
     @unittest.skipUnless(os.path.exists('/dev/fd/0'), 'requires /dev/fd 
platform')
+    @unittest.skipIf(sys.platform.startswith("freebsd") and
+                     os.stat("/dev").st_dev == os.stat("/dev/fd").st_dev,
+                     "Requires fdescfs mounted on /dev/fd on FreeBSD")
     def test_script_as_dev_fd(self):
         # GH-87235: On macOS passing a non-trivial script to /dev/fd/N can 
cause
         # problems because all open /dev/fd/N file descriptors share the same
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index 139ef41e57370b..0d3afe612a3afe 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -2795,7 +2795,7 @@ def test_close_fds(self):
 
     @unittest.skipIf(sys.platform.startswith("freebsd") and
                      os.stat("/dev").st_dev == os.stat("/dev/fd").st_dev,
-                     "Requires fdescfs mounted on /dev/fd on FreeBSD.")
+                     "Requires fdescfs mounted on /dev/fd on FreeBSD")
     def test_close_fds_when_max_fd_is_lowered(self):
         """Confirm that issue21618 is fixed (may fail under valgrind)."""
         fd_status = support.findfile("fd_status.py", subdir="subprocessdata")

_______________________________________________
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