Repository navigation
UDPLITE tests fail on android #83032
Description
Activity
Attached test_socket.txt is the output of running 'python -m test -v test_socket' on android API 24. The 108 tests in error are UDPLITE tests introduced in issue bpo-37345.
- added3.9 (EOL)end of lifeend of lifetestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Nov 19, 2019 Not interested anymore in android stuff.
Also, isn't this just a permissions error? I wouldn't think that would indicate a failure of the feature, but instead one of the testing environment.
On December 10, 2019 7:47:10 AM UTC, Xavier de Gaye <report@bugs.python.org> wrote:
Xavier de Gaye <xdegaye@gmail.com> added the comment:
Not interested anymore in android stuff.
----------
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue38851\>
Also, isn't this just a permissions error? I wouldn't think that would indicate a failure of the feature, but instead one of the testing environment.
Yes, this was probably caused by running the tests within an app which didn't have the INTERNET permission. With the permission present, I've confirmed that the UDPLITE tests all pass on the current main branch.
@encukou: So I think this issue can be closed.
Actually, I can reproduce this now on API level 21:
18:03:27.410 python.stdout I testRecvFrom (test.test_socket.BasicUDPLITETest.testRecvFrom) ... 18:03:27.404 .python.testbed W type=1400 audit(0.0:379): avc: denied { node_bind } for saddr=127.0.0.1 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:node:s0 tclass=rawip_socket permissive=0 18:03:27.413 python.stdout I ERROR ... 18:04:00.887 python.stdout I ====================================================================== 18:04:00.887 python.stdout I ERROR: testRecvFrom (test.test_socket.BasicUDPLITETest.testRecvFrom) 18:04:00.887 python.stdout I ---------------------------------------------------------------------- 18:04:00.887 python.stdout I Traceback (most recent call last): 18:04:00.887 python.stdout I File "/data/data/org.python.testbed/files/python/lib/python3.13/test/test_socket.py", line 389, in _setUp 18:04:00.887 python.stdout I self.__setUp() 18:04:00.887 python.stdout I ~~~~~~~~~~~~^^ 18:04:00.887 python.stdout I File "/data/data/org.python.testbed/files/python/lib/python3.13/test/test_socket.py", line 246, in setUp 18:04:00.887 python.stdout I self.port = socket_helper.bind_port(self.serv) 18:04:00.887 python.stdout I ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ 18:04:00.887 python.stdout I File "/data/data/org.python.testbed/files/python/lib/python3.13/test/support/socket_helper.py", line 116, in bind_port 18:04:00.887 python.stdout I sock.bind((host, 0)) 18:04:00.887 python.stdout I ~~~~~~~~~^^^^^^^^^^^ 18:04:00.887 python.stdout I PermissionError: [Errno 13] Permission denied"avc" is an SELinux log message, so it looks like UDPLITE is blocked on older versions of Android. I'll update #116674 to deal with this.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields: