1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

7102 Commits

Author SHA1 Message Date
Marian Buschsieweke
77b6264da1
tests/net/gnrc_sixlowpan_frag_sfr_congure: work around bug in test
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.
2024-11-08 20:52:14 +01:00
Marian Buschsieweke
cedfb63a88
tests: no default interactive sync for native
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
2024-11-08 13:24:32 +01:00
benpicco
d65dec6ab5
Merge pull request #20960 from maribu/build_system/xfa/fix-alignment
build_system/xfa: change API to fix alignment
2024-11-07 16:16:28 +00:00
Marian Buschsieweke
2b6f65a08a
build_system/xfa: change API to fix alignment
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`.
2024-11-07 16:30:01 +01:00
Marian Buschsieweke
abb666bf73
tests/sys/shell_lock: increase robustness of the test
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.
2024-11-07 10:45:50 +01:00
Marian Buschsieweke
2839224594
tests/build_system/xfa: improve test coverage
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
2024-11-06 19:34:35 +01:00
Marian Buschsieweke
e52659c4cd
tests/unittests: Increase test coverage for coap_build_reply_header()
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.
2024-11-04 21:18:08 +01:00
Marian Buschsieweke
2b3da3911c
tests/unittests: increase coverage for coap_get_total_hdr_len()
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.
2024-11-01 13:59:20 +01:00
mguetschow
00e25adfe3
Merge pull request #20720 from netd-tud/chacha20-glue-code-implementation
sys/psa_crypto: one-shot Chacha20 support
2024-10-29 16:52:30 +00:00
Marian Buschsieweke
7d1313b3bf
treewide: update rust-riot-wrappers 2024-10-24 09:57:36 +02:00
mguetschow
e5c185b9eb
Merge pull request #20927 from Firobe/dht-fix
drivers/dht: fix null deref with saul
2024-10-21 13:54:50 +00:00
Virgile Robles
7c68f00cd1 drivers/dht: test and doc 2024-10-21 15:13:23 +02:00
benpicco
c48247f984
Merge pull request #20916 from derMihai/mir/event_sync_mainline
sys/event: add event_sync()
2024-10-21 09:55:56 +00:00
Mihai Renea
9996909b65 sys/event: add event_sync() 2024-10-18 13:14:04 +02:00
chrysn
bb3520fff0 treewide: Update Rust dependencies 2024-10-17 16:20:26 +02:00
Wunderbaeumchen
b9396c4739 sys/psa_crypto: chacha20 oneshot gluecode 2024-10-17 10:25:59 +02:00
mguetschow
4f5c0ed3f7
Merge pull request #20894 from Enoch247/littlefs-logging
pkg/littlefs: make use of RIOT's log module instead of pkg provided macros
2024-10-17 08:18:37 +00:00
benpicco
9123b5e8c6
Merge pull request #20911 from fabian18/pr/event_periodic_no_delay
sys/event: add API to start periodic event without initial delay
2024-10-15 22:13:00 +00:00
Joshua DeWeese
96e5f141ac pkg/littlefs: make use of RIOT's logging
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.
2024-10-15 13:05:50 -04:00
Joshua DeWeese
5c6be0cdd7 pkg/littlefs2: make use of RIOT's logging
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.
2024-10-15 13:05:50 -04:00
Fabian Hüßler
d4cd708849 tests/sys/event_ztimer: add event_periodic_start_now() to test 2024-10-14 21:18:27 +02:00
Martine Lenders
5094f03f5d
Merge pull request #20909 from maribu/tests/net/gcoap_forward_proxy
tests/net: add stub test for gcoap_forward_proxy
2024-10-14 14:50:56 +00:00
Marian Buschsieweke
a671229f09
tests/net: add stub test for gcoap_forward_proxy
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.
2024-10-14 16:29:52 +02:00
Marian Buschsieweke
59738ba32d
tests/pkg/emlearn: drop model.h from builddep
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.
2024-10-14 11:20:41 +02:00
Marian Buschsieweke
8c9105c60c
tests/unittests: fix compilation with newlib and GCC 13.2.1
newlib (nano) is missing 64 bit support in stdio and inttypes.h. This
works around the issue.
2024-10-09 22:32:43 +02:00
mguetschow
a54ba26285
Merge pull request #20893 from benpicco/THREAD_CREATE_STACKTEST-cleanup
treewide: clean up remnants of THREAD_CREATE_STACKTEST
2024-10-08 09:55:52 +00:00
Benjamin Valentin
97128eef48 treewide: clean up remnants of THREAD_CREATE_STACKTEST 2024-10-07 17:31:31 +02:00
chrysn
69a89b80ca treewide/rust: cargo fmt 2024-10-02 22:17:08 +02:00
Marian Buschsieweke
2c89b7acd3
tests/pkg/emlearn: add model.h to repo
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.
2024-09-28 18:29:56 +02:00
benpicco
9bdb697edb
Merge pull request #20857 from benpicco/dns_msg-fix_skip
dns_msg: skip RDLENGTH_LENGTH field when skipping record
2024-09-27 15:57:17 +00:00
Benjamin Valentin
0463b2705f
unittests: add test for dns_msg
Co-Authored-By: Martine Lenders <martine.lenders@tu-dresden.de>
2024-09-27 17:40:11 +02:00
mguetschow
5d958957be
Merge pull request #20854 from netd-tud/psa-headers
Various PSA Crypto fixes
2024-09-18 08:10:44 +00:00
Armin Wolf
cf66f712a6 tests/sys/psa_crypto: Add tests for key usage flags
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>
2024-09-17 21:36:39 +02:00
Teufelchen
e31e814cff
Merge pull request #20852 from fabian18/nanocoap_sock_get_non
sys/net/application_layer/nanocoap: add `nanocoap_sock_get_non()`
2024-09-10 15:06:27 +00:00
Fabian Hüßler
d3417dad65 tests/net/nanocoap_cli: add get_non command 2024-09-10 16:43:45 +02:00
benpicco
7dbb298766
Merge pull request #20372 from xnumad/rtr_ltime-test
tests/gnrc_ipv6_nib: rtr_ltime test
2024-09-06 11:36:39 +00:00
benpicco
73e90c5049
Merge pull request #20371 from xnumad/nib-next-hop-addr
gnrc_ipv6_nib: Force unspecified next hop addresses
2024-09-02 12:13:28 +00:00
xnumad
560d8c8ee5 gnrc_ipv6_nib: test: Force unspecified next hop addresses 2024-08-31 10:40:17 +02:00
Frederik Haxel
6ef197688f pkg/lvgl: Increase default LV_MEM_SIZE for 64 bit and enable tests for native64 2024-08-29 15:03:18 +02:00
48ccf9c482
tests/pkg/emlearn: update generated model 2024-08-29 10:01:42 +02:00
xnumad
e767e4451a tests/gnrc_ipv6_nib: refactor: extract DAD test 2024-08-27 17:03:45 +02:00
xnumad
40c9dc8320 tests/gnrc_ipv6_nib: rtr_ltime test: Test before removing from DRL
Keep testing for options before removing default router
2024-08-27 12:32:12 +02:00
chrysn
b802a19059 rust: Remove ek-lm4f120x board from blacklist 2024-08-23 13:48:44 +02:00
chrysn
ea40036529 rust: Update all locked versions
This pulls in several updates for which there is no urgent need, but
also no good reason *not* to do them (especially as they may contain bug
fixes, even critical ones).
2024-08-22 17:49:39 +02:00
chrysn
2ef929369f rust: Update locked riot-wrappers and riot-example-modules versions 2024-08-22 17:49:25 +02:00
chrysn
c0288f7d40 rust: Update to riot-wrappers 0.9 2024-08-22 17:33:40 +02:00
chrysn
a26366371d sys/ztimer: Remove the deprecated ztimer_now64
This has been scheduled for removal after 2022.10, and its replacement
ztimer64_now has long been available.
2024-08-20 20:52:37 +02:00
Marian Buschsieweke
af61cf40e3
tests/periph/gpio_ll: add delays to test_switch_dir()
In all other tests we added a delay after writing to the output buffer
of GPIO A before expected the input buffer of GPIO B (connected to A)
to reflect the change, but not in test_switch_dir().

This adds the delay here as well to make the test more robust in regard
to GPIO peripherals that react not as fast as the CPU can query them.
2024-08-08 16:22:36 +02:00
Marian Buschsieweke
a6b459eff3
drivers/periph/gpio_ll: change gpio_ll_switch_dir API
It turns out that the feature to switch the GPIO direction quickly
is not only a way to emulate open drain / open source mode for less
sophisticated GPIO peripherals that do not natively support it.
It also enables tri-state output (push-pull high, push-pull low,
high impedance), which is useful e.g. for driven charlieplexed LEDs
quickly.

This changes the API by introducing a `gpio_ll_prepare_switch_dir()`
function that prepares the value used to identify which pins should
be switched to input or to output mode. This is useful for GPIO
peripherals in which the GPIO mode register does not allocate one bit
per pin (so that only the direction is given there), such as the one
for STM32. This allows an STM32 implementation in which preparing the
bitmask needed to modify the direction of pins is not trivial.
2024-08-08 16:22:36 +02:00
Marian Buschsieweke
422042bd00
drivers/periph_gpio_ll_irq: make support for both edges optional
The assumption that every MCU has this feature turned out wrong. Hence,
add a feature to allow testing for support of edge triggered IRQs on
both flanks.
2024-08-02 13:41:36 +02:00