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

7139 Commits

Author SHA1 Message Date
Marian Buschsieweke
3b238f7db3
Merge pull request #21042 from maribu/tests/periph/selftest_shield/fix-uart
tests/periph/selftest_shield: Fix UART test
2024-11-26 15:47:43 +00:00
Marian Buschsieweke
d0e4f4d279
Merge pull request #20989 from mguetschow/tests-thread-priority
tests/core/thread_msg: lower thread priority for consistent output order
2024-11-26 15:15:04 +00:00
Marian Buschsieweke
a51d4bd7d9
tests/periph/selftest_shield: fix logic to enable UART test
We cannot use the D0/D1 UART if it is also used for STDIO. However,
the logic did not take into account whether `stdio_uart` was used at
all. This fixes the issue.
2024-11-26 13:35:02 +01:00
Marian Buschsieweke
e7ea668a7f
tests/periph/selftest_shield: release UART after test
Calling `uart_poweroff()` when done with the UART test allows sharing
the underlying hardware e.g. to provide other peripheral interfaces.
One example of this would be the SERCOM3 on the Adafruit Metro M4
Express that is used to provide UART on D1/D0 and SPI on D11/D12/D13.
2024-11-26 13:34:54 +01:00
Mikolai Gütschow
149a26ed25
tests/core/thread_msg: lower thread priority for consistent output order
also drop THREAD_CREATE_WOUT_YIELD flag, since it is not sensible to use when creating lower-priority threads
2024-11-26 13:07:58 +01:00
Marian Buschsieweke
b69d060e35
Merge pull request #21030 from JulianHolzwarth/pr/software/test/cond
tests/core/cond_order/: calling cond signal and broadcast without waiting threads
2024-11-26 05:50:38 +00:00
mguetschow
e9e946dc43
Merge pull request #21032 from JulianHolzwarth/pr/tests/events/pending
tests/sys/events: test if event_timeout_is_pending returns false
2024-11-25 15:32:10 +00:00
JulianHolzwarth
83cf6bf339 tests/sys/events/: test if event_timeout_is_pending returns false
test if event_timeout_is_pending returns false when event_timeout_t is not completly initialized
2024-11-25 12:37:47 +01:00
Teufelchen
1ac0c2cdd1
Merge pull request #20961 from maribu/tests/net/nanocoap_cli/modernize
tests/net/nanocoap_cli: make use of XFA for shell commands
2024-11-25 10:31:13 +00:00
Marian Buschsieweke
c700aa92d4
Merge pull request #21031 from benpicco/net_fixes-misc
drivers/at86rf215: return ENETDOWN when interface is down
2024-11-23 16:30:32 +00:00
Benjamin Valentin
9d22e46fa9 test/net/nanocoap_cli: fix buffer size for get_non 2024-11-22 19:50:20 +01:00
mguetschow
a9108a40dd
Merge pull request #20958 from maribu/sys/shell/xfa-reduce-overhead
sys/shell: reduce overhead of XFA shell commands
2024-11-22 14:03:57 +00:00
Joshua DeWeese
d9593c7caa
Merge pull request #21013 from maribu/build_system/feature-conflict-is-error
build system: error on conflicting features
2024-11-22 13:46:42 +00:00
Marian Buschsieweke
2be92b5e55
rust: bump rust-riot-wrappers 2024-11-22 11:14:34 +01:00
Marian Buschsieweke
9801ca5dd4
Merge pull request #21023 from benpicco/tests/periph/pm-alarm
tests/periph/pm: print some output on alarm
2024-11-21 22:14:35 +00:00
Marian Buschsieweke
d3b28442ba
Merge pull request #21003 from mguetschow/ztimer-overhead-adjust
sys/ztimer: mention ztimer_auto_adjust in relevant places
2024-11-21 16:40:25 +00:00
Benjamin Valentin
8ed05a68e1 tests/periph/pm: print some output on alarm 2024-11-21 14:55:57 +01:00
Marian Buschsieweke
d7d6a3653d
Merge pull request #21006 from maribu/tests/periph/selftest_shield/fix-timer_init
tests/periph/selftest_shield: fix invalid calls to timer_init() + GPIO IRQ tests
2024-11-21 05:44:12 +00:00
Marian Buschsieweke
d8304fa196
tests/build_system: drop warn_conflict app
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.
2024-11-20 21:56:46 +01:00
Marian Buschsieweke
fd30434921
tests/periph/selftest_shield: fix GPIO IRQ testing
The GPIO IRQ tests had a side-effect that IRQs remained configured after
the test case was complete. This caused stray IRQs to trigger on
SAM0 MCUs and they consequently (and incorrectly) failed the test.
2024-11-19 22:25:20 +01:00
Marian Buschsieweke
d1c4b455fb
tests/periph/selftest_shield: fix invalid calls to timer_init()
Calling `timer_init()` with unsupported frequencies on some MCUs just
selects the closest possible frequency. But e.g. on SAM0, using an
unsupported frequency will cause `timer_init()` to fail; which probably
is the better option.

