Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jepler
Copy link
Contributor

@jepler jepler commented Nov 15, 2025

Summary

When !GIL, the waiter must also be bytecode.

Reduce a wait making the test run 8x faster locally, which hopefully also makes it reliable on ci.

Restore the test during ci.

Closes: #18415

ping @projectgus

Testing

I ran the script manually locally.

Trade-offs and Alternatives

We could delete the test, it's been unused in CI since 2020.

@codecov
Copy link

codecov bot commented Nov 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.38%. Comparing base (27544a2) to head (a74893a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #18423   +/-   ##
=======================================
  Coverage   98.38%   98.38%           
=======================================
  Files         171      171           
  Lines       22294    22294           
=======================================
  Hits        21933    21933           
  Misses        361      361           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dpgeorge dpgeorge added this to the release-1.27.0 milestone Nov 15, 2025
@dpgeorge
Copy link
Member

Thanks, but I'm not sure this is the correct fix. Instead, I think time.sleep(0) should be guaranteed to run the scheduler (eg via mp_handle_pending()). Then this test would be fine as-is.

(So, this test is revealing a bug in the unix port, that time.sleep(0) and time.sleep_ms(0) exit without checking for pending events.)

@jepler
Copy link
Contributor Author

jepler commented Nov 15, 2025

I can look at it from that angle instead, thanks.

Locally, this changes the duration of the test from about 2.7s
to 0.3s.

Signed-off-by: Jeff Epler <[email protected]>
This test was ignored since 2020, which hid a new bug in the
test for the native emitter added in 2024. Hopefully other
changes to the test will make it more reliable.

Signed-off-by: Jeff Epler <[email protected]>
@jepler jepler force-pushed the reliable-stress-schedule branch from 4b9ee13 to a74893a Compare November 15, 2025 23:26
@github-actions
Copy link

Code size report:

Reference:  esp32/boards: Add Silicognition ManT1S board definition. [27544a2]
Comparison: run-tests: Re-add stress_schedule.py. [merge of a74893a]
  mpy-cross:    +0 +0.000% 
   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +8 +0.002% PYBV10
     mimxrt:    +8 +0.002% TEENSY40
        rp2:    +8 +0.001% RPI_PICO_W
       samd:    +8 +0.003% ADAFRUIT_ITSYBITSY_M4_EXPRESS
  qemu rv32:    +8 +0.002% VIRT_RV32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stress_schedule consistently fails with native emitter

2 participants