forked from smpeters/net-ping
-
Notifications
You must be signed in to change notification settings - Fork 14
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
ICMP tests fail in a rootless podman container because ($> == 0) != isRoot #32
Labels
Comments
NO_NETWORK_TESTING=1 should cover that |
Aha. Thanks, I was looking only at the code bundled in Perl 5.36.0; my apologies. I ran the tests for Net::Ping 2.75 in a rootless podman container (Debian 11, but it shouldn't matter), with the following results; there seem to be a couple of corner cases left in the NO_NETWORK_TESTING support:
|
The fix for GH #33 (v2.76) will probably fix that |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On Linux
Net::Ping
uses$> == 0
to determine if the user is root, and therefore is able to use icmp. However, while in a podman rootless container (and also possibly a docker rootless container, but $work doesn't give me access to that),$> == 0
, but as it's not really running as root, icmp doesn't work, and the various tests which require icmp fail.Normally I'd just force install Net::Ping, but Perl bundles it and this behavior breaks the Perl build.
The logic to figure out if the test is running in a rootless container seems to be very ad hoc and unstable, so I can't suggest a proper fix. One workaround would be to introduce an environment variable to be used during testing to avoid the ICMP checks regardless of the value of
$>
The text was updated successfully, but these errors were encountered: