Skip to content

UDPLITE tests fail on android #83032

Description

@xdegaye
mannequin
BPO 38851
Nosy @asvetlov, @gappleto97
Files
  • test_socket.txt
  • 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:

    assignee = None
    closed_at = None
    created_at = <Date 2019-11-19.19:40:49.552>
    labels = ['type-bug', 'tests', '3.9']
    title = 'UDPLITE tests fail on android'
    updated_at = <Date 2019-12-10.07:54:29.574>
    user = 'https://github.com/xdegaye'

    bugs.python.org fields:

    activity = <Date 2019-12-10.07:54:29.574>
    actor = 'xdegaye'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Tests']
    creation = <Date 2019-11-19.19:40:49.552>
    creator = 'xdegaye'
    dependencies = []
    files = ['48722']
    hgrepos = []
    issue_num = 38851
    keywords = []
    message_count = 3.0
    messages = ['356985', '358167', '358171']
    nosy_count = 2.0
    nosy_names = ['asvetlov', 'gappleto97']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'needs patch'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue38851'
    versions = ['Python 3.9']

    Activity

    1. xdegaye commented on Nov 19, 2019

      xdegayemannequin
      MannequinAuthor

      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.

    2. added
      testsTests in the Lib/test dir
      type-bugAn unexpected behavior, bug, or error
      on Nov 19, 2019
    3. xdegaye commented on Dec 10, 2019

      xdegayemannequin
      MannequinAuthor

      Not interested anymore in android stuff.

    4. gappleto97 commented on Dec 10, 2019

      gappleto97mannequin
      Mannequin

      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\>


    5. transferred this issue fromon Apr 10, 2022
    6. mhsmith commented on Feb 25, 2024

      @mhsmith
      Member

      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.

    7. mhsmith commented on Mar 13, 2024

      @mhsmith
      Member

      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.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.9 (EOL)end of lifeOS-androidtestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions