[libc-commits] [PATCH] D149750: [libc] Enable the '__support' unit tests to be hermetic
Joseph Huber via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed May 3 09:14:04 PDT 2023
jhuber6 added inline comments.
================
Comment at: libc/test/src/__support/CMakeLists.txt:91
+ # This test relies on 'realloc' which is not implemented for hermetic tests.
+ UNIT_TEST_ONLY
SUITE
----------------
sivachandra wrote:
> We do have realloc: https://github.com/llvm/llvm-project/blob/main/libc/test/UnitTest/HermeticTestUtils.cpp#L68
Doesn't `realloc` need to copy the old memory? This just allocates a new pointer, which is going to be zero thus the tests fail and print an empty string.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149750/new/
https://reviews.llvm.org/D149750
More information about the libc-commits
mailing list