However, a failing calling to `timer_init()` results in a test failure.
This is now worked around by using timer_query_freq() to select a
suitable timer frequency that is supported.
2024-11-19 22:25:15 +01:00
Mikolai Gütschow
d3133c5acc
tests/periph/uart: wait 1ms for HW to trigger RX irq during self-test 2024-11-19 14:47:02 +01:00
Mikolai Gütschow
a0164ff58c
tests/periph/uart: improve error handling and reporting 2024-11-19 14:46:50 +01:00
Mikolai Gütschow
28ec1c5d2e
tests/sys/ztimer_overhead: mention auto_adjust in README and fix typos 2024-11-18 17:28:48 +01:00
benpicco
aee4c1ef9c
Merge pull request #20984 from benpicco/gnrc_pktsnip_t-shrink
sys/net/gnrc/pkt: use `uint8_t` for user count
2024-11-17 17:29:16 +00:00
Benjamin Valentin
cb554fd342 tests/unittests: use proper initializers for gnrc_pktsnip_t 2024-11-16 16:39:32 +01:00
Marian Buschsieweke
d2c52746b3
Merge pull request #20990 from mguetschow/tests-cpu-mpu
tests/cpu/mpu*: exclude boards using highlevel_stdio
2024-11-15 22:46:50 +00:00
Marian Buschsieweke
cfd313cd03
Merge pull request #20988 from mguetschow/tests-shell-skip-reboot
tests/sys/shell: skip reboot for boards using highlevel_stdio
2024-11-15 22:46:45 +00:00
JulianHolzwarth
1ed2f36cd5 tests/cond_order/main.c: testing without waiting threads 2024-11-15 21:13:33 +01:00
Mikolai Gütschow
af5e3d142d
tests/cpu/mpu*: exclude boards using highlevel_stdio 2024-11-14 14:45:30 +01:00
Mikolai Gütschow
1fece9008e
tests/sys/shell: skip reboot for boards using highlevel_stdio 2024-11-14 14:40:54 +01:00
benpicco
77c4a24bcf
Merge pull request #20938 from derMihai/mir/fix_runqueue_pop
core/sched.c: fix _runqueue_pop() removing wrong thread
2024-11-14 12:05:45 +00:00
Mihai Renea
ba71ba72a3 core/sched.c: fix _runqueue_pop() removing wrong thread 2024-11-14 11:05:40 +01:00
Marian Buschsieweke
51d1ebe64a
Merge pull request #20967 from maribu/tests/no-sync-control
tests: no default interactive sync for native
2024-11-14 08:06:48 +00:00
Marian Buschsieweke
562f1f0210
tests: always use interactive sync for timing tests
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`.
2024-11-13 12:37:37 +01:00
Marian Buschsieweke
b60534796a
tests/rust_libs: use shell_builtin_cmd_help_json
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.
2024-11-11 22:05:08 +01:00
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
e436f45871
tests/net/nanocoap_cli: make use of XFA for shell commands 2024-11-06 21:31:55 +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