Skip test_subprocess test_close_fds_when_max_fd_is_lowered on FreeBSD

when fdescfs is not mounted on /dev/fd.
This commit is contained in:
Gregory P. Smith 2014-06-01 15:27:28 -07:00
parent 8fed4deb44
commit d04f699498
1 changed files with 3 additions and 0 deletions

View File

@ -1927,6 +1927,9 @@ class POSIXProcessTestCase(BaseTestCase):
self.assertIn(1, remaining_fds, "Subprocess failed") self.assertIn(1, remaining_fds, "Subprocess failed")
@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_close_fds_when_max_fd_is_lowered(self): def test_close_fds_when_max_fd_is_lowered(self):
"""Confirm that issue21618 is fixed (may fail under valgrind).""" """Confirm that issue21618 is fixed (may fail under valgrind)."""
fd_status = support.findfile("fd_status.py", subdir="subprocessdata") fd_status = support.findfile("fd_status.py", subdir="subprocessdata")