Commit Graph

21 Commits

Author SHA1 Message Date
Jeong, YunWon
c16f6f8b68 Fix signal handler after fork (#7012)
* temp regrtest save_env patch

* Refactor signal_handlers from Option to OnceCell

- Change `signal_handlers` type from `Option<Box<...>>` to
  `OnceCell<Box<...>>` so fork children can lazily initialize it
- Add `VirtualMachine::is_main_thread()` using runtime thread ID
  comparison instead of structural `signal_handlers.is_none()` check
- Initialize signal handlers in `py_os_after_fork_child()` via
  `get_or_init()` for workers that fork
- Use `get_or_init()` in `signal()` and `getsignal()` functions
- Remove `set_wakeup_fd(-1)` special-case workaround (d6d0303)
- Extract `signal::new_signal_handlers()` to deduplicate init expr
- Allow `getsignal()` from any thread (matches CPython behavior)
- Fix `set_wakeup_fd` error message to name the correct function
2026-02-10 00:38:46 +09:00
Jeong, YunWon
9e9bfa56c2 Update libregrtest from v3.14.2 2026-01-21 20:44:26 +09:00
Jeong, YunWon
def6974bf6 fix threading._dangling 2026-01-10 22:10:35 -05:00
Padraic Fanning
59b80e30ed Save more of the test environment before a test is run 2026-01-10 22:10:35 -05:00
Padraic Fanning
e4fb263788 Disable support.record_original_stdout() 2026-01-10 22:10:35 -05:00
Padraic Fanning
a8e7633f58 Disable saved_test_environment context manager 2026-01-10 22:10:35 -05:00
Padraic Fanning
f436c51ef2 Disable struct._clearcache() 2026-01-10 22:10:35 -05:00
Padraic Fanning
08762a35c2 Disable WindowsLoadTracker on Windows 2026-01-10 22:10:35 -05:00
Padraic Fanning
5d253d1ec0 Re-add try block around platform and encodings info 2026-01-10 22:10:35 -05:00
Padraic Fanning
f297888317 Update test/libregrtest to CPython 3.13.10 2026-01-10 22:10:35 -05:00
Daniel Chiquito
5ee5531f32 Properly unload modules between tests (#5192)
There seems to have been a bug in the libregrtest code which unloaded
modules between tests. The previous state was calculated using
`sys.modules.keys()`, which is actually a mutable object that is updated
as the underlying `sys.modules` is updated. The result was that modules
were not unloaded between tests, which is the root cause for
`test_unittest` failing when run after `test_import` and
`test_importlib`.

This code is copied from 3.12. Ideally all of `libregrtest` should
probably be updated as it seems wildly out of date, but that's a lot
more work.
2024-03-21 21:51:57 +09:00
Alexander Scharinger
18fab32c0a Fix: parallel execution of python unit tests 2022-02-05 13:16:08 +01:00
Dean Li
6f98288e84 test: use import_helper 2021-11-29 21:03:02 +08:00
Dean Li
5ee4fb899b test: use os_helper 2021-11-28 20:51:32 +08:00
Jeong YunWon
913b78ca44 Revert "Merge pull request #3433 from deantvv/test-update"
This reverts commit 9fa5c5ac66, reversing
changes made to e7fa32c687.
2021-11-17 17:06:51 +09:00
Dean Li
49a5805d11 test: use os_helper 2021-11-13 02:18:33 +00:00
Jeong YunWon
8e8efe0ec8 reform every TODO: RUSTPYTHON to same format 2020-06-17 18:47:13 +09:00
Aviv Palivoda
1e8ea10278 Allow CPython tests to run on Mac 2020-02-08 11:45:35 +02:00
Aviv Palivoda
8baaa5d508 Enable platform.platform 2020-02-06 21:53:31 +02:00
Aviv Palivoda
4c7c5fd225 Change test code to allow running 2019-12-30 21:31:36 +02:00
Aviv Palivoda
a157dc1230 Add regrtest from CPython 2019-12-30 21:31:36 +02:00