zephyr/tests/unit
Piotr Pryga 4a18d615a4 slist: Fix sys_slist_append_list with head and tail NULL break a list
If the sys_slist_t instance is not empty, its head and tail points to
some sys_snode_t instances. If sys_slist_append_list is executed with
tail being NULL the list object is corrupted. Tail of the sys_slist_t
instance is set to NULL. If one executes sys_slist_append on that node,
then nodes pointed by head are lost.

The commit fixes the issue and adds unit tests to verify correct
behavior.

Added change verifies if head and tail of appended list are not NULL.
In other case the list object is invalid and should not be appended
to a valid list instance.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-04-15 11:50:29 -07:00
..
base64 cmake: tests: add cmake_minimum_required() to tests 2021-12-18 14:58:55 +01:00
cbprintf everywhere: fix typos 2022-03-18 13:24:08 -04:00
crc lib: os: crc: Rework the crc16() implementation 2022-02-04 12:33:22 -05:00
intmath everywhere: fix typos 2022-03-18 13:24:08 -04:00
list slist: Fix sys_slist_append_list with head and tail NULL break a list 2022-04-15 11:50:29 -07:00
math_extras cmake: tests: add cmake_minimum_required() to tests 2021-12-18 14:58:55 +01:00
net_timeout cmake: tests: add cmake_minimum_required() to tests 2021-12-18 14:58:55 +01:00
rbtree everywhere: fix typos 2022-03-18 13:24:08 -04:00
timeutil cmake: tests: add cmake_minimum_required() to tests 2021-12-18 14:58:55 +01:00
util sys: util: Change return type of ARRAY_SIZE to size_t 2022-03-23 14:09:23 +01:00
winstream lib/os: Add sys_winstream lockless shared memory byte stream IPC 2022-01-13 14:01:23 -05:00