-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Description
Describe the bug
The UUID v5 test fails because uuid_generate_v5() requires dynamic memory allocation for the mbedTLS cryptographic operations: uuid.c:95-106
and when using the ARCMWDT toolchain, the system falls back to MINIMAL_LIBC
based on the default selection logic: Kconfig:66-73
When using MINIMAL_LIBC, the CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE defaults to 0: Kconfig:57-60
This means malloc operations will fail, causing the mbedTLS setup to return MBEDTLS_ERR_MD_ALLOC_FAILED, which gets translated to -ENOMEM in the UUID generation function.
Regression
- This is a regression.
Steps to reproduce
Use the ARC MWDT toolchain
Build and run the test by the following command:
west twister -p nsim/nsim_em -W -T tests/lib/uuid
Relevant log output
===================================================================
START - test_uuid_v5
E: CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE is 0
Assertion failed at WEST_TOPDIR/zephyr/tests/lib/uuid/src/main.c:40: uuid_test_uuid_v5: (result == 0 is false)
uuid_generate_v5 returned an error
FAIL - test_uuid_v5 in 0.006 seconds
===================================================================
TESTSUITE uuid failed.
Impact
Annoyance – Minor irritation; no significant impact on usability or functionality.
Environment
OS: Linux
Toolchain (e.g Zephyr SDK, ...): arcmwdt
Commit SHA or Version used: Main 47b07e5
Additional Context
No response