1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-20 20:13:50 +01:00

1369 Commits

Author SHA1 Message Date
mguetschow
f572bbeef9
Merge pull request #21610 from mguetschow/unicoap-test-stack-overflow
unittests/unicoap: statically allocate option buffers
2025-07-24 16:05:06 +00:00
Mikolai Gütschow
86237726a0
unittests/unicoap: statically allocate option buffers 2025-07-24 15:58:26 +02:00
benpicco
4f9f755f99
Merge pull request #20197 from benpicco/coap_iterate_uri_query
nanocoap: add coap_iterate_uri_query()
2025-07-24 11:35:51 +00:00
Benjamin Valentin
09fb1527c1 tests/unittests: extend tests with coap_iterate_uri_query() 2025-07-24 13:18:06 +02:00
Teufelchen1
944eb05727 net/mac: Remove deprecated 802.15.4 module 2025-07-21 12:57:15 +02:00
Mikolai Gütschow
ec3ca22393
unittests/unicoap: reduce buffer size to fit on stack
the default unittest stacksize is set to THREAD_STACKSIZE_LARGE which is 2048 for cortexm_common
2025-07-17 14:24:09 +02:00
Teufelchen1
55713e0578 tests/unittests: Add missing module dependency to enable UDP 2025-07-14 10:40:25 +02:00
Carl Seifert
0ab0a68804 tests/unittests: add tests for parser, options, and message APIs 2025-07-07 17:27:40 +02:00
Teufelchen1
166ffcb027 driver/slip: Add slipmux frames 2025-07-02 12:12:53 +02:00
Teufelchen1
65fc4b0f3f checksum: Add crc16-fcs / IBM-SDLC 2025-06-16 16:18:50 +02:00
crasbe
a8ccd544e6 tests/unittests: Add unittest for CRC8-LSB 2025-06-07 11:43:25 +02:00
Marian Buschsieweke
cac44edec7
tree-wide: replace multiple empty lines with one
For each C source/header `$file`: `sed -e '/^$/N;/^\n$/D' -i $file`.
2025-05-21 22:51:04 +02:00
Marian Buschsieweke
1b70a59ded
tree-wide: add the NONSTRING attribute where needed
This declares all char arrays that intentionally are lacking the
terminated zero byte as `NONSTRING`.
2025-04-27 22:49:22 +02:00
Marian Buschsieweke
a862dc6794
Merge pull request #21428 from benpicco/sys/bcd_buf_from_str
sys/bcd: add `bcd_buf_to_u32()` and `bcd_buf_from_str()`
2025-04-26 14:02:28 +00:00
Benjamin Valentin
444fc84697 tests/unittests: add tests for bcd_buf_to_u32() and bcd_buf_from_str() 2025-04-25 18:48:18 +02:00
Marian Buschsieweke
60e31027b9
tests/unittests/core: reformat code
This should fix the column length warning of the static tests.
2025-04-23 20:39:42 +02:00
Marian Buschsieweke
0602bea5ae
tests/unittests/texts-core-clist: improve unit test
- Iterate of different lengths of unsorted data to also cover corner case
  one-item list
- Actually check that the list is sorted afterwards (and not just that
  the maximum got sorted in last)
- Actually check that the list was stable-sorted (as the API doc
  promises a stable sort)
- Increase the length of the input data for better test coverage
- Check that no elements get lost while sorting

Co-authored-by: crasbe <crasbe@gmail.com>
2025-04-23 20:39:29 +02:00
fabian18
db0f497c61
Merge pull request #21391 from fabian18/pr/fmt_time
sys/fmt: add {fmt,scn}_time_tm_iso8601
2025-04-10 19:28:17 +00:00
Fabian Hüßler
29b8af8a85 tests/unittests/tests-fmt: test ISO 8601 format functions 2025-04-10 16:42:24 +02:00
Joshua DeWeese
dcf71b510d
Merge pull request #21344 from Enoch247/fix-isrpipe
sys/isrpipe: unit tests, doc, and fix init
2025-04-09 23:56:03 +00:00
Joshua DeWeese
a749e3493d sys/isrpipe: add unit tests
This patch adds unit tests for the isrpipe module.
2025-04-08 20:17:04 -04:00
Marian Buschsieweke
db0be36345
tree-wide: mixed back of documentation fixes
This fixes a number of documentation issues that LLVM/clang would flag
with `-Wdocumentation`.
2025-04-07 15:59:13 +02:00
mguetschow
57de45cf89
Merge pull request #21308 from benpicco/dec_as_hex
sys/bcd: add bcd_buf_from_u32()
2025-04-03 10:48:33 +00:00
Joshua DeWeese
f265cec494 tests/unittests: fix include guards in doc example
This patch updates the example given to conform to the recomended
placement of include guards.

