abuf: Remove code that prevented test code running
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Wed, 16 Jul 2025 09:03:30 +0000 (10:03 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 23 Jul 2025 23:37:05 +0000 (17:37 -0600)
commitd29c1092ebe113d31bc95792644350592d1211ff
treefe02c7295061c64760edecaa6ad3d5343a328ee9
parent71c96a8b2ab0fbaf49e7e3fe0623e5065bb3400a
abuf: Remove code that prevented test code running

When abuf was introduced some test code was prevented from running using
a 'return 0' early in the functions. A comment said it crashed on
sandbox due to a 'bug' in realloc. Some time later a bug in abuf_realloc
was fixed but this test code was never enabled.

Remove the early 'return 0' instances so that the test code can run.
Also remove some checks that relied on the implementation details of the
U-Boot memory code as these can fail on sandbox which uses system memory
code. Besides that this code should be testing abuf implementation not
the underlying memory code which has its own tests.
Finally use a new #define for the allocs that are meant to fail to
ensure they do fail on all CI platforms.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
test/lib/abuf.c