Attention is currently required from: Nico Huber, Anastasia Klimchuk.
Anastasia Klimchuk uploaded patch set #2 to this change.
tests: Wrap strdup to help cmocka recognise memory allocation
This is a known issue in cmocka (see
https://github.com/clibs/cmocka/issues/17) where cmocka does not
recognise memory allocation happening inside strdup, and then later
throws an error when the memory is freed. If the issue is fixed at
some point, this workaround can be removed.
Given that cmocka already overrides malloc, calloc, realloc, free,
adding strdup there seems fine.
Existing tests now can (and have to) free the memory they allocated
by strdup, and this is in the same patch.
BUG=b:193584590
TEST=ninja test
Change-Id: I56aef6b342752d80995c36ab075b12198fc101d9
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
---
M tests/init_shutdown.c
M tests/meson.build
M tests/tests.c
3 files changed, 17 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/23/56323/2
To view, visit change 56323. To unsubscribe, or for help writing mail filters, visit settings.