Skip to content

Commit 54420c4

Browse files
authored
Drop serial MP CI retries and killpg overlay (#8756)
Multiprocessing fork/spawn/forkserver now run in the main -j $CORES CPython test job. Remove expectedFailureIf for os.killpg now that killpg exists. Assisted-by: Grok:4.6
1 parent e189ca7 commit 54420c4

3 files changed

Lines changed: 2 additions & 38 deletions

File tree

‎.github/workflows/ci.yaml‎

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -454,11 +454,6 @@ jobs:
454454
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') }}
455455
env:
456456
RUST_BACKTRACE: full
457-
# Tests that can be flaky when running with multiple processes `-j 2`. We will use `-j 1` for these.
458-
FLAKY_MP_TESTS: >-
459-
test_multiprocessing_fork
460-
test_multiprocessing_forkserver
461-
test_multiprocessing_spawn
462457
# Named after the matrix entry rather than left to be named for it: a
463458
# generated name lists every value in the entry, so adding or removing one
464459
# renames the check and drops it from the required list.
@@ -472,7 +467,6 @@ jobs:
472467
- '-u all'
473468
- '--timeout 600'
474469
- '--dont-add-python-opts'
475-
extra_flaky_mp_tests: []
476470
env_polluting_tests: []
477471
skips: []
478472
timeout: 50
@@ -481,7 +475,6 @@ jobs:
481475
- '-u all'
482476
- '--timeout 600'
483477
- '--dont-add-python-opts'
484-
extra_flaky_mp_tests: []
485478
env_polluting_tests: []
486479
skips: []
487480
timeout: 60
@@ -490,7 +483,6 @@ jobs:
490483
- '-u all'
491484
- '--timeout 600'
492485
- '--dont-add-python-opts'
493-
extra_flaky_mp_tests: []
494486
env_polluting_tests: []
495487
skips: []
496488
timeout: 50
@@ -552,41 +544,15 @@ jobs:
552544
553545
- name: Run CPython tests
554546
run: |
555-
target/release/rustpython -u -m test --slow-ci -j "$CORES" $EXTRA_TEST_ARGS -x $FLAKY_MP_TESTS $EXTRA_FLAKY_MP_TESTS $SKIPS
547+
target/release/rustpython -u -m test --slow-ci -j "$CORES" $EXTRA_TEST_ARGS $SKIPS
556548
timeout-minutes: ${{ matrix.timeout }}
557549
shell: bash
558550
env:
559551
RUSTPYTHON_SKIP_ENV_POLLUTERS: true
560552
CORES: ${{ steps.cores.outputs.cores }}
561553
EXTRA_TEST_ARGS: ${{ join(matrix.extra_test_args, ' ') }}
562-
EXTRA_FLAKY_MP_TESTS: ${{ join(matrix.extra_flaky_mp_tests, ' ') }}
563554
SKIPS: ${{ join(matrix.skips, ' ') }}
564555

565-
- name: Run flaky MP CPython tests
566-
run: |
567-
for attempt in $(seq 1 5); do
568-
echo "::group::Attempt ${attempt}"
569-
570-
set +e
571-
target/release/rustpython -u -m test --slow-ci -j 1 $EXTRA_TEST_ARGS $FLAKY_MP_TESTS $EXTRA_FLAKY_MP_TESTS
572-
status=$?
573-
set -e
574-
575-
echo "::endgroup::"
576-
577-
if [ $status -eq 0 ]; then
578-
exit 0
579-
fi
580-
done
581-
582-
exit 1
583-
timeout-minutes: ${{ matrix.timeout }}
584-
shell: bash
585-
env:
586-
RUSTPYTHON_SKIP_ENV_POLLUTERS: true
587-
EXTRA_TEST_ARGS: ${{ join(matrix.extra_test_args, ' ') }}
588-
EXTRA_FLAKY_MP_TESTS: ${{ join(matrix.extra_flaky_mp_tests, ' ') }}
589-
590556
- name: run cpython tests to check if env polluters have stopped polluting
591557
shell: bash
592558
run: |

‎Lib/test/_test_multiprocessing.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6269,7 +6269,6 @@ def test_resource_tracker_blocked_signals(self):
62696269
# restore sigmask to what it was before executing test
62706270
signal.pthread_sigmask(signal.SIG_SETMASK, orig_sigmask)
62716271

6272-
@unittest.expectedFailureIf(not hasattr(os, "killpg"), "TODO: RUSTPYTHON")
62736272
@only_run_in_forkserver_testsuite("avoids redundant testing.")
62746273
def test_resource_tracker_fork_deadlock(self):
62756274
# gh-146313: ResourceTracker.__del__ used to deadlock if a forked

‎crates/stdlib/src/multiprocessing.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,7 @@ mod _multiprocessing {
134134
}
135135
}
136136

137-
// Poll with signal checking (CPython uses WaitForMultipleObjectsEx
138-
// with sigint_event; we poll since RustPython has no sigint event)
137+
// Poll with signal checking. There is no sigint event to wait on.
139138
let poll_ms: u32 = 100;
140139
let mut elapsed: u32 = 0;
141140
loop {

0 commit comments

Comments
 (0)