mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #10826: Prevent sporadic failure in test_subprocess on Solaris due
to open door files.
This commit is contained in:
parent
5ed8b2c737
commit
ce58dc7b16
3 changed files with 15 additions and 19 deletions
|
@ -1156,9 +1156,6 @@ class POSIXProcessTestCase(BaseTestCase):
|
|||
|
||||
open_fds = set()
|
||||
|
||||
if support.verbose:
|
||||
print(" -- maxfd =", subprocess.MAXFD)
|
||||
|
||||
for x in range(5):
|
||||
fds = os.pipe()
|
||||
self.addCleanup(os.close, fds[0])
|
||||
|
@ -1173,10 +1170,6 @@ class POSIXProcessTestCase(BaseTestCase):
|
|||
|
||||
remaining_fds = set(map(int, output.split(b',')))
|
||||
to_be_closed = open_fds - {fd}
|
||||
# Temporary debug output for intermittent failures
|
||||
if support.verbose:
|
||||
print(" -- fds that should have been closed:", to_be_closed)
|
||||
print(" -- fds that remained open:", remaining_fds)
|
||||
|
||||
self.assertIn(fd, remaining_fds, "fd to be passed not passed")
|
||||
self.assertFalse(remaining_fds & to_be_closed,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue