Commit d8ec59e
committed
Fix test_capi and test_cmd_line regressions on parallel-gc-dev
Two parallel-GC-related test failures, both PR-blockers for upstream:
1. test_capi: test_barrier_capacity_zero auto-discovery aborts the test_capi
runner. _PyGCBarrier_Init asserts capacity > 0 and aborts the process;
the test helper exists to trigger that assertion in a SUBPROCESS via
test_gc_ws_deque.py. test_capi's auto-discovery of test_* functions in
_testinternalcapi called it in-process and crashed the runner.
Fix: rename test_barrier_capacity_zero -> unsafe_barrier_capacity_zero
in Modules/_testinternalcapi/test_ws_deque.c and the corresponding
subprocess invocation in Lib/test/test_gc_ws_deque.py.
This is the 3.15 equivalent of commit d049fc8 on parallel_gc_backport
(which fixed the same bug in the 3.12-backport tree). Cherry-pick was
not possible because file structure differs: 3.12 has a single
_testinternalcapi.c, 3.15 has Modules/_testinternalcapi/test_ws_deque.c.
Applied as equivalent manual edit.
2. test_cmd_line: test_help_env and test_help_xoptions fail because the
parallel GC additions to Python/initconfig.c (PYTHONPARALLELGC env var
and -X parallel_gc option) were inserted at the wrong alphabetical
position. The tests verify that env vars and X options appear in
sort-order (underscore-stripped, lowercased).
Fix: move PYTHONPARALLELGC to between PYTHONOPTIMIZE and
PYTHON_PERF_JIT_SUPPORT. Move -X parallel_gc to between -X
no_debug_ranges and -X pathconfig_warnings.
Verification:
- test_capi: 1356 tests pass (was: aborted)
- test_cmd_line: 76 tests pass (was: 2 failed)
- Full GIL test suite: 481 OK, 0 failures (was: 477 OK, 2 failed)
Part of 29-05-2026 3.15 consolidation. See:
~/claude_docs/29-05-2026-parallel-gc-3.15-consolidation-plan.md
~/claude_docs/parallel_gc_pr/29-05-2026-parallel-gc-3.15-consolidation-progress.md1 parent f688b70 commit d8ec59e
3 files changed
Lines changed: 16 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
526 | 526 | | |
527 | 527 | | |
528 | 528 | | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
529 | 533 | | |
530 | | - | |
| 534 | + | |
531 | 535 | | |
532 | 536 | | |
533 | 537 | | |
| |||
1328 | 1332 | | |
1329 | 1333 | | |
1330 | 1334 | | |
1331 | | - | |
| 1335 | + | |
1332 | 1336 | | |
1333 | 1337 | | |
1334 | 1338 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | 328 | | |
333 | 329 | | |
334 | 330 | | |
| |||
338 | 334 | | |
339 | 335 | | |
340 | 336 | | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
341 | 343 | | |
342 | 344 | | |
343 | 345 | | |
| |||
434 | 436 | | |
435 | 437 | | |
436 | 438 | | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | 439 | | |
441 | 440 | | |
442 | 441 | | |
| |||
445 | 444 | | |
446 | 445 | | |
447 | 446 | | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
448 | 450 | | |
449 | 451 | | |
450 | 452 | | |
| |||
0 commit comments