Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

tests: broken with stdio_rtt if auto_init is disabled #13120

Open
kaspar030 opened this issue Jan 14, 2020 · 3 comments
Open

tests: broken with stdio_rtt if auto_init is disabled #13120

kaspar030 opened this issue Jan 14, 2020 · 3 comments
Labels
Area: tests Area: tests and testing framework Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@kaspar030
Copy link
Contributor

Description

Some tests disable auto_init (and thus xtimer's initialization).
xtimer is a hard dependency when using stdio_rtt, thus all tests disabling auto_init fail, unless they manually initialize xtimer.

Probably affected:

$ git grep DIS.*auto
bloom_bytes/Makefile:DISABLE_MODULE += auto_init
cpp_ctors/Makefile:DISABLE_MODULE += auto_init
driver_at86rf2xx/Makefile:DISABLE_MODULE += auto_init
float/Makefile:#DISABLE_MODULE += auto_init
gnrc_sixlowpan_frag/Makefile:DISABLE_MODULE += auto_init
lwip_sock_ip/Makefile:DISABLE_MODULE += auto_init
lwip_sock_tcp/Makefile:DISABLE_MODULE += auto_init
lwip_sock_udp/Makefile:DISABLE_MODULE += auto_init
minimal/Makefile:DISABLE_MODULE += auto_init
msg_avail/Makefile:DISABLE_MODULE += auto_init
mutex_unlock_and_sleep/Makefile:DISABLE_MODULE += auto_init
netdev_test/Makefile:DISABLE_MODULE = auto_init
periph_rtt/Makefile:DISABLE_MODULE += auto_init
posix_semaphore/Makefile:DISABLE_MODULE += auto_init
shell/Makefile:DISABLE_MODULE += auto_init
socket_zep/Makefile:DISABLE_MODULE += auto_init
struct_tm_utility/Makefile:DISABLE_MODULE += auto_init
thread_basic/Makefile:DISABLE_MODULE += auto_init
thread_cooperation/Makefile:DISABLE_MODULE += auto_init
thread_exit/Makefile:DISABLE_MODULE += auto_init
thread_flood/Makefile:DISABLE_MODULE += auto_init
thread_msg/Makefile:DISABLE_MODULE += auto_init
thread_msg_block_race/Makefile:DISABLE_MODULE += auto_init
thread_msg_block_w_queue/Makefile:DISABLE_MODULE += auto_init
thread_msg_block_wo_queue/Makefile:DISABLE_MODULE += auto_init
thread_msg_seq/Makefile:DISABLE_MODULE += auto_init
thread_race/Makefile:DISABLE_MODULE += auto_init
thread_zombie/Makefile:DISABLE_MODULE += auto_init
unittests/Makefile:DISABLE_MODULE += auto_init

Probably minus these that manually initialize xtimer:

$ for i in $(git grep -l DIS.*auto | xargs dirname); do git grep "xtimer_init" $i/*.c; done
bloom_bytes/main.c:    xtimer_init();
driver_at86rf2xx/main.c:    xtimer_init();
gnrc_sixlowpan_frag/main.c:    xtimer_init();
lwip_sock_ip/stack.c:    xtimer_init();
lwip_sock_tcp/main.c:    xtimer_init();
lwip_sock_tcp/stack.c:    xtimer_init();
lwip_sock_udp/main.c:    xtimer_init();
lwip_sock_udp/stack.c:    xtimer_init();
posix_semaphore/main.c:    xtimer_init();
shell/main.c:    xtimer_init();
unittests/main.c:    xtimer_init();

Steps to reproduce the issue

Run any of the above tests with a board configured to use stdio_rtt.

Expected results

Test succeeds.

Actual results

Varying, as apparently the stdio_rtt code only falls back to periodic polling on read or write after empting either input or output queue. But the tests I tried just get stuck, mostly after printing the interactive_sync info line.

Versions

https://gist.github.com/6a04e06f0f9ec34836d4c22df7d7011c

@kaspar030 kaspar030 added Area: tests Area: tests and testing framework Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) labels Jan 14, 2020
@kaspar030
Copy link
Contributor Author

IMO we should check all of them if disabling auto_init makes sense at all. For some that is done without reason (e.g., tests/float).

Others seem to really need it (e.g., some gnrc tests need to avoid the standard initialization).

#13089 could be a way out.

@fjmolinas
Copy link
Contributor

This list should now be reduced to tests/periph_rtt minimal and unittests.

@fjmolinas
Copy link
Contributor

This list should now be reduced to tests/periph_rtt minimal and unittests.

This list is now reduced to minimal and unittests. Should we consider it closed?

@miri64 miri64 added this to the Release 2020.07 milestone Jul 6, 2020
@MrKevinWeiss MrKevinWeiss removed this from the Release 2021.07 milestone Jul 15, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Area: tests Area: tests and testing framework Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

No branches or pull requests

4 participants