[issue29177] skip tests of test_logging when bind() raises PermissionError (non-root user on Android)

2017-01-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6bf563472ccd by Vinay Sajip in branch '3.6':
Fixes #29177: Improved resilience of logging tests which use socket servers.
https://hg.python.org/cpython/rev/6bf563472ccd

New changeset 3f324d5df0c0 by Vinay Sajip in branch 'default':
Closes #29177: Merged fix from 3.6.
https://hg.python.org/cpython/rev/3f324d5df0c0

--
nosy: +python-dev
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29177] skip tests of test_logging when bind() raises PermissionError (non-root user on Android)

2017-01-07 Thread Vinay Sajip

Vinay Sajip added the comment:

Thanks for the improvements to my patch. The 03-version looks good to me.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29177] skip tests of test_logging when bind() raises PermissionError (non-root user on Android)

2017-01-07 Thread Xavier de Gaye

Xavier de Gaye added the comment:

issue-29177-02.diff is a modified version of the previous patch that uses 
support.unlink() instead of os.remove() to handle the failure occuring for a 
non-existent file
when the test is skipped because of Permission denied. With this patch 
test_logging is ok, and test_lib2to3 runs fine after test_logging.

issue-29177-03.patch adds the following modifications to the previous patches:
  * Catch only OSError: it is better not to catch programming errors as they 
may go unnoticed when the test is skipped.
  * Report the OSError in the skip message.
  * Reduce the scope of the try clause to just the code that uses system calls.
  * The cleanup done in setUp() by the previous patch in the except clause does 
not seem to be needed as the tearDown() method is invoked when the test is 
skipped.

--
Added file: http://bugs.python.org/file46193/issue-29177-02.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29177] skip tests of test_logging when bind() raises PermissionError (non-root user on Android)

2017-01-07 Thread Xavier de Gaye

Changes by Xavier de Gaye :


Added file: http://bugs.python.org/file46194/issue-29177-03.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29177] skip tests of test_logging when bind() raises PermissionError (non-root user on Android)

2017-01-06 Thread Vinay Sajip

Vinay Sajip added the comment:

> including the SysLogHandlerTest, which wasn't reported

Sorry, I appear to have lost the ability to read :-(

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29177] skip tests of test_logging when bind() raises PermissionError (non-root user on Android)

2017-01-06 Thread Vinay Sajip

Vinay Sajip added the comment:

I've added a patch that should handle these errors (including the 
SysLogHandlerTest, which wasn't reported, but I think the same logic applies).

To simulate failure during setup, uncomment one or more of the lines which says

# raise ValueError('dummy error raised')

--
assignee:  -> vinay.sajip
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file46180/issue-29177-01.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29177] skip tests of test_logging when bind() raises PermissionError (non-root user on Android)

2017-01-06 Thread Xavier de Gaye

Xavier de Gaye added the comment:

> Do you want to take this on, or do you want me to look at it?

I would be very grateful if you would handle that :)
But if you cannot spare the time, I can give it a try.
One point I forgot to mention is that DatagramHandlerTest and SysLogHandlerTest 
also fail with PermissionError when run as their subclass 
UnixDatagramHandlerTest (resp. UnixSysLogHandlerTest).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29177] skip tests of test_logging when bind() raises PermissionError (non-root user on Android)

2017-01-06 Thread Xavier de Gaye

Xavier de Gaye added the comment:

I have split this issue, issue 29184 is for fixing the tests on 
test_socketserver and this issue is for fixing the tests on test_logging.

--
assignee: xdegaye -> 
title: skip tests using socketserver.UnixStreamServer when bind() raises 
PermissionError -> skip tests of test_logging when bind() raises 
PermissionError (non-root user on Android)

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com