Using the shell to run unittests allows not needing
to wait for a string at the start of the test which
makes the test independent having the application reset
after the terminal is open.
Using the shell to run unittests allows not needing
to wait for a string at the start of the test which
makes the test independent having the application reset
after the terminal is open. The same goes for triggering
sending UDP test pkts.
The `periph_backup_ram` test expects the CPU to enter Deep Sleep, wake up
(causing a CPU reset) increment a counter and go back to sleep.
Introducing a requirement on interaction after reset breaks the test.
The test application now prints in a loop the input character. In case
stdin is not ready yet after startup this lets the possibility to try to
send several time a character before failing.
The automatic test is now more robust on platforms where stdin takes
time before it gets in a ready state (some AVR, hifive).
To test if GPIO interrupts can wake the CPU from sleep, configure
BTN0 (if availiable) as a wake-up source.
Pressing the buttong should wake up the CPU.
The ubjson module has a number of quality defects and is unsafe.
Considering CBOR is popular, standarized and supported in RIOT and that
the ubjson implementation is a home-grown one whose API will likely be
unfamiliar to new users, I propose to delete it.
This removal, of course, dows not have to be NOW. We can deprecate it for
one or two releases before.
What's wrong with this module?
- Unsafe: the parsing is done recursively. This is embedded in the API, so it
is not possible to fix it without changing the API. A document with too much
nesting can cause a stack overflow.
- Does not validate writing: it is possible to produce invalid output. From
the docs:
> The library won't complain if you write multiple values that are not
> inside an array or object. The result will just not be properly serialized.
- Poorly tested. As shown by #11702, #11703 the tests were not even detecting
that a False was stored as True.
- In line with the previous remark, see
68dc5b0d6e/tests/unittests/tests-ubjson/tests-ubjson.c (L66-L77)
Why is the following code in the unit tests??
```c
irq_disable();
sched_set_status(data->main_thread, STATUS_PENDING);
```
- #2175 is still unfixed after 3.5 years.
- Code quality. The code has multiline macros that assign variables and
return. See c332514875/sys/ubjson/ubjson-write.c (L34-L41)
Can we mark it as deprecated this release and sweep it in the following one?
gnrc_sixlowpan_frag_rm_by_datagram() currently doesn't release the
packet in the reassembly buffer entry removed, meaning it puts a leak
into the packet buffer. This changes the tests to check for that error.