This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Failure in test_httpservers on Linux
Type: crash Stage:
Components: Tests Versions: Python 3.1
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, gerluijten
Priority: normal Keywords:

Created on 2009-03-15 13:42 by gerluijten, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg83631 - (view) Author: Ger Luijten (gerluijten) Date: 2009-03-15 13:42
Hello developers,

While running 'make test' for Python 3.1a1 there was an error reported,
obviously a permission problem, but when trying to run the reported script in verbose mode it turned up an error in the script. 
Manually running the script seems to go fine.
See my installation notes below.

Commands were issued with and without sudo in a terminal under fully
updated Kubuntu 8.10 and with no installation problems for Python 3.1a1.

Also I noticed Issue 4951 failure in test_httpserver under Windows, but
with a different kind of error message.

Greetings, Ger

$ sudo make test
Errors: 1 error reported; no idea what the script is trying to
access for which it says to have no rights.

This error was listed 3 times:

Traceback (most recent call last):                                     
line 1031, in run_cgi              
OSError: [Errno 13] Permission denied                                  
test test_httpservers failed -- errors occurred; run in verbose mode for

See the readme file for the Python installation on how to run the script
in verbose mode:
General: $ ./python Lib/test/ -v test_whatever
So go to the folder Python-3.1a1/Lib/test/
Run testscript in verbose mode: $ sudo ./ -v

No idea if this script knows the path to,
otherwise add the correct path later in testing.

This shows a programming error in the script, so a run of is not possible with this script:
  File "./", line 185
    print(msg, file=sys.stderr)
SyntaxError: invalid syntax

So let's run the script directly to see if this script crashes
or not.

When directly running the script with and without sudo it runs
with no errors, until broken off by Ctrl+C. 
The script seems to run or simulate a small webserver for tests.

Python-3.1a1/Lib/http$ sudo python3.1
Serving HTTP on port 8000 ...
^CTraceback (most recent call last):
  File "", line 1101, in <module>
  File "", line 1097, in test
  File "/usr/local/lib/python3.1/", line 224, in
    r, w, e =[self], [], [], poll_interval)
msg83661 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2009-03-17 06:54
The SyntaxError show that you are running python version 2.x.

> Run testscript in verbose mode: $ sudo ./ -v

Your sudo command is wrong:
it should specify the path to the tested python executable,
and not rely on the #! line in, which uses whatever python
is installed on your machine.

Probably something like
    sudo ../../python -v
Date User Action Args
2022-04-11 14:56:46adminsetgithub: 49744
2010-04-29 17:53:42terry.reedysetstatus: pending -> closed
2009-03-17 08:45:08amaury.forgeotdarcsetstatus: open -> pending
resolution: not a bug
2009-03-17 06:54:11amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg83661
2009-03-15 13:42:05gerluijtencreate