-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Description
Tests for ping are failing on Ubuntu hosts.
Details
________________________ [doctest] jaraco.net.icmp.ping ________________________
010
011 Send an ICMP Echo request to a host and return how long it takes.
012
013 Raise socket.timeout if no response is received within timeout.
014
015 >>> ping('127.0.0.1')
UNEXPECTED EXCEPTION: SocketPermissionError('A prior configuration of your OS is required to use ICMP sockets without root privileges. Read more on https://github.com/ValentinBELYN/icmplib')
Traceback (most recent call last):
File "/home/runner/work/jaraco.net/jaraco.net/.tox/py/lib/python3.11/site-packages/icmplib/sockets.py", line 88, in __init__
self._sock = self._create_socket(
^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/jaraco.net/jaraco.net/.tox/py/lib/python3.11/site-packages/icmplib/sockets.py", line 486, in _create_socket
return socket.socket(
^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/socket.py", line 232, in __init__
_socket.socket.__init__(self, family, type, proto, fileno)
PermissionError: [Errno 13] Permission denied
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/doctest.py", line 1355, in __run
exec(compile(example.source, filename, "single",
File "<doctest jaraco.net.icmp.ping[0]>", line 1, in <module>
File "/home/runner/work/jaraco.net/jaraco.net/jaraco/net/icmp.py", line 23, in ping
host = icmplib.ping(dest_addr, count=1, timeout=timeout, privileged=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/jaraco.net/jaraco.net/.tox/py/lib/python3.11/site-packages/icmplib/ping.py", line 141, in ping
with _Socket(source, privileged) as sock:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/jaraco.net/jaraco.net/.tox/py/lib/python3.11/site-packages/icmplib/sockets.py", line 97, in __init__
raise SocketPermissionError(privileged)
icmplib.exceptions.SocketPermissionError: A prior configuration of your OS is required to use ICMP sockets without root privileges. Read more on https://github.com/ValentinBELYN/icmplib
/home/runner/work/jaraco.net/jaraco.net/jaraco/net/icmp.py:15: UnexpectedException
The last successful run was 5 months ago.
I suspect the Ubuntu-latest image has changed and is misconfigured to disallow ping packets.
Metadata
Metadata
Assignees
Labels
No labels