Skip to content

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented May 4, 2023

This test can fail unnecessarily. In the test we wait for events on two
file descriptors. This is done in a single call to select.epoll's poll()
function. However, it is valid for the OS to return only one event via
poll() and the next via a subsequent call to poll(). This rarely
happens, but it can cause the test to fail despite properly functioning
polling.

Instead, we poll a second time when necessary.
(cherry picked from commit c9ecd3e)

Co-authored-by: Kevin Krakauer [email protected]

pythonGH-102796)

This test can fail unnecessarily. In the test we wait for events on two
file descriptors. This is done in a single call to select.epoll's poll()
function. However, it is valid for the OS to return only one event via
poll() and the next via a subsequent call to poll(). This rarely
happens, but it can cause the test to fail despite properly functioning
polling.

Instead, we poll a second time when necessary.
(cherry picked from commit c9ecd3e)

Co-authored-by: Kevin Krakauer <[email protected]>
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good bot

@vstinner
Copy link
Member

vstinner commented May 6, 2023

Oh, Python 3.11 tets.support doesn't have busy_wait(). I added it to Python 3.12. I don't think that this very specific test enhancement is needed for 3.11. It's an old test.

@vstinner vstinner closed this May 6, 2023
@miss-islington miss-islington deleted the backport-c9ecd3e-3.11 branch May 6, 2023 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting merge tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants