[libc-commits] [PATCH] D149750: [libc] Enable the '__support' unit tests to be hermetic
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed May 3 09:17:52 PDT 2023
sivachandra accepted this revision.
sivachandra added inline comments.
This revision is now accepted and ready to land.
================
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
----------------
jhuber6 wrote:
> 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.
Ah, yes! Indeed!
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