This is no longer a warning but an error.
Also: This is already covered by the static tests via
`dist/tools/feature_resolution/check.sh`, which uses a lot less CPU
time in the CI.
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`.
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.
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`.
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
This increases test coverage for coap_build_reply_header() for the case
that extended tokens are used. The test validates the correctness of
the return value and the correctness of the assembled reply.
Previously the corner case when RFC 8974 extended TKL fields are used
the result of coap_get_totel_hdr_len() was not tested, resulting in a
bug slipping through the test. This increase the test coverage.
This patch replaces the package supplied logging macros with RIOT's. It
also removes the requirement that DEVELHELP be defined to enable
logging. Instead, logging can be enabled/dissabled via the log level.
This patch replaces the package supplied logging macros with RIOT's. It
also removes the requirement that DEVELHELP be defined to enable
logging. Instead, logging can be enabled/dissabled via the log level.
The patch also replaceses the package's trace macro with RIOT's DEBUG
macro.
This adds enough to do compile testing for gcoap_forward_proxy.
A proper test would still be needed, though.
This still already exposed compilation issues.
Now that model.h is in the repo, it no longer is a build dependency.
This allows compilation of the test without having emlearn installed,
which is useful e.g. for build testing.
The Makefile rule to regenerate model.h has been left in place, but
just adding the header to the test allows to build the application
without heaving emlearn installed, which is convenient for the CI.
Actual users of emlearn will like still want to generate the header.
Add some tests to verify that when creating or importing keys,
the usage flags PSA_KEY_USAGE_SIGN_HASH/PSA_KEY_USAGE_VERIFY_HASH
automatically set the usage flags PSA_KEY_USAGE_SIGN_MESSAGE/
PSA_KEY_USAGE_VERIFY_MESSAGE on the key.
Signed-off-by: Armin Wolf <W_Armin@gmx.de>