Issue 11954: 3.3 - 'make test' fails (original) (raw)
Created on 2011-04-29 12:01 by Jason.Vas.Dias, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Messages (26)
Author: Jason Vas Dias (Jason.Vas.Dias)
Date: 2011-04-29 12:01
I do :
$ hg clone http://hg.python.org/cpython
( my existing Python-2.7, following upgrade to glibc-2.13, started
producing erroneous results - see gnome.org glib bug :
https://bugzilla.gnome.org/show_bug.cgi?id=648863
So I tried downloading and building Python-2.7.1 , whose build
tests fail ( Issue #11946 ) , and was recommended to try building
latest python from HG . So I try that :
)
$ mkdir /mnt/sda3/Python-2.7 ; cd /mnt/sda3/Python-2.7
$ cat configure.sh
$ cat configure.sh
/usr/src/cpython/configure
--prefix=/usr --libdir=/usr/lib64 --enable-shared --with-pic
--with-system-ffi
--with-system-expat
--with-signal-module
--with-dbmliborder=bdb:gdbm
--with-threads
--without-pymalloc
--host=x86_64-pc-linux-gnu
--build=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu
--with-libs='-ldb-4.5 -lgdbm'
CPPFLAGS='-I/usr/include/db4 -I/usr/include/gdbm'
CC="${CC}"
CFLAGS="${CFLAGS}"
CXX="${CXX}"
CXXFLAGS="${CXXFLAGS}"
$ export -p | egrep 'CC|CXX|FLAG|LD|PATH|ARCH|ABI'
declare -x ABI="64"
declare -x ARCH="x86_64"
declare -x CC="/usr/bin/gcc"
declare -x CFLAGS="-march=x86-64 -mtune=k8 -O2 -g -fPIC -DPIC -pipe"
declare -x CXX="/usr/bin/g++"
declare -x CXXFLAGS="-march=x86-64 -mtune=k8 -O2 -g -fPIC -DPIC -pipe"
declare -x LD="/usr/bin/ld"
declare -x OLDPWD="/usr/src/cpython"
declare -x PATH=".:/bin:/usr/bin:/sbin:/usr/sbin"
$ bash -xf ./configure.sh
...
$ echo $?
0
$ make -j2 2>&1 | tee make.log
$ echo $?
0
$ make test 2>&1 | tee make.test.log
...
[ 16/354] test_argparse
test test_argparse failed -- multiple errors occurred; run in verbose mode for details
...
[146/354] test_httpservers
/usr/src/cpython/Lib/unittest/case.py:799: BytesWarning: str() on a bytes instance
(i, item1, item2))
test test_httpservers failed -- multiple errors occurred; run in verbose mode for details
[147/354] test_imaplib
[148/354] test_imp
[149/354] test_import
test test_import failed -- Traceback (most recent call last):
File "/usr/src/cpython/Lib/test/test_import.py", line 545, in test_unwritable_directory
'pycache', '{}.{}.pyc'.format(TESTFN, self.tag))))
AssertionError: True is not false
[150/354] test_importhooks [151/354] test_importlib [152/354] test_index ..[200/354] test_os test test_os failed -- Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_os.py", line 675, in test_exist_ok_existing_directory os.makedirs(path, mode=mode, exist_ok=True) File "/usr/src/cpython/Lib/os.py", line 152, in makedirs mkdir(name, mode) OSError: [Errno 17] File exists: '@test_28453_tmp/dir1'
... [237/354] test_pyexpat Fatal Python error: Segmentation fault
Traceback (most recent call first): File "/usr/src/cpython/Lib/test/test_pyexpat.py", line 591 in test1 File "/usr/src/cpython/Lib/unittest/case.py", line 391 in _executeTestPart File "/usr/src/cpython/Lib/unittest/case.py", line 446 in run File "/usr/src/cpython/Lib/unittest/case.py", line 498 in call File "/usr/src/cpython/Lib/unittest/suite.py", line 105 in run File "/usr/src/cpython/Lib/unittest/suite.py", line 67 in call File "/usr/src/cpython/Lib/unittest/suite.py", line 105 in run File "/usr/src/cpython/Lib/unittest/suite.py", line 67 in call File "/usr/src/cpython/Lib/test/support.py", line 1094 in run File "/usr/src/cpython/Lib/test/support.py", line 1182 in _run_suite File "/usr/src/cpython/Lib/test/support.py", line 1208 in run_unittest File "/usr/src/cpython/Lib/test/test_pyexpat.py", line 676 in test_main File "/usr/src/cpython/Lib/test/regrtest.py", line 1044 in runtest_inner File "/usr/src/cpython/Lib/test/regrtest.py", line 838 in runtest File "/usr/src/cpython/Lib/test/regrtest.py", line 662 in main File "/usr/src/cpython/Lib/test/regrtest.py", line 1622 in make: *** [test] Segmentation fault ...
Any suggestions for a python source HG commit or tarball that will pass its 'make test' on a Linux x86_64 platform ?
Am I doing something wrong here ?
I don't like having to pass '-I/usr/include/db4' '-ldb-4.5', but when one has both libdb-5.1 installed with 'libdb.so' linking to it, and /usr/include/db being from libdb-5.1, what else to do ?
Come to think of it, why must python force me to enable any DB* modules at all ? And why must the whole python executable require linking with berkeley DB when only the bsddb DL module need do so ?
Author: Jason Vas Dias (Jason.Vas.Dias)
Date: 2011-04-29 12:12
my expat was just built a few weeks ago from expat-2.0.1.tar.gz:
$ ls -l /usr/lib64/libexpat* -rw-r--r-- 1 root root 577052 Apr 8 21:52 /usr/lib64/libexpat.a lrwxrwxrwx 1 root root 17 Apr 8 21:52 /usr/lib64/libexpat.so -> libexpat.so.1.5.2 lrwxrwxrwx 1 root root 28 Dec 3 17:37 /usr/lib64/libexpat.so.0 -> /usr/lib64/libexpat.so.1.5.2 lrwxrwxrwx 1 root root 17 Apr 8 21:52 /usr/lib64/libexpat.so.1 -> libexpat.so.1.5.2 -rwxr-xr-x 1 root root 387709 Apr 8 21:52 /usr/lib64/libexpat.so.1.5.2
Author: Jason Vas Dias (Jason.Vas.Dias)
Date: 2011-04-29 12:15
suspect cause #1 - bad system libffi ? I just built it, but :
$ ls -l /usr/lib64/libffi* -rwxr-xr-x 1 root root 36839 May 25 2008 /usr/lib64/libffi-2.00-beta.so -rw-r--r-- 1 root root 201320 Apr 8 03:46 /usr/lib64/libffi.a lrwxrwxrwx 1 root root 15 Apr 8 03:50 /usr/lib64/libffi.so -> libffi.so.4.0.1 lrwxrwxrwx 1 root root 15 Apr 8 03:50 /usr/lib64/libffi.so.4 -> libffi.so.4.0.1 -rwxr-xr-x 1 root root 134245 Apr 8 03:46 /usr/lib64/libffi.so.4.0.1 lrwxrwxrwx 1 root root 16 Jan 1 10:49 /usr/lib64/libffi.so.5 -> libffi.so.5.0.10 -rwxr-xr-x 1 root root 31520 Jan 1 10:49 /usr/lib64/libffi.so.5.0.10
/usr/lib64/libffi-3.0.6: total 4 drwxr-xr-x 2 root root 4096 Nov 13 2008 include
/usr/lib64/libffi-3.0.9: total 4 drwxr-xr-x 2 root root 4096 Jan 1 10:49 include
Author: Jason Vas Dias (Jason.Vas.Dias)
Date: 2011-04-29 12:33
$ ls -l /usr/lib64/libffi* -rwxr-xr-x 1 root root 36839 May 25 2008 /usr/lib64/libffi-2.00-beta.so -rw-r--r-- 1 root root 193480 Apr 29 13:22 /usr/lib64/libffi.a -rwxr-xr-x 1 root root 904 Apr 29 13:22 /usr/lib64/libffi.la lrwxrwxrwx 1 root root 15 Apr 29 13:22 /usr/lib64/libffi.so -> libffi.so.6.0.0 lrwxrwxrwx 1 root root 15 Apr 8 03:50 /usr/lib64/libffi.so.4 -> libffi.so.4.0.1 -rwxr-xr-x 1 root root 134245 Apr 8 03:46 /usr/lib64/libffi.so.4.0.1 lrwxrwxrwx 1 root root 16 Jan 1 10:49 /usr/lib64/libffi.so.5 -> libffi.so.5.0.10 -rwxr-xr-x 1 root root 31520 Jan 1 10:49 /usr/lib64/libffi.so.5.0.10 lrwxrwxrwx 1 root root 15 Apr 29 13:22 /usr/lib64/libffi.so.6 -> libffi.so.6.0.0 -rwxr-xr-x 1 root root 129109 Apr 29 13:22 /usr/lib64/libffi.so.6.0.0
/usr/lib64/libffi-3.0.10rc9: total 4 drwxr-xr-x 2 root root 4096 Apr 29 13:22 include
NO - STILL FAILS :
$ make test 2>&1 | tee make.test.log
running build
running build_ext
building dbm using bdb
running build_scripts
copying and adjusting /usr/src/cpython/Tools/scripts/pydoc3 -> build/scripts-3.3
copying and adjusting /usr/src/cpython/Tools/scripts/idle3 -> build/scripts-3.3
copying and adjusting /usr/src/cpython/Tools/scripts/2to3 -> build/scripts-3.3
changing mode of build/scripts-3.3/pydoc3 from 644 to 755
changing mode of build/scripts-3.3/idle3 from 644 to 755
changing mode of build/scripts-3.3/2to3 from 644 to 755
renaming build/scripts-3.3/pydoc3 to build/scripts-3.3/pydoc3.3
renaming build/scripts-3.3/idle3 to build/scripts-3.3/idle3.3
renaming build/scripts-3.3/2to3 to build/scripts-3.3/2to3-3.3
LD_LIBRARY_PATH=/mnt/sda3/Python-2.7: ./python -E -c 'import sys ; from sysconfig import get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform
find /usr/src/cpython/Lib -name '*.py[co]' -print | xargs rm -f
LD_LIBRARY_PATH=/mnt/sda3/Python-2.7: ./python -Wd -E -bb /usr/src/cpython/Lib/test/regrtest.py -l
== CPython 3.3a0 (default:1768fed3aedb, Apr 29 2011, 13:27:16) [GCC 4.6.0]
== Linux-2.6.38.2-jvd-x86_64-with-gentoo-1.12.13 little-endian
== /usr/src/cpython/build/test_python_15034
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=1, verbose=0, bytes_warning=2, quiet=0)
[ 1/354] test_grammar
[ 2/354] test_opcodes
[ 3/354] test_dict
[ 4/354] test_builtin
[ 5/354] test_exceptions
[ 6/354] test_types
[ 7/354] test_unittest
[ 8/354] test_doctest
[ 9/354] test_doctest2
[ 10/354] test___all__
[ 11/354] test___future__
[ 12/354] test__locale
[ 13/354] test_abc
[ 14/354] test_abstract_numbers
[ 15/354] test_aifc
[ 16/354] test_argparse
test test_argparse failed -- multiple errors occurred; run in verbose mode for details
gee, I'm glad to hear 'make test' has a verbose mode - don't suppose you could let me know how to invoke it in that message ? I guess 'make test V=1' ??
Author: Jason Vas Dias (Jason.Vas.Dias)
Date: 2011-04-29 12:37
no, 'make test V=1' still fails with 'run in verbose mode for details' . does it mean 'make test verbose=1' ? 'make test mode=verbose' ?
Author: Jason Vas Dias (Jason.Vas.Dias)
Date: 2011-04-29 12:45
OK, so getting out strace shows I need to do :
$ LD_LIBRARY_PATH=pwd
LD_PRELINK=pwd
/libpython3.3.so.1.0 ./python -Wd -E -bb /usr/src/cpython/Lib/test/regrtest.py -l -v 2>&1 | tee make.test.verbose.log
I'll show the failures from the above command when it has completed .
Author: Jason Vas Dias (Jason.Vas.Dias)
Date: 2011-04-29 12:52
[ 16/354] test_argparse ... # all ok up to: test_wb_1 (test.test_argparse.TestFileTypeRepr) ... ok test_failures_many_groups_listargs (test.test_argparse.TestFileTypeW) ... FAIL test_failures_many_groups_sysargs (test.test_argparse.TestFileTypeW) ... FAIL test_failures_no_groups_listargs (test.test_argparse.TestFileTypeW) ... FAIL test_failures_no_groups_sysargs (test.test_argparse.TestFileTypeW) ... FAIL test_failures_one_group_listargs (test.test_argparse.TestFileTypeW) ... FAIL test_failures_one_group_sysargs (test.test_argparse.TestFileTypeW) ... FAIL test_successes_many_groups_listargs (test.test_argparse.TestFileTypeW) ... ok ... test_successes_one_group_sysargs (test.test_argparse.TestTypeUserDefined) ... test test_argparse failed -- multiple errors occurred ok
====================================================================== FAIL: test_failures_many_groups_listargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
====================================================================== FAIL: test_failures_many_groups_sysargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
====================================================================== FAIL: test_failures_no_groups_listargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
====================================================================== FAIL: test_failures_no_groups_sysargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
====================================================================== FAIL: test_failures_one_group_listargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
====================================================================== FAIL: test_failures_one_group_sysargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
Ran 1608 tests in 6.725s
FAILED (failures=6) [ 17/354] test_array
Author: Jason Vas Dias (Jason.Vas.Dias)
Date: 2011-04-29 12:54
test_successes_one_group_sysargs (test.test_argparse.TestTypeUserDefined) ... test test_argparse failed -- multiple errors occurred ok
====================================================================== FAIL: test_failures_many_groups_listargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
====================================================================== FAIL: test_failures_many_groups_sysargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
====================================================================== FAIL: test_failures_no_groups_listargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
====================================================================== FAIL: test_failures_no_groups_sysargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
====================================================================== FAIL: test_failures_one_group_listargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
====================================================================== FAIL: test_failures_one_group_sysargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
Ran 1608 tests in 6.725s
FAILED (failures=6) [ 17/354] test_array
Author: Jason Vas Dias (Jason.Vas.Dias)
Date: 2011-04-29 12:56
test_start_with_double_slash (test.test_httpservers.SimpleHTTPRequestHandlerTestCase) ... /usr/src/cpython/Lib/unittest/case.py:799: BytesWarning: str() on a bytes instance (i, item1, item2)) test test_httpservers failed -- multiple errors occurred ok
====================================================================== FAIL: test_get (test.test_httpservers.SimpleHTTPServerTestCase)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_httpservers.py", line 266, in test_get self.check_status_and_reason(response, 404) File "/usr/src/cpython/Lib/test/test_httpservers.py", line 242, in check_status_and_reason self.assertEqual(response.status, status) AssertionError: 200 != 404
====================================================================== FAIL: test_authorization (test.test_httpservers.CGIHTTPServerTestCase)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_httpservers.py", line 427, in test_authorization (res.read(), res.getheader('Content-type'), res.status)) AssertionError: Tuples differ: (b'Hello World\n', 'text/html'... != (b'', None, 200)
First differing element 0: b'Hello World\n' b''
- (b'Hello World\n', 'text/html', 200)
- (b'', None, 200)
====================================================================== FAIL: test_headers_and_content (test.test_httpservers.CGIHTTPServerTestCase)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_httpservers.py", line 407, in test_headers_and_content (res.read(), res.getheader('Content-type'), res.status)) AssertionError: Tuples differ: (b'Hello World\n', 'text/html'... != (b'', None, 200)
First differing element 0: b'Hello World\n' b''
- (b'Hello World\n', 'text/html', 200)
- (b'', None, 200)
====================================================================== FAIL: test_no_leading_slash (test.test_httpservers.CGIHTTPServerTestCase)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_httpservers.py", line 433, in test_no_leading_slash (res.read(), res.getheader('Content-type'), res.status)) AssertionError: Tuples differ: (b'Hello World\n', 'text/html'... != (b'', None, 200)
First differing element 0: b'Hello World\n' b''
- (b'Hello World\n', 'text/html', 200)
- (b'', None, 200)
====================================================================== FAIL: test_os_environ_is_not_altered (test.test_httpservers.CGIHTTPServerTestCase)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_httpservers.py", line 440, in test_os_environ_is_not_altered (res.read(), res.getheader('Content-type'), res.status)) AssertionError: Tuples differ: (b'Hello World\n', 'text/html'... != (b'', None, 200)
First differing element 0: b'Hello World\n' b''
- (b'Hello World\n', 'text/html', 200)
- (b'', None, 200)
====================================================================== FAIL: test_post (test.test_httpservers.CGIHTTPServerTestCase)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_httpservers.py", line 415, in test_post self.assertEqual(res.read(), b'1, python, 123456\n') AssertionError: b'' != b'1, python, 123456\n'
Ran 37 tests in 2.971s
FAILED (failures=6) [147/354] test_imaplib test_Internaldate2tuple (test.test_imaplib.TestImaplib) ... ok test_that_Time2Internaldate_returns_a_result (test.test_imaplib.TestImaplib) ... ok
Ran 2 tests in 0.002s
OK [148/354] test_imp
Author: Jason Vas Dias (Jason.Vas.Dias)
Date: 2011-04-29 12:57
test_too_high_from_package (test.test_import.RelativeImportFromImportlibTests) ... test test_import failed -- Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_import.py", line 545, in test_unwritable_directory 'pycache', '{}.{}.pyc'.format(TESTFN, self.tag)))) AssertionError: True is not false
ok
====================================================================== FAIL: test_unwritable_directory (test.test_import.PycacheTests)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_import.py", line 545, in test_unwritable_directory 'pycache', '{}.{}.pyc'.format(TESTFN, self.tag)))) AssertionError: True is not false
Ran 40 tests in 0.878s
FAILED (failures=1) [150/354] test_importhooks testBlocker (test.test_importhooks.ImportHooksTestCase) ... ok testImpWrapper (test.test_importhooks.ImportHooksTestCase) ... ok testMetaPath (test.test_importhooks.ImportHooksTestCase) ... ok testPathHook (test.test_importhooks.ImportHooksTestCase) ... ok
Ran 4 tests in 0.052s
OK [151/354] test_importlib
Author: Jason Vas Dias (Jason.Vas.Dias)
Date: 2011-04-29 12:59
[237/354] test_pyexpat test_ordered_attributes (test.test_pyexpat.SetAttributeTest) ... ok test_specified_attributes (test.test_pyexpat.SetAttributeTest) ... ok test_parse_file (test.test_pyexpat.ParseTest) ... ok test_unicode (test.test_pyexpat.ParseTest) ... ok test_illegal (test.test_pyexpat.NamespaceSeparatorTest) ... ok test_legal (test.test_pyexpat.NamespaceSeparatorTest) ... ok test_zero_length (test.test_pyexpat.NamespaceSeparatorTest) ... ok test (test.test_pyexpat.InterningTest) ... ok test_issue9402 (test.test_pyexpat.InterningTest) ... ok test1 (test.test_pyexpat.BufferTextTest) ... ok test2 (test.test_pyexpat.BufferTextTest) ... ok test3 (test.test_pyexpat.BufferTextTest) ... ok test4 (test.test_pyexpat.BufferTextTest) ... ok test5 (test.test_pyexpat.BufferTextTest) ... ok test6 (test.test_pyexpat.BufferTextTest) ... ok test7 (test.test_pyexpat.BufferTextTest) ... ok test_buffering_enabled (test.test_pyexpat.BufferTextTest) ... ok test_default_to_disabled (test.test_pyexpat.BufferTextTest) ... ok test (test.test_pyexpat.HandlerExceptionTest) ... ok test (test.test_pyexpat.PositionTest) ... ok test_parse_only_xml_data (test.test_pyexpat.sf1296433Test) ... ok test_1000_bytes (test.test_pyexpat.ChardataBufferTest) ... ok test_1025_bytes (test.test_pyexpat.ChardataBufferTest) ... ok test_change_size_1 (test.test_pyexpat.ChardataBufferTest) ... ok test_change_size_2 (test.test_pyexpat.ChardataBufferTest) ... ok test_disabling_buffer (test.test_pyexpat.ChardataBufferTest) ... ok test_unchanged_size (test.test_pyexpat.ChardataBufferTest) ... ok test_wrong_size (test.test_pyexpat.ChardataBufferTest) ... ok test1 (test.test_pyexpat.MalformedInputTest) ... Fatal Python error: Segmentation fault
Traceback (most recent call first): File "/usr/src/cpython/Lib/test/test_pyexpat.py", line 591 in test1 File "/usr/src/cpython/Lib/unittest/case.py", line 391 in _executeTestPart File "/usr/src/cpython/Lib/unittest/case.py", line 446 in run File "/usr/src/cpython/Lib/unittest/case.py", line 498 in call File "/usr/src/cpython/Lib/unittest/suite.py", line 105 in run File "/usr/src/cpython/Lib/unittest/suite.py", line 67 in call File "/usr/src/cpython/Lib/unittest/suite.py", line 105 in run File "/usr/src/cpython/Lib/unittest/suite.py", line 67 in call File "/usr/src/cpython/Lib/unittest/runner.py", line 168 in run File "/usr/src/cpython/Lib/test/support.py", line 1182 in _run_suite File "/usr/src/cpython/Lib/test/support.py", line 1208 in run_unittest File "/usr/src/cpython/Lib/test/test_pyexpat.py", line 676 in test_main File "/usr/src/cpython/Lib/test/regrtest.py", line 1044 in runtest_inner File "/usr/src/cpython/Lib/test/regrtest.py", line 838 in runtest File "/usr/src/cpython/Lib/test/regrtest.py", line 662 in main File "/usr/src/cpython/Lib/test/regrtest.py", line 1622 in
Author: R. David Murray (r.david.murray) *
Date: 2011-04-29 13:05
Just so you know, you aren't likely to get much help using this approach to bug reporting. A single, focused bug report is much more likely to get attention.
You might also want to try starting with a "vanilla configure" and see how things go with that first, and once you have that working add the custom configure flags that you showed in your first post one by one.
Author: Jason Vas Dias (Jason.Vas.Dias)
Date: 2011-04-29 13:15
In reply to last comment : RE: > a single, focused bug
What is this bug if not single and focused ?
The "SINGLE FOCUS" of this bug, in case you missed it , is that there appears to be no source release of python that can build and pass its make tests on my platform ; I then "FOCUSED" on detailing each test failure found ; maybe you really don't want people to be able to see these failures , which is why the build hides the "-v" verbose option so effectively ?
I did first try :
$ ./configure --prefix=/usr --libdir=/usr/lib64 --enable-shared
but this fails because no db module can build - again, back to my previous question - why must I enable any dbm module ?
I'll append the output of the failures from this "vanilla configure".
Author: Jason Vas Dias (Jason.Vas.Dias)
Date: 2011-04-29 13:31
OK, so the ' vanilla configure ' build succeeds too - using DB module only gdbm , and with internal libffi:
$ make clean $/usr/src/cpython/configure --prefix=/usr --libdir=/usr/lib64 --enable-shared ... $ echo $? 0 $ make -j2 ... $ echo $? 0
But exactly the same 'make test' errors result using gdm db module and the internal libffi . Now running the verbose tests and will append the failure details again.
Is there some special "vanilla configure" set of options required by Python to pass its make tests ? If so, please let me know what they are .
Author: Jason Vas Dias (Jason.Vas.Dias)
Date: 2011-04-29 13:53
'make test' failures after $ /usr/src/cypython/configure --prefix=/usr --libdir=/usr/lib64 --enable-shared $ make -j2 && make test (make test fails)
So, to run in "verbose mode", I do :
$ LD_LIBRARY_PATH=pwd
LD_PRELOAD=pwd
/libpython3.so
./python -Wd -E -bb /usr/src/cpython/Lib/test/regrtest.py -l -v
...
test test_argparse failed -- multiple errors occurred
ok
====================================================================== FAIL: test_failures_many_groups_listargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
====================================================================== FAIL: test_failures_many_groups_sysargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
====================================================================== FAIL: test_failures_no_groups_listargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
====================================================================== FAIL: test_failures_no_groups_sysargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
====================================================================== FAIL: test_failures_one_group_listargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
====================================================================== FAIL: test_failures_one_group_sysargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
Ran 1608 tests in 5.199s
FAILED (failures=6) [ 17/354] test_array ...
ERROR: test_quiet (distutils.tests.test_bdist_rpm.BuildRpmTestCase)
Traceback (most recent call last): File "/usr/src/cpython/Lib/distutils/tests/test_bdist_rpm.py", line 81, in test_quiet cmd.run() File "/usr/src/cpython/Lib/distutils/command/bdist_rpm.py", line 367, in run self.spawn(rpm_cmd) File "/usr/src/cpython/Lib/distutils/cmd.py", line 368, in spawn spawn(cmd, search_path, dry_run=self.dry_run) File "/usr/src/cpython/Lib/distutils/spawn.py", line 34, in spawn _spawn_posix(cmd, search_path, dry_run=dry_run) File "/usr/src/cpython/Lib/distutils/spawn.py", line 138, in _spawn_posix % (cmd[0], exit_status)) distutils.errors.DistutilsExecError: command 'rpmbuild' failed with exit status 1
Ran 160 tests in 9.559s
FAILED (errors=2, skipped=5) [ 94/354] test_docxmlrpc test_autolink_dotted_methods (test.test_docxmlrpc.DocXMLRPCHTTPGETServer) Test that selfdot values are made strong automatically in the ... ok test_autolinking (test.test_docxmlrpc.DocXMLRPCHTTPGETServer) Test that the server correctly automatically wraps references to ... ok test_invalid_get_response (test.test_docxmlrpc.DocXMLRPCHTTPGETServer) ... ok test_lambda (test.test_docxmlrpc.DocXMLRPCHTTPGETServer) Test that lambda functionality stays the same. The output produced ... ok test_system_methods (test.test_docxmlrpc.DocXMLRPCHTTPGETServer) Test the precense of three consecutive system.* methods. ... ok test_valid_get_response (test.test_docxmlrpc.DocXMLRPCHTTPGETServer) ... ok
Ran 6 tests in 0.688s
OK [ 95/354] test_dummy_thread ... test_too_high_from_package (test.test_import.RelativeImportFromImportlibTests) ... test test_import failed -- Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_import.py", line 545, in test_unwritable_directory 'pycache', '{}.{}.pyc'.format(TESTFN, self.tag)))) AssertionError: True is not false
ok
====================================================================== FAIL: test_unwritable_directory (test.test_import.PycacheTests)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_import.py", line 545, in test_unwritable_directory 'pycache', '{}.{}.pyc'.format(TESTFN, self.tag)))) AssertionError: True is not false
Ran 40 tests in 1.403s
FAILED (failures=1) [150/354] test_importhooks testBlocker (test.test_importhooks.ImportHooksTestCase) ... ok testImpWrapper (test.test_importhooks.ImportHooksTestCase) ... ok testMetaPath (test.test_importhooks.ImportHooksTestCase) ... ok testPathHook (test.test_importhooks.ImportHooksTestCase) ... ok
Ran 4 tests in 0.062s
OK [151/354] test_importlib test_failure (importlib.test.builtin.test_finder.FinderTests) ... ok test_too_high_from_package (test.test_import.RelativeImportFromImportlibTests) ... test test_import failed -- Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_import.py", line 545, in test_unwritable_directory 'pycache', '{}.{}.pyc'.format(TESTFN, self.tag)))) AssertionError: True is not false
ok
====================================================================== FAIL: test_unwritable_directory (test.test_import.PycacheTests)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_import.py", line 545, in test_unwritable_directory 'pycache', '{}.{}.pyc'.format(TESTFN, self.tag)))) AssertionError: True is not false
Ran 40 tests in 1.403s
FAILED (failures=1) [150/354] test_importhooks testBlocker (test.test_importhooks.ImportHooksTestCase) ... ok testImpWrapper (test.test_importhooks.ImportHooksTestCase) ... ok testMetaPath (test.test_importhooks.ImportHooksTestCase) ... ok testPathHook (test.test_importhooks.ImportHooksTestCase) ... ok
Ran 4 tests in 0.062s
OK [151/354] test_importlib test_failure (importlib.test.builtin.test_finder.FinderTests) ... ok test_too_high_from_package (test.test_import.RelativeImportFromImportlibTests) ... test test_import failed -- Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_import.py", line 545, in test_unwritable_directory 'pycache', '{}.{}.pyc'.format(TESTFN, self.tag)))) AssertionError: True is not false
ok
====================================================================== FAIL: test_unwritable_directory (test.test_import.PycacheTests)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_import.py", line 545, in test_unwritable_directory 'pycache', '{}.{}.pyc'.format(TESTFN, self.tag)))) AssertionError: True is not false
Ran 40 tests in 1.403s
FAILED (failures=1) [150/354] test_importhooks testBlocker (test.test_importhooks.ImportHooksTestCase) ... ok testImpWrapper (test.test_importhooks.ImportHooksTestCase) ... ok testMetaPath (test.test_importhooks.ImportHooksTestCase) ... ok testPathHook (test.test_importhooks.ImportHooksTestCase) ... ok
Ran 4 tests in 0.062s
OK [151/354] test_importlib test_failure (importlib.test.builtin.test_finder.FinderTests) ... ok
est_send_whole_file (test.test_os.TestSendfile) ... ok test_set_get_priority (test.test_os.ProgramPriorityTests) ... test test_os failed -- Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_os.py", line 675, in test_exist_ok_existing_directory os.makedirs(path, mode=mode, exist_ok=True) File "/usr/src/cpython/Lib/os.py", line 152, in makedirs mkdir(name, mode) OSError: [Errno 17] File exists: '@test_30733_tmp/dir1'
ok
====================================================================== ERROR: test_exist_ok_existing_directory (test.test_os.MakedirTests)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_os.py", line 675, in test_exist_ok_existing_directory os.makedirs(path, mode=mode, exist_ok=True) File "/usr/src/cpython/Lib/os.py", line 152, in makedirs mkdir(name, mode) OSError: [Errno 17] File exists: '@test_30733_tmp/dir1'
Ran 91 tests in 1.735s
FAILED (errors=1, skipped=13) [201/354] test_ossaudiodev
...
test_successes_one_group_sysargs (test.test_argparse.TestTypeUserDefined) ... test test_argparse failed -- multiple errors occurred ok
====================================================================== FAIL: test_failures_many_groups_listargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
====================================================================== FAIL: test_failures_many_groups_sysargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
====================================================================== FAIL: test_failures_no_groups_listargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
====================================================================== FAIL: test_failures_no_groups_sysargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
====================================================================== FAIL: test_failures_one_group_listargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
====================================================================== FAIL: test_failures_one_group_sysargs (test.test_argparse.TestFileTypeW)
Traceback (most recent call last): File "/usr/src/cpython/Lib/test/test_argparse.py", line 216, in wrapper test_func(self) File "/usr/src/cpython/Lib/test/test_argparse.py", line 235, in test_failures raises(ArgumentParserError, parser.parse_args, args) AssertionError: ArgumentParserError not raised by parse_args
Ran 1608 tests in 5.199s
FAILED (failures=6) [ 17/354] test_array test_constructor (test.test_array.BadConstructorTest) ... ok
OK, at least it doesn't SEGV - I guess python doesn't like berkeley DB anymore - but still the same failures . I'm not confident to start using this build until I can pin down why eg test_argparse and test_import are failing.
Author: R. David Murray (r.david.murray) *
Date: 2011-04-29 14:11
A focused bug report would focus on one of the test failures (as in the failures from running a single test_xxxxx).
Python3 does not support Berkeley DB out of the box, you need a third party library to get bdb support.
You might be interested to look at our buildbot status page; that will show any tests failing on the tips of all the branches current getting modifications. http://www.python.org/dev/buildbot/all/console
You will note that we do not currently have a 64bit buildbot for Ubuntu, and that the Gentoo 64bit bot is currently offline. So there may be problems on tip of which we aren't aware. I doubt that argparse is one of them, but you never know.
Author: Brian Curtin (brian.curtin) *
Date: 2011-04-29 14:15
I'm not confident to start using this build until I can pin down why eg test_argparse and test_import are failing.
Feel free to look into the failures in Lib/test/test_argparse.py and Lib/test/test_import.py
Author: Jason Vas Dias (Jason.Vas.Dias)
Date: 2011-04-29 17:54
OK, so those test_argparse.py and test_import.py tests succeed if run as a non-root user , because as the super-user one is allowed to override mode 0300 ( lack of 'w' bit for owner ) on a directory , so some tests that check if they are unable to create files when directory 'w' permissions would not allow this for a non-root user fail .
I think if users are not meant to be running the test scripts as root, then the first thing the test suite should do is :
if os.getuid() == 0 :
print( "The test suite will fail if run as the super-user." )
sys.exit(1) # or is it os.exit ? I forget ...
But if, as I hope, you will allow the root user to run the test suite, then please skip tests that test if a non-root user shouldn't be allowed to do something as I did for the patch attached to issue #11956 : @unittest.skipUnless( (os.name == 'posix') and not ( os.getuid() == 0 ), "test meaningful only on posix systems as non-root user") def test_unwritable_directory(self): ...
Author: Jason Vas Dias (Jason.Vas.Dias)
Date: 2011-04-29 17:57
argparse.py needs a similar fix, but I'm not sure where - I raised issue #11955 on this .
Author: Jason Vas Dias (Jason.Vas.Dias)
Date: 2011-04-29 18:02
hmm... not sure if "make test" completely succeeds as non-root user yet: "test_subprocess" has been sitting in this state for @ 30mins :
[282/354] test_subprocess . this bit of output is from a test of stdout in a different process ...
and is getting rather large ( 'top' output for process ) :
20092 jason 21 1 549m 251m 7392 R 45 15.0 5:46.73 python
how long is 'test_subprocess' meant to take ?
Author: Jason Vas Dias (Jason.Vas.Dias)
Date: 2011-04-29 18:08
Nope, all tests except rpm dependant test_distutils OK as non-root with the patch I submitted for #11956 - so I guess that's good enough . Please fix the python 'make test' to work when run as root user . Thank You!
Author: Jason Vas Dias (Jason.Vas.Dias)
Date: 2011-04-29 18:12
One last niggle : when I do
$ DESTDIR=pwd
/inst make install
The configure '--libdir=/usr/lib64' setting I specified is ignored and python installs itself under /usr/lib . I guess I need to raise a different bug on this ?
Author: R. David Murray (r.david.murray) *
Date: 2011-04-29 18:17
test_distutils should not be dependent on the existence of rpm (if it references the system rpm it should skip if it doesn't exist).
It is difficult to find someone willing to run a buildbot as the root user, so while we will see about fixing the test suite to run as the root user, it may get broken again by and by unintentionally.
Thanks for figuring out what was going wrong.
I think there may already be an open bug for your last niggle, you might search the tracker to check. I know there is an open question about what to do about /usr/lib64.
Author: Stefan Krah (skrah) *
Date: 2011-05-04 18:58
I just ran into this with test_httpserver/Python2.7, which fails if run as root. If I understand correctly this is the main problem here. Jason, do you agree to change the issue title to reflect this?
Author: Alyssa Coghlan (ncoghlan) *
Date: 2012-05-28 12:46
I'm not sure what platform this was on, but if it was a Fedora system then test_distutils should also be working as non-root now (see #14443)
Author: Stefan Krah (skrah) *
Date: 2012-05-28 15:50
I can confirm that test_distutils runs fine on Fedora both as root and as non-root (rpmbuild is installed).
Also, I don't see any test failures when running the whole test suite as root. IMO this means that all remaining issues in this report are fixed.
History
Date
User
Action
Args
2022-04-11 14:57:16
admin
set
github: 56163
2012-06-02 22:36:08
skrah
set
status: pending -> closed
2012-05-28 15:50:17
skrah
set
status: open -> pending
resolution: fixed
messages: +
stage: needs patch -> resolved
2012-05-28 12:46:49
ncoghlan
set
nosy: + ncoghlan
messages: +
2011-05-04 18:58:55
skrah
set
nosy: + skrah
messages: +
versions: + Python 3.1, Python 2.7, Python 3.2
2011-04-29 18:17:44
r.david.murray
set
messages: +
2011-04-29 18:12:06
Jason.Vas.Dias
set
messages: +
2011-04-29 18:08:29
Jason.Vas.Dias
set
messages: +
2011-04-29 18:03:50
brian.curtin
set
stage: needs patch
2011-04-29 18:02:45
Jason.Vas.Dias
set
messages: +
2011-04-29 17:57:09
Jason.Vas.Dias
set
messages: +
2011-04-29 17:54:59
Jason.Vas.Dias
set
messages: +
2011-04-29 17:14:05
brian.curtin
set
nosy: - brian.curtin
type: crash -> behavior
components: + Tests, - Build
versions: + Python 3.3, - Python 3.4
2011-04-29 14:15:58
brian.curtin
set
nosy: + brian.curtin
messages: +
2011-04-29 14:11:43
r.david.murray
set
messages: +
2011-04-29 13:53:47
Jason.Vas.Dias
set
messages: +
2011-04-29 13:31:19
Jason.Vas.Dias
set
messages: +
2011-04-29 13:15:28
Jason.Vas.Dias
set
messages: +
2011-04-29 13:05:05
r.david.murray
set
nosy: + r.david.murray
messages: +
2011-04-29 12:59:52
Jason.Vas.Dias
set
messages: +
2011-04-29 12:57:32
Jason.Vas.Dias
set
messages: +
2011-04-29 12:56:32
Jason.Vas.Dias
set
messages: +
2011-04-29 12:54:35
Jason.Vas.Dias
set
messages: +
2011-04-29 12:52:22
Jason.Vas.Dias
set
messages: +
2011-04-29 12:45:19
Jason.Vas.Dias
set
messages: +
2011-04-29 12:37:02
Jason.Vas.Dias
set
messages: +
2011-04-29 12:33:08
Jason.Vas.Dias
set
messages: +
2011-04-29 12:15:50
Jason.Vas.Dias
set
messages: +
2011-04-29 12:12:23
Jason.Vas.Dias
set
messages: +
2011-04-29 12:01:59
Jason.Vas.Dias
set
type: crash
2011-04-29 12:01:44
Jason.Vas.Dias
set
components: + Build
versions: + Python 3.4
2011-04-29 12:01:16
Jason.Vas.Dias
create