[New-bugs-announce] [issue5494] Failure in test_httpservers on Linux

Ger Luijten report at bugs.python.org
Sun Mar 15 14:42:07 CET 2009


New submission from Ger Luijten <gcjm.luijten at gmail.com>:

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
server.py script in verbose mode it turned up an error in the
regrtest.py script. 
Manually running the server.py 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 server.py is trying to
access for which it says to have no rights.

This error was listed 3 times:

test_httpservers                                                       
                                                    
Traceback (most recent call last):                                     
                                                    
  File
"/home/ger/Systeembeheer/Python/Python_Packages/Python-3.1a1/Lib/http/server.py",
line 1031, in run_cgi              
OSError: [Errno 13] Permission denied                                  
                                                                       
                                                               
test test_httpservers failed -- errors occurred; run in verbose mode for
details  

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

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

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


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

When directly running the server.py 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 server.py
Serving HTTP on 0.0.0.0 port 8000 ...
^CTraceback (most recent call last):
  File "server.py", line 1101, in <module>
    test(HandlerClass=BaseHTTPRequestHandler)
  File "server.py", line 1097, in test
    httpd.serve_forever()
  File "/usr/local/lib/python3.1/socketserver.py", line 224, in
serve_forever
    r, w, e = select.select([self], [], [], poll_interval)
KeyboardInterrupt

----------
components: Tests
messages: 83631
nosy: gerluijten
severity: normal
status: open
title: Failure in test_httpservers on Linux
type: crash
versions: Python 3.1

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5494>
_______________________________________


More information about the New-bugs-announce mailing list