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

Created on 2017-01-06 19:48 by xdegaye, last changed 2017-02-03 18:44 by xdegaye.

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
Messages (3)
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.
History
Date User Action Args
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