Skip to content

Commit ff3d839

Browse files
committed
unix: don't build various test extensions as builtins
This makes a few more tests pass. It also means removing some extensions from the distribution metadata, which is desirable, since they are test only. As part of this, I also annotated the test skips on Linux. We are down to 2 test failures on Linux under both Python 3.7 and 3.8!
1 parent 103f3a7 commit ff3d839

File tree

3 files changed

+33
-55
lines changed

3 files changed

+33
-55
lines changed

cpython-unix/static-modules.3.7.linux64

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ _crypt _cryptmodule.c -lcrypt
88
_curses _cursesmodule.c -I/tools/deps/include/ncurses -L/tools/deps/lib -lncurses
99
_curses_panel _curses_panel.c -I/tools/deps/include/ncurses -L/tools/deps/lib -lpanel -lncurses
1010
_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c -I/tools/deps/lib/libffi-3.2.1/include -lffi -ldl
11-
_ctypes_test _ctypes/_ctypes_test.c -I/tools/deps/lib/libffi-3.2.1/include -lm
1211
_decimal _decimal/_decimal.c _decimal/libmpdec/basearith.c _decimal/libmpdec/constants.c _decimal/libmpdec/context.c _decimal/libmpdec/convolute.c _decimal/libmpdec/crt.c _decimal/libmpdec/difradix2.c _decimal/libmpdec/fnt.c _decimal/libmpdec/fourstep.c _decimal/libmpdec/io.c _decimal/libmpdec/memory.c _decimal/libmpdec/mpdecimal.c _decimal/libmpdec/numbertheory.c _decimal/libmpdec/sixstep.c _decimal/libmpdec/transpose.c -DCONFIG_64=1 -DASM=1 -IModules/_decimal/libmpdec
1312
_dbm _dbmmodule.c -DHAVE_BERKDB_H -DDB_DBM_HSEARCH -I/tools/deps/include -L/tools/deps/lib -ldb
1413
_elementtree _elementtree.c -DHAVE_EXPAT_CONFIG_H=1 -DXML_POOR_ENTROPY=1 -DUSE_PYEXPAT_CAPI -IModules/expat
@@ -25,12 +24,8 @@ _opcode _opcode.c
2524
_queue _queuemodule.c
2625
_sqlite3 _sqlite/cache.c _sqlite/connection.c _sqlite/cursor.c _sqlite/microprotocols.c _sqlite/module.c _sqlite/prepare_protocol.c _sqlite/row.c _sqlite/statement.c _sqlite/util.c -I/tools/deps/include -IModules/_sqlite -DMODULE_NAME=\"sqlite3\" -DSQLITE_OMIT_LOAD_EXTENSION=1 -L/tools/deps/lib -lsqlite3
2726
_ssl _ssl.c -I/tools/deps/include -lssl -lcrypto
28-
_testbuffer _testbuffer.c
29-
_testimportmultiple _testimportmultiple.c
30-
_testmultiphase _testmultiphase.c
3127
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT -I/tools/deps/include/X11 -L/tools/deps/lib -ltcl8.6 -ltk8.6 -lX11 -lxcb -lXau
3228
_uuid _uuidmodule.c -I/tools/deps/include/uuid -luuid
33-
_xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c
3429
ossaudiodev ossaudiodev.c
3530
pyexpat pyexpat.c expat/xmlparse.c expat/xmlrole.c expat/xmltok.c -DHAVE_EXPAT_CONFIG_H=1 -DXML_POOR_ENTROPY=1 -DUSE_PYEXPAT_CAPI -IModules/expat
3631
# readline variant needs to come first because libreadline is in /tools/deps and is
@@ -39,4 +34,3 @@ pyexpat pyexpat.c expat/xmlparse.c expat/xmlrole.c expat/xmltok.c -DHAVE_EXPAT_C
3934
# up readline.
4035
readline VARIANT=readline readline.c -I/tools/deps/include -I/tools/deps/include/ncurses -L/tools/deps/lib -lreadline -lncurses
4136
readline VARIANT=libedit readline-libedit.c -DUSE_LIBEDIT=1 -I/tools/deps/libedit/include -I/tools/deps/libedit/include/ncurses -L/tools/deps/libedit/lib -ledit -lncurses
42-
xxlimited xxlimited.c -DPy_LIMITED_API=0x03050000

cpython-unix/static-modules.3.8.linux64

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ _crypt _cryptmodule.c -lcrypt
88
_curses _cursesmodule.c -I/tools/deps/include/ncurses -L/tools/deps/lib -lncurses
99
_curses_panel _curses_panel.c -I/tools/deps/include/ncurses -L/tools/deps/lib -lpanel -lncurses
1010
_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c -I/tools/deps/lib/libffi-3.2.1/include -lffi -ldl
11-
_ctypes_test _ctypes/_ctypes_test.c -I/tools/deps/lib/libffi-3.2.1/include -lm
1211
_decimal _decimal/_decimal.c _decimal/libmpdec/basearith.c _decimal/libmpdec/constants.c _decimal/libmpdec/context.c _decimal/libmpdec/convolute.c _decimal/libmpdec/crt.c _decimal/libmpdec/difradix2.c _decimal/libmpdec/fnt.c _decimal/libmpdec/fourstep.c _decimal/libmpdec/io.c _decimal/libmpdec/memory.c _decimal/libmpdec/mpdecimal.c _decimal/libmpdec/numbertheory.c _decimal/libmpdec/sixstep.c _decimal/libmpdec/transpose.c -DCONFIG_64=1 -DASM=1 -IModules/_decimal/libmpdec
1312
_dbm _dbmmodule.c -DHAVE_BERKDB_H -DDB_DBM_HSEARCH -I/tools/deps/include -L/tools/deps/lib -ldb
1413
_elementtree _elementtree.c -DHAVE_EXPAT_CONFIG_H=1 -DXML_POOR_ENTROPY=1 -DUSE_PYEXPAT_CAPI -IModules/expat
@@ -26,13 +25,8 @@ _posixshmem _multiprocessing/posixshmem.c -IModules/_multiprocessing
2625
_queue _queuemodule.c
2726
_sqlite3 _sqlite/cache.c _sqlite/connection.c _sqlite/cursor.c _sqlite/microprotocols.c _sqlite/module.c _sqlite/prepare_protocol.c _sqlite/row.c _sqlite/statement.c _sqlite/util.c -I/tools/deps/include -IModules/_sqlite -DMODULE_NAME=\"sqlite3\" -DSQLITE_OMIT_LOAD_EXTENSION=1 -L/tools/deps/lib -lsqlite3
2827
_ssl _ssl.c -I/tools/deps/include -lssl -lcrypto
29-
_testbuffer _testbuffer.c
30-
_testimportmultiple _testimportmultiple.c
31-
_testmultiphase _testmultiphase.c
3228
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT -I/tools/deps/include/X11 -L/tools/deps/lib -ltcl8.6 -ltk8.6 -lX11 -lxcb -lXau
3329
_uuid _uuidmodule.c -I/tools/deps/include/uuid -luuid
34-
_xxsubinterpreters _xxsubinterpretersmodule.c
35-
_xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c
3630
ossaudiodev ossaudiodev.c
3731
pyexpat pyexpat.c expat/xmlparse.c expat/xmlrole.c expat/xmltok.c -DHAVE_EXPAT_CONFIG_H=1 -DXML_POOR_ENTROPY=1 -DUSE_PYEXPAT_CAPI -IModules/expat
3832
# readline variant needs to come first because libreadline is in /tools/deps and is
@@ -41,4 +35,3 @@ pyexpat pyexpat.c expat/xmlparse.c expat/xmlrole.c expat/xmltok.c -DHAVE_EXPAT_C
4135
# up readline.
4236
readline VARIANT=readline readline.c -I/tools/deps/include -I/tools/deps/include/ncurses -L/tools/deps/lib -lreadline -lncurses
4337
readline VARIANT=libedit readline-libedit.c -DUSE_LIBEDIT=1 -I/tools/deps/libedit/include -I/tools/deps/libedit/include/ncurses -L/tools/deps/libedit/lib -ledit -lncurses
44-
xxlimited xxlimited.c -DPy_LIMITED_API=0x03050000

docs/status.rst

Lines changed: 33 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -23,48 +23,7 @@ This repository contains ``test-distribution.py`` script that can be
2323
used to run the Python test harness from a distribution archive.
2424

2525
Here, we track the various known failures when running
26-
``test-distribution.py /path/to/distribution.tar.zst -u all,-audio``.
27-
28-
``test_ctypes``
29-
---------------
30-
31-
Known Failing on: Linux
32-
33-
This fails with a bunch of
34-
``AttributeError: module '_ctypes_test' has no attribute '__file__'``.
35-
This is because ``_ctypes_test`` is compiled as a built-in extension
36-
module, not a standalone extension module.
37-
38-
The test seems to attempt to use ``ctypes`` against this test extension
39-
shared library. So we should probably not compile it as a built-in,
40-
as it prevents tests from working.
41-
42-
``test_imp``
43-
------------
44-
45-
Known Failing on: Linux
46-
47-
This fails in ``test_issue24748_load_module_skips_sys_modules_check``
48-
with a wonky traceback in the importer.
49-
50-
The failure seems to relate to assumptions that ``_testmultiphase``
51-
is a standalone extension module. It is a built-in, which breaks
52-
assumptions.
53-
54-
We should change how this extension is compiled.
55-
56-
``test_importlib``
57-
------------------
58-
59-
Known Failing on: Linux
60-
61-
This fails due to
62-
``AttributeError: module '_testcapi' has no attribute '__file__'``.
63-
64-
This is assuming ``_testcapi`` is a standalone extension module.
65-
But it is a built-in.
66-
67-
We should change how this extension is compiled.
26+
``test-distribution.py /path/to/distribution.tar.zst -u all``.
6827

6928
``test_subprocess``
7029
-------------------
@@ -123,6 +82,38 @@ This seems like a minor issue and might be a bug in the test itself.
12382
Test Skips
12483
==========
12584

85+
Linux
86+
-----
87+
88+
The following tests are skipped on Linux:
89+
90+
test_asdl_parser
91+
test irrelevant for an installed Python
92+
test_clinic
93+
install/lib/Tools/clinic' path does not exist
94+
test_dbm_gnu
95+
No module named '_gdbm'
96+
test_devpoll
97+
test works only on Solaris OS family
98+
test_gdb
99+
test_gdb only works on source builds at the moment.
100+
test_kqueue
101+
test works only on BSD
102+
test_msilib
103+
No module named 'msilib'
104+
test_ossaudiodev
105+
[Errno 2] No such file or directory: '/dev/dsp'
106+
test_startfile
107+
object <module 'os' from '.../install/lib/python3.7/os.py'> has no attribute 'startfile'
108+
test_winconsoleio
109+
test only relevant on win32
110+
test_winreg
111+
No module named 'winreg'
112+
test_winsound
113+
No module named 'winsound'
114+
test_zipfile64
115+
test requires loads of disk-space bytes and a long time to run
116+
126117
macOS
127118
-----
128119

0 commit comments

Comments
 (0)