-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
gh-109015: Add test.support.socket_helper.tcp_blackhole() #109016
Conversation
vstinner
commented
Sep 6, 2023
•
edited by bedevere-bot
Loading
edited by bedevere-bot
- Issue: test_asyncio, test_imaplib and test_socket fail with FreeBSD TCP blackhole #109015
8f3344f
to
57f552a
Compare
57f552a
to
e8e8711
Compare
I validated my fix on Cirrus-CI with this patch:
test_asyncio failed at the first version of my PR, which proves that the Cirrus-CI did its job: test my fix :-) I had to skip 2 more tests in test_asyncio. At the second version, it passed: cc @emaste |
My second patch adds skips to Lib/test/test_asyncio/test_events.py:
|
e8e8711
to
2737a22
Compare
I reverted the Cirrus CI change. |
Skip test_asyncio, test_imaplib and test_socket tests if FreeBSD TCP blackhole is enabled (net.inet.tcp.blackhole=2).
7b7469c
to
43499b7
Compare
Lib/test/support/socket_helper.py
Outdated
except KeyError: | ||
pass | ||
|
||
cmd = ['sysctl', name] |
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.
sysctl provides a -n
arg to suppress the name:
$ sysctl -n net.inet.tcp.blackhole
0
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.
Interesting, I didn't know it. It's also supported by Linux (even if right now, this function is only called on FreeBSD ;-)). I updated my PR.
I ran a quick test on my latest PR:
and:
|
@emaste: Would you mind to review the updated PR? |
Lib/test/support/socket_helper.py
Outdated
return None | ||
output = proc.stdout | ||
|
||
# Parse 'net.inet.tcp.blackhole: 0\n' to get '0' |
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.
I think this comment is leftover
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
Sorry, @vstinner, I could not cleanly backport this to |
…onGH-109016) Skip test_asyncio, test_imaplib and test_socket tests if FreeBSD TCP blackhole is enabled (net.inet.tcp.blackhole=2). (cherry picked from commit a52a350) Co-authored-by: Victor Stinner <[email protected]>
GH-109041 is a backport of this pull request to the 3.12 branch. |
…on#109016) Skip test_asyncio, test_imaplib and test_socket tests if FreeBSD TCP blackhole is enabled (net.inet.tcp.blackhole=2). (cherry picked from commit a52a350)
GH-109042 is a backport of this pull request to the 3.11 branch. |