classification
Title: skip tests of test_socketserver when bind() raises PermissionError (non-root user on Android)
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: xdegaye
Priority: normal Keywords: patch

Created on 2017-01-06 19:48 by xdegaye, last changed 2017-11-18 17:13 by xdegaye. This issue is now closed.

Files
File name Uploaded Description Edit
test_socketserver.patch xdegaye, 2017-01-07 21:19 review
issue29184_01.patch xdegaye, 2017-01-09 19:41 review
Pull Requests
URL Status Linked Edit
PR 4387 merged xdegaye, 2017-11-13 14:38
Messages (4)
msg284845 - (view) Author: Xavier de Gaye (xdegaye) * (Python committer) Date: 2017-01-06 19:48
This happens on Android for a non-root user.  Multiple tests fail in test_socketserver with identical backtraces, only the first one is listed here.

======================================================================                    [905/2616]
ERROR: test_ForkingUnixDatagramServer (test.test_socketserver.SocketServerTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_socketserver.py", line 243, in test_Fork
ingUnixDatagramServer
    self.dgram_examine)
  File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/support/__init__.py", line 2040, in decorator
    return func(*args)
  File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_socketserver.py", line 121, in run_serve
r
    svrcls, hdlrbase)
  File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_socketserver.py", line 114, in make_serv
er
    server = MyServer(addr, MyHandler)
  File "/sdcard/org.bitbucket.pyona/lib/python3.7/socketserver.py", line 452, in __init__
    self.server_bind()
  File "/sdcard/org.bitbucket.pyona/lib/python3.7/socketserver.py", line 466, in server_bind
    self.socket.bind(self.server_address)
PermissionError: [Errno 13] Permission denied
msg284936 - (view) Author: Xavier de Gaye (xdegaye) * (Python committer) Date: 2017-01-07 21:19
Patch attached.
msg285067 - (view) Author: Xavier de Gaye (xdegaye) * (Python committer) Date: 2017-01-09 19:41
New patch following Serhiy's suggestion in msg285008.
msg306485 - (view) Author: Xavier de Gaye (xdegaye) * (Python committer) Date: 2017-11-18 17:10
New changeset 9001d1f438e968f4d327313e0a95a49f22e724f4 by xdegaye in branch 'master':
bpo-29184: Skip test_socketserver tests on PermissionError raised by Android (GH-4387)
https://github.com/python/cpython/commit/9001d1f438e968f4d327313e0a95a49f22e724f4
History
Date User Action Args
2017-11-18 17:13:50xdegayesetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2017-11-18 17:10:55xdegayesetmessages: + msg306485
2017-11-13 14:38:30xdegayesetpull_requests: + pull_request4335
2017-11-11 18:44:02xdegayesetversions: - Python 3.6
2017-02-03 18:44:47xdegayesetassignee: xdegaye ->
2017-01-09 19:41:31xdegayesetfiles: + issue29184_01.patch

messages: + msg285067
2017-01-07 21:19:58xdegayesetfiles: + test_socketserver.patch
keywords: + patch
messages: + msg284936

stage: needs patch -> patch review
2017-01-06 21:30:19xdegayelinkissue26865 dependencies
2017-01-06 19:48:57xdegayecreate