QUERY · ISSUE
esp32: viper tests fail after a while
port-esp32
If I execute a micropython/viper test on an esp32 in a loop it starts failing after a while (I started with a HW reset before this):
> while true; ./run-tests --device /dev/ttyUSB0 --target esp32 micropython/
viper_ptr32_load.py; end
pass micropython/viper_ptr32_load.py
1 tests performed (4 individual testcases)
1 tests passed
[...]
pass micropython/viper_ptr32_load.py
1 tests performed (4 individual testcases)
1 tests passed
FAIL micropython/viper_ptr32_load.py
1 tests performed (4 individual testcases)
0 tests passed
1 tests failed: viper_ptr32_load
skip micropython/viper_ptr32_load.py
0 tests performed (0 individual testcases)
0 tests passed
1 tests skipped: viper_ptr32_load
It takes less than a minute to get there. I noticed because running the full test suite shows this, e.g.:
> ./run-tests --device /dev/ttyUSB0 --target esp32 -d micropython
[...]
pass micropython/viper_misc_intbig.py
pass micropython/viper_ptr16_load.py
pass micropython/viper_ptr16_store.py
pass micropython/viper_ptr32_load.py
pass micropython/viper_ptr32_store.py
FAIL micropython/viper_ptr8_load.py
FAIL micropython/viper_ptr8_store.py
FAIL micropython/viper_subscr.py
FAIL micropython/viper_try.py
FAIL micropython/viper_types.py
FAIL micropython/viper_with.py
65 tests performed (411 individual testcases)
59 tests passed
4 tests skipped: heap_locked heapalloc_bytesio2 meminfo memstats
6 tests failed: viper_ptr8_load viper_ptr8_store viper_subscr viper_try viper_types viper_with
The tests that fail at the end are because they're at the end, not because they fail per-se.
CANDIDATE · PULL REQUEST
tests: Fix ESP8266 test failures.
tests
Summary
This PR contains some small changes to the test suite to let test runs complete cleanly on ESP8266.
extmod/machine_uart_tx.pywould fail with anImportErrorsince there was no ESP8266 wiring module. An appropriate module is now present and the test was updated with ESP8266-specific timing dataextmod/vfs_blockdev_invalid.pywould run out of memory when executing the second half of the test. The test was rewritten to delay any success output until validation is performed, returning the appropriate marker in case of a low memory conditionstress/list_sort.pywould take too long to complete, triggering the OS watchdog. The test is now skipped as part of the ESP8266 test run.
Testing
Besides the regular CI tests, the test suite executed without special options now completes with no errors on an ESP8266EX board.