Use `test_utils_interactive_sync` for the following tests explicitly:
- tests/periph/timer_periodic
- tests/sys/posix_sleep
This is needed for accurate timestamping of the stdio received. The
tests will not pass without on `native` / `native64`.
examples/readme: fix SAUL spelling mistake
examples/readme: Link to README.md instead of folder
examples/readme: increase title size
examples/readme: make networking category name a bit clearer
examples/readme: move nimble to own category within BLE
examples/readme: move dtls to own category
examples/readme: move heart rate sensor to nimble category
examples/readme: move arduino sketch to languages
examples/timer_periodic: fix file name issue
examples/readme: change level wording about nanocoap
gnrc_tcp_open() previously would eventually fail with a timeout without
sending any data when no netif was specified and a link-local target
address was used. This fixes the behavior:
- If there is only one netif, we just pick that
- If there are multiple netifs, fail directly with `-EINVAL` rather than
sending out nothing and waiting for a timeout.
Co-authored-by: benpicco <benpicco@googlemail.com>
This increases the robustness of the test by not relying on the
order shell commands are printed in. At least for XFA based shell
commands, there is no guarantee in which order they will be shown in
the help.
This command does the same as `help`, but provides a machine readable
JSON rather than a human readable table. It is only provided when the
(pseudo-)module `shell_builtin_cmd_help_json` is used.
The test following test is flaky:
TEST_ASSERT(msg->send_time > 0U);
It assumes that 0 as time is indicating the time is invalid. But on
`native`, the time will be zero for the first millisecond the test
is launched. Before the interactive sync caused seemingly a reliable
delay of at least one milli second, but this no longer is the case.
This works around the bug by just waiting at the start of the test
until the time is no longer zero, possibly spinning for one millisecond.
The aim is to allow faster test cycles on native for unit test style
apps (that don't need interaction) by bypassing the python test
framework using e.g.:
make RIOT_TERMINAL=native all term
This would work already before, but now is more convenient as no
manual press of the `s` key is needed to start the test.
For non-native boards we need the sync, as otherwise the board may
finish booting before the python test automation framework can capture
output. For `native` and `native64`, we actually control when the RIOT
app is started and do not need to sync.
On a typical machine this can reduce the test cycle by more than 4
seconds.
With this change:
$ time sh -c 'make BOARD=native -C tests/unittests tests-nanocoap -j && make BOARD=native RIOT_TERMINAL=native -C tests/unittests term'
[...]
main(): This is RIOT! (Version: 2024.10-devel-394-gd65dec-tests/no-sync-control)
...................................
OK (35 tests)
[...]
make: Leaving directory '/home/marian.buschsieweke@ml-pa.loc/Repos/software/RIOT/master/tests/unittests'
sh -c 0.30s user 0.24s system 113% cpu 0.476 total
Before t his change:
$ time sh -c 'make BOARD=native -C tests/unittests tests-nanocoap -j && make BOARD=native -C tests/unittests test'
[...]
main(): This is RIOT! (Version: 2024.10-devel-394-gd65dec-tests/no-sync-control)
Help: Press s to start test, r to print it is ready
READY
s
START
...................................
OK (35 tests)
[...]
make: Leaving directory '/home/marian.buschsieweke@ml-pa.loc/Repos/software/RIOT/master/tests/unittests'
sh -c 0.50s user 0.37s system 17% cpu 4.863 total
This changes the API of xfa from
XFA(array_name, prio) type element_name = INITIALIZER;
to
XFA(type, array_name, prio) element_name = INITIALIZER;
this allows forcing natural alignment of the type, fixing failing tests
on `native64`.
This disables adding/removing line breaks by `clang-format`, as this
could very well introduce regressions in code formatting in terms of
our coding convention: If a long array was matching the soft limit of 80
chars per line, `clang-format` would reflow it to match the hard limit
of 100 chars.
One can selectively disable `clang-format` with magic comments. But at
this point, I'd say we should rather disable this feature until we
can configure it in a way to match our coding convention better (without
having to add magic comments).
Before the test used the `help` command to verify that access to the
shell is present. While this does have the benefit of not requiring a
custom command, it does have some robustness issues:
- When new default commands get added, this test will fail
- When the help message of a command gets reworded, the test will fail
- When the order of commands in the test will change, the test will fail
- Note that with the XFA based `SHELL_COMMAND()` macro, we do not
guarantee any particular order. Specifically, the order can change
with implementation details.
This increases the test coverage for XFA:
- Multiple entries are added from a single file
- Priorities are assigned to enforce a given order
- The size of the `struct` to add is changed to no longer be a power of
2