Files
u-boot/test/lib
Simon Glass 654efb5edd test: Use TOTAL_MALLOC_LEN for abuf and alist tests
Several tests use CONFIG_SYS_MALLOC_LEN to test allocations that should
fail due to exceeding pool size. However, the actual malloc pool size is
TOTAL_MALLOC_LEN, which includes CONFIG_ENV_SIZE for boards that need to
store the environment in RAM. The extra space accommodates:

- the hash table allocated via calloc()
- strdup() calls for each environment variable key
- strdup() calls for each environment variable value

This is an estimate and typically consumes less than CONFIG_ENV_SIZE,
leaving more free space in the malloc pool than was reserved.

On qemu-x86_64, CONFIG_ENV_SIZE is 0x40000, making the actual pool
0x240000 bytes. Tests expecting malloc(CONFIG_SYS_MALLOC_LEN) to fail
might unexpectedly succeed since there's more space available.

Update all tests to use TOTAL_MALLOC_LEN to correctly reflect the actual
malloc pool size.

Co-developed-by: Claude <noreply@anthropic.com>
2025-12-01 15:57:28 +00:00
..
2025-12-01 15:42:04 +00:00
2025-05-16 14:45:25 +02:00
2025-12-01 15:42:04 +00:00
2025-05-16 10:27:13 +02:00