See issue #21335
2025-04-02 20:11:50 -04:00
Benjamin Valentin
8f4dec6559 tests/unittests: add test for bcd_buf_from_u32() 2025-04-02 19:00:48 +02:00
Benjamin Valentin
a104c3f3e0 tests/unittests: add test for reverse_buf() 2025-04-02 18:45:37 +02:00
Mikolai Gütschow
69c15e1754
boards: make BOARD=native an alias for BOARD=native32 2025-04-01 12:39:06 +02:00
Marian Buschsieweke
e22e357374
tests/unittests: add hack for nanocoap
nanocoap depends on sock_udp, which in turn needs `sock_types.h` to be
available. When no network stack is in use, that sadly is not the case.
To work around the issue, we just manually add the include paths if
`gnrc_sock` is not used.

This fixes an issue with compilation of only the nanocoap unit tests
without also including the GNRC tests.
2025-02-05 15:01:47 +01:00
mguetschow
e1cd685f16
Merge pull request #21167 from maribu/tests/unittests/nanocoap/invalid_option
tests/unittests: test parsing of out-of-bounds CoAP opt
2025-01-28 09:08:25 +00:00
Marian Buschsieweke
e64e5cd369
tests/unittests: test parsing of out-of-bounds CoAP opt
This adds a unit test to nanocoap that checks that nanocoap's
`coap_parse()` indeed returns `-EBADMSG` when a CoAP Option exceeds the
packet's boundaries. This is relied upon in the option parsing code
at various places by omitting the bounds checking, so we should better
make sure that bounds checking is done correctly here and those
functions can indeed rely upon bounds checking being done correctly
before.
2025-01-27 18:12:55 +01:00
Kevin "Tristate Tom" Weiss
19cde44b64
Merge pull request #20966 from crasbe/pr/remove_nrf6310
boards/nrf6310: Remove nRF6310 board from RIOT
2025-01-27 10:22:16 +00:00
Karl Fessel
254d1336d3 tests/test-rtc: test retrieval of unix-time 2025-01-24 16:35:17 +01:00
crasbe
80e94a5906 tests/*: remove nRF6310 board 2025-01-22 16:01:42 +01:00
benpicco
243ca3114b
Merge pull request #20843 from benpicco/string_writer
sys/string_utils: add string_writer helper
2024-12-20 16:36:09 +00:00
Benjamin Valentin
2bf4c715d8 unittests: add test for string_writer 2024-12-17 12:38:14 +01:00
Marian Buschsieweke
4d44abcc0e
Merge pull request #21073 from benpicco/sys/chunked_ringbuffer-start_discard
sys/chunked_ringbuffer: discard stale chunk when starting a new one
2024-12-14 09:28:14 +00:00
Benjamin Valentin
532f018b3a tests/unittests: chunked_ringbuffer: add test for half-written chunk 2024-12-13 16:30:28 +01:00
Marian Buschsieweke
c7af4b25a6
sys/net/nanocoap: fix invalid RST messages
An RST message has no token, so don't reply with a token when sending
RST.

This also adds unit tests to ensure this this exact bug does not sneak
back in.
2024-12-12 14:28:28 +01:00
Marian Buschsieweke
6b1279348a
sys/fmt: add scn_buf_hex()
This adds a function to convert a hex string to a byte array.
2024-12-12 14:28:28 +01:00
Benjamin Valentin
cb554fd342 tests/unittests: use proper initializers for gnrc_pktsnip_t 2024-11-16 16:39:32 +01: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
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
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
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
xnumad
560d8c8ee5 gnrc_ipv6_nib: test: Force unspecified next hop addresses 2024-08-31 10:40:17 +02:00
Benjamin Valentin
312a550f1a treewide: remove THREAD_CREATE_STACKTEST from thread creation 2024-07-29 11:45:58 +02:00
Marian Buschsieweke
48838f4b83
Merge pull request #20513 from maribu/sys/vfs/atomic_utils
sys/vfs: use atomic_utils rather C11 atomics
2024-04-16 06:04:18 +00:00
Teufelchen1
0ddbba3bef unittests: Move at test to driver tests 2024-04-05 13:17:04 +02:00
Teufelchen1
96e748d959 sys/phydat: Remove deprecated print function
Co-authored-by: Marian Buschsieweke <maribu@users.noreply.github.com>
2024-04-03 15:29:19 +02:00