| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Builtin functions and methods that have non-representable signatures today
will have representable signatures yesterday, and they will become unusable
for testing this feature.
So we need to add special functions and methods to the _testcapi module
that always have non-representable signatures.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
lines (GH-109157)
|
|
|
| |
BINARY_SUBSCR example erroneously uses two different names `key` and `index` to refer to the same variable. STORE_SUBSCR and DELETE_SUBSCR use only `key` in the same context. Changing `index` to `key` for consistency.
|
|
|
|
| |
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
|
| |
Fix test_gdb on Python built with LLVM clang 16 on Linux ppc64le (ex:
Fedora 38). Search patterns in gdb "bt" command output to detect
when gdb fails to retrieve the traceback. For example, skip a test if
"Backtrace stopped: frame did not save the PC" is found.
|
|
|
| |
Fix benchmark in decimal to work again after the int str conversion limits.
|
|
|
|
|
|
| |
The test now calls free_tool_id() so it can be run multiple times in
the same process. For example, the following command no longer fails:
python -m test test_monitoring -R 3:3
|
|
|
|
|
|
|
|
| |
On WASI platform, get_temp_dir() should behave differently since the
parent process is a WASI process and uses a different get_temp_dir()
path.
Fix also WorkerThread._runtest(): don't read JSON file if the worker
process exit code is non-zero.
|
|
|
|
|
|
|
|
|
|
| |
On Emscripten and WASI, or if --python command line is used,
libregrtest now writes JSON into stdout, instead of using a name
file.
* Add JsonFileType.STDOUT.
* Remove JsonFileType.FILENAME.
* test.pythoninfo logs environment variables related to
cross-compilation and running Python on Emscripten/WASI.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Emscripten and WASI platforms, or if --python command line option
is used, libregrtest now uses a filename for the JSON file.
Emscripten and WASI buildbot workers run the main test process with a
different Python (Linux) which spawns Emscripten/WASI processes using
the command specified in --python command line option. Passing a file
descriptor from the parent process to the child process doesn't work
in this case.
* Add JsonFile and JsonFileType classes
* Add RunTests.json_file_use_filename() method.
* Add a test in test_regrtest on the --python command line option.
* test_regrtest: add parallel=False parameter.
* Split long RunWorkers._runtest() function into sub-functions.
|
| |
|
|
|
| |
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
|
|
| |
Change the permission from `read` to `write`.
|
|
|
|
|
|
|
|
|
|
| |
I must have overlooked this when refactoring the code generator.
The Tier 1 interpreter contained a few silly things like
```
goto resume_frame;
STACK_SHRINK(1);
```
(and other variations, some where the unconditional `goto` was hidden in a macro).
|
|
|
|
|
|
|
|
| |
Collect data from:
* test.support
* test.support.os_helper
* test.support.socket_helper
* test.support.threading_helper
|
| |
|
|
|
|
|
| |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
|
|
|
|
| |
always at the end) (#109201)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix Emscripten and WASI: start the test worker process in the Python
source code directory, where 'python.js' and 'python.wasm' can be
found. Then worker_process() changes to a temporary directory created
to run tests.
* create_worker_process() uses os_helper.SAVEDCWD as cwd.
* worker_process() uses get_temp_dir() as the parent directory for
get_work_dir().
* Don't use plural but singual for "test" in "Run 1 test ..."
message.
* Remove unused imports.
* Add WORK_DIR_PREFIX and WORKER_WORK_DIR_PREFIX constants.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Don't spawn more threads than the number of jobs: these worker
threads would never get anything to do.
* Add the number of tests in "Run ... tests in ..." message.
* Add RunTests.get_jobs() method.
* Add plural() function.
* count() uses f-string.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
libregrtest now calls random.seed() before running each test file
when -r/--randomize command line option is used. Moreover, it's also
called in worker processes. It should help to make tests more
deterministic. Previously, it was only called once in the main
process before running all test files and it was not called in worker
processes.
* Convert some f-strings to regular strings in test_regrtest when
f-string is not needed.
* Remove unused all_methods variable from test_regrtest.
* Add RunTests members are now mandatory.
|
|
|
| |
There is no need to check for environment changes twice.
|
|
|
|
|
|
|
| |
* Enable collect_sysconfig() on Windows.
* Add sysconfig 'abs_builddir' and 'srcdir'
* Add sysconfig.is_python_build()
* Add tempfile.gettempdir()
* Remove compatiblity with Python 2.7 (print_function).
|
|
|
|
|
|
| |
On Windows, skip the test if the current working directory and the
Python source code directory have different mount drives. It happens
if the temporary directory is on a different mount drive than the
Python source code.
|
| |
|
|
|
|
|
| |
Fix test_os.test_access_denied() when the TEMP environment variable
is equal to the current working directory. Run the test using a
different filename, since self.fname already exists in this case.
|
|
|
|
|
|
|
| |
(#109298)
test_asyncio and test_compileall now clean up multiprocessing by
calling multiprocessing _cleanup_tests(): explicitly clean up
resources and stop background processes like the resource tracker.
|
| |
|
|
|
|
|
| |
Fixes #109118. Fixes #109194.
Co-authored-by: Carl Meyer <carl@oddbird.net>
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* Rename SAVE_IP to _SET_IP
* Rename EXIT_TRACE to _EXIT_TRACE
* Rename SAVE_CURRENT_IP to _SAVE_CURRENT_IP
* Rename INSERT to _INSERT (This is for Ken Jin's abstract interpreter)
* Rename IS_NONE to _IS_NONE
* Rename JUMP_TO_TOP to _JUMP_TO_TOP
|
|
|
|
|
| |
(#107296)
Removed zipapp suggestion to rm .dist-info subdirectories. This totally breaks importlib.metadata
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a 16-bit inline cache entry to the conditional branch instructions POP_JUMP_IF_{FALSE,TRUE,NONE,NOT_NONE} and their instrumented variants, which is used to keep track of the branch direction.
Each time we encounter these instructions we shift the cache entry left by one and set the bottom bit to whether we jumped.
Then when it's time to translate such a branch to Tier 2 uops, we use the bit count from the cache entry to decided whether to continue translating the "didn't jump" branch or the "jumped" branch.
The counter is initialized to a pattern of alternating ones and zeros to avoid bias.
The .pyc file magic number is updated. There's a new test, some fixes for existing tests, and a few miscellaneous cleanups.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
libregrtest now uses a separated file descriptor to write test result
as JSON. Previously, if a test wrote debug messages late around the
JSON, the main test process failed to parse JSON.
Rename TestResult.write_json() to TestResult.write_json_into().
worker_process() no longer writes an empty line at the end. There is
no need to separate test process output from the JSON output anymore,
since JSON is now written into a separated file descriptor.
create_worker_process() now always spawn the process with
close_fds=True.
|
|
|
|
| |
(GH-108644)
|
|
|
|
|
|
| |
(#109159)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
|