Skip to content

Commit 4c8a69d

Browse files
M-Moawadcfriedt
authored andcommitted
tests: lib: cobs: Fix test setup failure with minimal libc
Set CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=256 for COBS tests to ensure malloc() succeeds during test fixture allocation in cobs_test_setup(). When using minimal libc, CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE defaults to 0, causing malloc() to fail and the zassume_not_null(fixture) assertion to trigger test setup failure. Fixes test execution with minimal libc configurations. Signed-off-by: Mohamed Moawad <[email protected]>
1 parent eb0818a commit 4c8a69d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/lib/cobs/prj.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
CONFIG_COBS=y
22
CONFIG_ZTEST=y
3+
# cobs test needs some heap, but MINIMAL_LIBC has none by default.
4+
CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=256

0 commit comments

Comments
 (0)