Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
[3.11] gh-102795: Fix use of poll in test_epoll's test_control_and_wait (GH-102796)#104173
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
pythonGH-102796)This test can fail unnecessarily. In the test we wait for events on twofile 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 viapoll() and the next via a subsequent call to poll(). This rarelyhappens, but it can cause the test to fail despite properly functioningpolling.Instead, we poll a second time when necessary.(cherry picked from commitc9ecd3e)Co-authored-by: Kevin Krakauer <kevinGC@users.noreply.github.com>
vstinner left a comment
There was a problem hiding this 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 commentedMay 6, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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. |
Uh oh!
There was an error while loading.Please reload this page.
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 commitc9ecd3e)
Co-authored-by: Kevin KrakauerkevinGC@users.noreply.github.com