micropython/tests/ports
Damien George b3c8ed6c33 tests/ports/rp2: Decrease test lower bound for thread lightsleep time.
This makes the rp2-specific lightsleep test more lenient, so it passes.

This test was added in PR #16454 / 69993daa5c
and even back then it did not pass reliably on RP2040.  The issue is that
threads can race each other to enter lightsleep mode, and when one of them
actually stops the CPU clock the other thread is stopped as well.
Depending on whether the other thread was just entering or just exiting
lightsleep itself, the total duration of all sleeps can vary and can be as
small as 2*T.

Therefore, adjust the minimum to allow 2*T.

`machine.lightsleep()` is anyway 1) specified only to wait at most the
given time; and 2) not well specified when multiple threads call it at the
same time.  So it seems OK to make the test more lenient.

Work done in collaboration with @projectgus.

Signed-off-by: Damien George <damien@micropython.org>
2025-09-08 11:07:36 +10:00
..
alif_hardware tests/ports/alif_hardware: Add flash testing script. 2025-04-09 00:22:33 +10:00
cc3200 all: Upgrade to ruff v0.9.6. 2025-02-25 13:02:49 +01:00
esp32 esp32: Add support for ESP32-C2 (aka ESP8684). 2025-07-30 10:51:29 +10:00
qemu py/emitinlinerv32: Add inline assembler support for RV32. 2025-01-02 11:49:10 +11:00
renesas-ra tests: Move port-specific test directories into tests/ports/ directory. 2024-01-22 11:48:27 +11:00
rp2 tests/ports/rp2: Decrease test lower bound for thread lightsleep time. 2025-09-08 11:07:36 +10:00
stm32 tests/ports/stm32: Tweak tests to run on a wider set of boards. 2025-07-08 13:18:55 +10:00
stm32_hardware tests/ports/stm32_hardware: Convert DMA test to use unittest. 2024-12-06 13:48:23 +11:00
unix py/formatfloat: Improve accuracy of float formatting code. 2025-08-01 00:47:33 +10:00
webassembly webassembly/proxy_js: Reuse JsProxy ref if object matches. 2025-07-31 11:40:50 +10:00