classification
Title: catch also PermissionError in tests when spawning a non existent program
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: xdegaye Nosy List: python-dev, serhiy.storchaka, xdegaye
Priority: normal Keywords: patch

Created on 2016-11-10 23:17 by xdegaye, last changed 2016-11-14 16:17 by xdegaye. This issue is now closed.

Files
File name Uploaded Description Edit
catch_PermissionError.patch xdegaye, 2016-11-10 23:17 review
Messages (3)
msg280551 - (view) Author: Xavier de Gaye (xdegaye) * (Python committer) Date: 2016-11-10 23:17
This is yet another idiosyncrasy of Android, the /sbin directory is in the $PATH of the adb shell used for running the tests on the emulator or on a device connected with usb to the build platform, and /sbin is readable and searchable only by root. For a plain user, the loop over exec_array[] in child_exec() at _posixsubprocess.c sets saved_errno to EACCES after failing to exec /sbin/some_non_existent_program.

The patch fixes these failing tests on Android API 24: test_dtrace test_shutil test_subprocess.
msg280565 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-11-11 07:26
LGTM.
msg280788 - (view) Author: Roundup Robot (python-dev) Date: 2016-11-14 16:16
New changeset 1b2b2cb8f962 by Xavier de Gaye in branch '3.6':
Issue #28662: Catch PermissionError in tests when spawning a non existent program
https://hg.python.org/cpython/rev/1b2b2cb8f962

New changeset c3f7d81d9050 by Xavier de Gaye in branch 'default':
Issue #28662: Merge 3.6
https://hg.python.org/cpython/rev/c3f7d81d9050
History
Date User Action Args
2016-11-14 16:17:38xdegayesetstatus: open -> closed
resolution: fixed
stage: commit review -> resolved
2016-11-14 16:16:17python-devsetnosy: + python-dev
messages: + msg280788
2016-11-12 11:38:54xdegayelinkissue26865 dependencies
2016-11-11 07:26:34serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg280565

assignee: xdegaye
stage: patch review -> commit review
2016-11-10 23:17:51xdegayecreate