HomeClusterLabs Projects

Test: libcrmcommon: Add a cmocka wrapper for calloc.

Description

Test: libcrmcommon: Add a cmocka wrapper for calloc.

It's good to know that we handle such errors as being out of memory, so
here's a way to inject those errors. For our current tests, we are only
ever calling calloc so this is good enough for the moment. As tests are
added, we'll probably need to add additional memory management functions.

Note that a lot of our current tests call functions that call strdup,
which I am not yet handling here. Adding that could be a major
improvement.

Details

Provenance
clumensAuthored on Feb 2 2022, 3:20 PM
Parents
rP3ce9f276f4dc: Test: libcrmcommon: Add unit tests for score2char and score2char_stack.
Branches
Unknown
Tags
Unknown

Event Timeline