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
Benjamin Valentin
4c7fc012c5
tests/unittests: nanocoap: add test for coap_find_uri_query()
2024-01-19 10:53:03 +01:00
Benjamin Valentin
d6ca03aaa9
tests/unittests: coap_get_uri_query() -> coap_get_uri_query_string()
2023-12-19 14:02:28 +01:00
Benjamin Valentin
b8ec36aef3
tests/unittests: coap_get_code() -> coap_get_code_decimal()
2023-11-28 13:11:11 +01:00
Benjamin Valentin
c01c470e8f
tests/unittests: nanocoap: add test for extended token
2023-06-05 18:35:29 +02:00
Karl Fessel
c29d2f1afb
test/unittest: cleanup most vera++ complains
2022-10-27 16:31:59 +02:00
Jan Romann
61d1516c6f
tests/nanocoap: add unit test for Accept option helper
2022-10-19 16:44:13 +02:00
Martine Lenders
68f5514ab1
tests: add test for nanocoap_opt_remove()
2022-03-31 09:47:58 +02:00
Jan Romann
4384795cb9
treewide: Remove excessive newlines
2021-08-13 19:50:38 +02:00
Benjamin Valentin
d4e5c25b70
nanocoap: add coap_opt_put_uri_pathquery()
2021-02-23 18:27:54 +01:00
Maciej Jurczak
edf016a6cb
nanocoap: Added token length validation.
...
Implemented a check in coap_parse() to verify if TKL value is within valid range as specified by RFC7252. The token length must be within 0-8 range, any other value should be considered as invalid and the packet should produce message format error.
A test case was added to tests-nanocoap.c to verify correct behavior in case of TKL in range and out of range.
Update sys/net/application_layer/nanocoap/nanocoap.c
Prefixed debug message with module name and abbreviations expanded.
Co-authored-by: Martine Lenders <mail@martine-lenders.eu>
Update sys/net/application_layer/nanocoap/nanocoap.c
Prefixed debug message with module name and abbreviations expanded.
Co-authored-by: Martine Lenders <mail@martine-lenders.eu>
2020-05-25 22:44:50 +02:00
Cenk Gündoğan
0121ff13b8
tests-nanocoap: test adding and retrieving the proxy-uri option
2020-04-23 22:41:46 +02:00
Cenk Gündoğan
c0f4a2c085
tests-nanocoap: add missing full stop in doc
2020-04-23 22:41:12 +02:00
Cenk Gündoğan
ecc4932d22
unittests/nanocoap: test for adding an unterminated string path
2020-04-22 12:50:50 +02:00
Ken Bannister
2d3eb1a343
net/nanocoap: validate empty message length
2020-04-17 08:15:20 -04:00
Leandro Lanzieri
4052c01e85
net/nanocoap: Move NANOCOAP_URI_MAX to 'CONFIG_' namespace
2020-04-07 17:00:53 +02:00
Leandro Lanzieri
c84576ef6e
net/nanocoap: Move NANOCOAP_NOPTS_MAX to 'CONFIG_' namespace
2020-04-07 17:00:52 +02:00
Ken Bannister
7369fac944
tests/nanocoap: use canonical function name to add Uri-Query option
2020-04-06 06:19:44 -04:00
Ken Bannister
2e0a5c053e
tests/nanocoap: add test for coap_opt_add_uquery2()
2020-03-12 08:44:26 -04:00
Ken Bannister
22ce1c140b
net/nanocoap: use new function in query test
2020-01-29 09:23:47 -05:00
Ken Bannister
4ace366e8b
net/nanocoap: add unit test for get opaque option
2019-09-11 05:40:14 -04:00
Ken Bannister
47ef5c1656
net/nanocoap: add unit test for iterate options
2019-08-24 07:46:54 -04:00
Ken Bannister
58faa35156
tests/nanocoap: verify error when overfill buffer
2019-03-19 05:30:04 -04:00
Ken Bannister
715b79a1e7
tests/nanocoap: build request that fills buffer
2019-01-18 12:34:55 -05:00
Ken Bannister
1058a8d07e
tests/nanocoap: add test for option parse overflow
2019-01-14 12:30:06 +01:00
dd53bb89f7
tests/unittests/nanocoap: add test case for option_count overflow
2019-01-14 12:30:06 +01:00
Ken Bannister
fa77929cc7
net/nanocoap: fix string option separator handling
...
Assumed initial character was a separator when writing the option,
and skipped over it.
2018-11-22 09:25:05 -05:00
Ken Bannister
7bb0b0d7eb
unittests/nanocoap: add server side tests
2018-10-15 06:42:37 -04:00
Hauke Petersen
4a59113963
net/nanocoap: use correct type param for _bulid_hdr()
2018-09-26 13:00:39 +02:00
Ken Bannister
cad1ccfa3b
net/nanocoap: add unit test for trailing slash in path
2018-09-11 10:06:57 +02:00
Hauke Petersen
04bc6ee069
unittests/nanocoap: adjust to api changes
2018-08-30 10:31:03 +02:00
Ken Bannister
a7e5562268
net/nanocoap: test coap_get_uri() boundaries
2018-06-27 23:28:37 -04:00
Ken Bannister
aa0d02e994
net/nanocoap: unit tests for pkt-based request
2018-06-10 08:44:16 -04:00
b33ae7df4f
unittests/tests-nanocoap: add coap_get_uri() test
2018-04-10 20:58:06 +02:00
Ken Bannister
7e5d14fbf0
net/nanocoap: add test for message ID byte order
2018-01-12 05:58:52 -05:00