[issue35794] test_posix.py test failure

2019-01-21 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks for the quickfix Pablo ;-)

--

___
Python tracker 

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



[issue35794] test_posix.py test failure

2019-01-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset e9b185f2a493cc54f0d49eac44bf21e8d7de2990 by Pablo Galindo in 
branch 'master':
bpo-35794: Catch PermissionError in test_no_such_executable (GH-11635)
https://github.com/python/cpython/commit/e9b185f2a493cc54f0d49eac44bf21e8d7de2990


--

___
Python tracker 

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



[issue35794] test_posix.py test failure

2019-01-21 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue35794] test_posix.py test failure

2019-01-21 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

> Test with os.posix_spawn() is fine:

Indeed, the difference between posix_spawn() and posix_spawnp() is that only 
the latter uses $PATH to look up the executable.

--

___
Python tracker 

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



[issue35794] test_posix.py test failure

2019-01-21 Thread STINNER Victor


STINNER Victor  added the comment:

To be clear, only os.posix_spawnp() (with "P") fails:

$ PATH=/root ./python -m test -v test_posix 
...
ERROR: test_no_such_executable (test.test_posix.TestPosixSpawnP)
--
Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/Lib/test/test_posix.py", line 1522, 
in test_no_such_executable
pid = self.spawn_func(no_such_executable,
PermissionError: [Errno 13] Permission denied: 'no_such_executable'


Test with os.posix_spawn() is fine:

$ PATH=/root ./python -m test -v test_posix -m 
test.test_posix.TestPosixSpawn.test_no_such_executable
...
test_no_such_executable (test.test_posix.TestPosixSpawn) ... ok
...
Tests result: SUCCESS

--

___
Python tracker 

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



[issue35794] test_posix.py test failure

2019-01-21 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch, patch
pull_requests: +11404, 11405
stage:  -> patch review

___
Python tracker 

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



[issue35794] test_posix.py test failure

2019-01-21 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +11404
stage:  -> patch review

___
Python tracker 

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



[issue35794] test_posix.py test failure

2019-01-21 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch, patch, patch
pull_requests: +11404, 11405, 11406
stage:  -> patch review

___
Python tracker 

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



[issue35794] test_posix.py test failure

2019-01-21 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +vstinner

___
Python tracker 

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



[issue35794] test_posix.py test failure

2019-01-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I think that test should check for PermissionError as well.

--

___
Python tracker 

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



[issue35794] test_posix.py test failure

2019-01-21 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

It's a relatively old Gentoo GNU/Linux system:

Linux tamiyo 3.17.7-gentoo #2 SMP PREEMPT Fri Dec 23 18:13:49 CET 2016 x86_64 
Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz GenuineIntel GNU/Linux

The problem occurs when there are directories on $PATH which are not 
accessible. For example, I can reproduce this as follows:

$ env PATH="/root" no_such_executable
env: no_such_executable: Permission denied

> Is the only test that fails?

At least it's the only test related to posix_spawnp() which fails.

--
versions: +Python 3.8

___
Python tracker 

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



[issue35794] test_posix.py test failure

2019-01-21 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
components: +Tests

___
Python tracker 

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



[issue35794] test_posix.py test failure

2019-01-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Hi,

Thank you for opening the issue. Without providing more information we cannot 
help debugging the issue. Can you provide more information like what is your 
system, What OS, version of python, architecture...etc

Is the only test that fails?

--
nosy: +pablogsal

___
Python tracker 

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



[issue35794] test_posix.py test failure

2019-01-21 Thread Jeroen Demeyer


New submission from Jeroen Demeyer :

This test was recently added (PR 6332):

def test_no_such_executable(self):
no_such_executable = 'no_such_executable'
try:
pid = posix.posix_spawn(no_such_executable,
[no_such_executable],
os.environ)
except FileNotFoundError as exc:
self.assertEqual(exc.filename, no_such_executable)

On my system, it fails with

PermissionError: [Errno 13] Permission denied: 'no_such_executable'

--
messages: 334123
nosy: jdemeyer
priority: normal
severity: normal
status: open
title: test_posix.py test failure

___
Python tracker 

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