Visitar URL original
Unskip MP tests and shrink the flaky MP CI list (#8731) · RustPython/RustPython@0c5a47b · GitHub
Skip to content

Commit 0c5a47b

Browse files
authored
Unskip MP tests and shrink the flaky MP CI list (#8731)
* Unskip multiprocessing RLock repr test Assisted-by: Grok:4.6 * Drop stable modules from the flaky MP CI list Assisted-by: Grok:4.6 * Keep only multiprocessing fork on the flaky MP list Assisted-by: Grok:4.6 * Drop gc_collect bench and unbreak two CI jobs Remove benches/benchmarks/gc_collect.py so CodSpeed no longer includes that execution benchmark. On Windows, run test_multiprocessing_spawn serially; the parallel snippets job hit a regrtest worker temp-dir error while that suite was still running. Install cargo-shear from a pinned prebuilt binary so the job does not fall back to compiling 1.13.4 from source. Assisted-by: Grok:4.6 * Unskip hang tests that now pass under -m test Drop the RustPython hang skips on interpreter shutdown, submit-after-shutdown, and connection pickling after they passed with rustpython -m test. Remove the unused expectedFailureIf around killpg on the resource tracker deadlock test; os.killpg is present. Pass matrix flaky-MP extras through the job environment instead of interpolating them into the run script. Assisted-by: Grok:4.6 * Restore hang skips and isolate spawn on CI Put test_multiprocessing_spawn and test_multiprocessing_forkserver back on the serial flaky MP list. Ubuntu timed out in spawn test_notify_all under -j, and forkserver.test_processes needed a rerun. Restore the hang skips on interpreter shutdown, submit-after shutdown, and connection pickling. Assisted-by: Grok:4.6
1 parent 73a3f45 commit 0c5a47b

5 files changed

Lines changed: 17 additions & 71 deletions

File tree

‎.github/workflows/ci.yaml‎

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,6 @@ jobs:
456456
RUST_BACKTRACE: full
457457
# Tests that can be flaky when running with multiple processes `-j 2`. We will use `-j 1` for these.
458458
FLAKY_MP_TESTS: >-
459-
test_class
460-
test_concurrent_futures
461-
test_eintr
462459
test_multiprocessing_fork
463460
test_multiprocessing_forkserver
464461
test_multiprocessing_spawn
@@ -475,6 +472,7 @@ jobs:
475472
- '-u all'
476473
- '--timeout 600'
477474
- '--dont-add-python-opts'
475+
extra_flaky_mp_tests: []
478476
env_polluting_tests: []
479477
skips: []
480478
timeout: 50
@@ -483,6 +481,7 @@ jobs:
483481
- '-u all'
484482
- '--timeout 600'
485483
- '--dont-add-python-opts'
484+
extra_flaky_mp_tests: []
486485
env_polluting_tests: []
487486
skips: []
488487
timeout: 60
@@ -491,6 +490,7 @@ jobs:
491490
- '-u all'
492491
- '--timeout 600'
493492
- '--dont-add-python-opts'
493+
extra_flaky_mp_tests: []
494494
env_polluting_tests: []
495495
skips: []
496496
timeout: 50
@@ -552,18 +552,23 @@ jobs:
552552
553553
- name: Run CPython tests
554554
run: |
555-
target/release/rustpython -u -m test --slow-ci -j ${{ steps.cores.outputs.cores }} ${{ join(matrix.extra_test_args, ' ') }} -x ${{ env.FLAKY_MP_TESTS }} ${{ join(matrix.skips, ' ') }}
555+
target/release/rustpython -u -m test --slow-ci -j "$CORES" $EXTRA_TEST_ARGS -x $FLAKY_MP_TESTS $EXTRA_FLAKY_MP_TESTS $SKIPS
556556
timeout-minutes: ${{ matrix.timeout }}
557+
shell: bash
557558
env:
558559
RUSTPYTHON_SKIP_ENV_POLLUTERS: true
560+
CORES: ${{ steps.cores.outputs.cores }}
561+
EXTRA_TEST_ARGS: ${{ join(matrix.extra_test_args, ' ') }}
562+
EXTRA_FLAKY_MP_TESTS: ${{ join(matrix.extra_flaky_mp_tests, ' ') }}
563+
SKIPS: ${{ join(matrix.skips, ' ') }}
559564

560565
- name: Run flaky MP CPython tests
561566
run: |
562567
for attempt in $(seq 1 5); do
563568
echo "::group::Attempt ${attempt}"
564569
565570
set +e
566-
target/release/rustpython -u -m test --slow-ci -j 1 ${{ join(matrix.extra_test_args, ' ') }} ${{ env.FLAKY_MP_TESTS }}
571+
target/release/rustpython -u -m test --slow-ci -j 1 $EXTRA_TEST_ARGS $FLAKY_MP_TESTS $EXTRA_FLAKY_MP_TESTS
567572
status=$?
568573
set -e
569574
@@ -579,6 +584,8 @@ jobs:
579584
shell: bash
580585
env:
581586
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, ' ') }}
582589

583590
- name: run cpython tests to check if env polluters have stopped polluting
584591
shell: bash
@@ -737,12 +744,13 @@ jobs:
737744

738745
- uses: dtolnay/rust-toolchain@stable
739746

740-
- uses: cargo-bins/cargo-binstall@b874e25ea559687bec77e281e9b271aa1367b624 # v1.23.0
747+
- uses: taiki-e/install-action@d438492cf8a250514fa2d34b30bc3c0dc37c65ff # v2.87.8
748+
with:
749+
tool: cargo-shear
750+
fallback: none
741751

742752
- name: cargo shear
743-
run: |
744-
cargo binstall --no-confirm cargo-shear
745-
cargo shear --locked
753+
run: cargo shear --locked
746754

747755
lint:
748756
name: Lint

‎Lib/test/_test_multiprocessing.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1606,7 +1606,6 @@ def _acquire_release(lock, timeout, l=None, n=1):
16061606
for _ in range(n):
16071607
lock.release()
16081608

1609-
@unittest.skip("TODO: RUSTPYTHON; flaky timeout - thread start latency")
16101609
def test_repr_rlock(self):
16111610
if self.TYPE != 'processes':
16121611
self.skipTest('test not appropriate for {}'.format(self.TYPE))

‎Lib/test/test_concurrent_futures/test_shutdown.py‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,6 @@ def test_cancel_futures_wait_false(self):
255255

256256

257257
class ProcessPoolShutdownTest(ExecutorShutdownTest):
258-
# TODO: RUSTPYTHON - flaky, dict changed size during iteration race condition
259-
@unittest.skip("TODO: RUSTPYTHON - flaky race condition on macOS")
260-
def test_cancel_futures(self):
261-
return super().test_cancel_futures()
262-
263258
def test_processes_terminate(self):
264259
def acquire_lock(lock):
265260
lock.acquire()

‎benches/benchmarks/gc_collect.py‎

Lines changed: 0 additions & 55 deletions
This file was deleted.

‎tests/benchmark_scripts.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const PYPERFORMANCE_BENCHMARKS: &[&str] = &[
88
"deepcopy.py",
99
"deltablue.py",
1010
"float.py",
11-
"gc_collect.py",
1211
"gc_traversal.py",
1312
"generators.py",
1413
"json_dumps.py",

0 commit comments

Comments
 (0)