Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bpo-41818: Close file descriptors in test_openpty #24119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 19, 2021

Conversation

encukou
Copy link
Member

@encukou encukou commented Jan 5, 2021

When stdin is a TTY, the test added in commit c13d899
is expected to fail. However, when it failed, it did not close
its file descriptors. This is flagged by the refleak tests (but
only when stdin is a TTY, which doesn't seem to be the case on CI).

https://bugs.python.org/issue41818

When stdin is a TTY, the test added in commit c13d899
is expected to fail. However, when it failed, it did not close
its file descriptors. This is flagged by the refleak tests (but
only when stdin is a TTY, which doesn't seem to be the case on CI).
@encukou

This comment has been minimized.

@8vasu
Copy link
Contributor

8vasu commented Jan 5, 2021

@encukou can you please check my request in the python issue?

@encukou
Copy link
Member Author

encukou commented Jan 12, 2021

The comment there was:

That test was created by modifying an existing test which already had that issue; it is documented in a comment by user nnorwitz in the file. If your solution resolves the problem for all the tests in "class PtyTest", then can you please also remove that comment?

I'm not that concerned about failing tests leaking – leak checks are run with the tests, so if tests fail, leaking doesn't really matter.
But test_openpty is sometimes expected to fail, and in that case, the test suite succeeded but leaked.

Anyway, I've modified the other tests and removed the comment.

@zware zware added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jan 12, 2021
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @zware for commit 494fd7b 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jan 12, 2021
@encukou
Copy link
Member Author

encukou commented Jan 19, 2021

There's a failure in test_curses, test timeout in test_asyncio, and ... a BuildBot error, it seems.
bpo-41701 makes these issues quite hard to investigate, but it looks like they're not related to this PR.

@encukou encukou merged commit 65cf1ad into python:master Jan 19, 2021
@encukou encukou deleted the pty_refleak branch January 19, 2021 13:03
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
When stdin is a TTY, the test added in commit c13d899
is expected to fail. However, when it failed, it did not close
its file descriptors. This is flagged by the refleak tests (but
only when stdin is a TTY, which doesn't seem to be the case on CI).
@8vasu 8vasu mannequin mentioned this pull request May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants