python / cpython

The Python programming language
https://www.python.org
Other
62.5k stars 30.01k forks source link

Add tests for the PyEval_Run family of the C API #117968

Open erlend-aasland opened 5 months ago

erlend-aasland commented 5 months ago

Functional tests for the PyEval_Run family of the C API lack tests. Discovered in the discussions of PR #116637.

Linked PRs

erlend-aasland commented 5 months ago

cc. @serhiy-storchaka

serhiy-storchaka commented 5 months ago

Most of these functions (especially implemented as macros) are thin wrappers around functions with richer interface, so it is not practical to repeat all tests for all functions. We only need to add comprehensive tests for base functions, and simpler tests for derived functions.

Some functions are implemented as macros, but also as real functions. It would be nice to test both implementations (only simple tests are needed).

encukou commented 5 months ago

The test_run_fileexflags test that was added in #117982 sometimes crashes on LTO+PGO buildbots, see for example:

Do you want to look into this?

encukou commented 5 months ago

I'm still seeing failures; there might be two different issues. See here