Skip to content

[libc] Disable Death Tests While Hermetic #77388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions libc/test/UnitTest/HermeticTestUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ void *__dso_handle = nullptr;

} // extern "C"

void *operator new(size_t size) { return malloc(size); }

void *operator new[](size_t size) { return malloc(size); }

void operator delete(void *) {
// The libc runtime should not use the global delete operator. Hence,
// we just trap here to catch any such accidental usages.
Expand Down
9 changes: 9 additions & 0 deletions libc/test/src/math/smoke/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1214,6 +1214,9 @@ add_fp_unittest(
libc.include.signal
libc.src.math.nanf
libc.src.__support.FPUtil.fp_bits
# FIXME: The nan tests currently have death tests, which aren't supported for
# hermetic tests.
UNIT_TEST_ONLY
)

add_fp_unittest(
Expand All @@ -1227,6 +1230,9 @@ add_fp_unittest(
libc.include.signal
libc.src.math.nan
libc.src.__support.FPUtil.fp_bits
# FIXME: The nan tests currently have death tests, which aren't supported for
# hermetic tests.
UNIT_TEST_ONLY
)

add_fp_unittest(
Expand All @@ -1240,6 +1246,9 @@ add_fp_unittest(
libc.include.signal
libc.src.math.nanl
libc.src.__support.FPUtil.fp_bits
# FIXME: The nan tests currently have death tests, which aren't supported for
# hermetic tests.
UNIT_TEST_ONLY
)

# FIXME: These tests are currently spurious for NVPTX.
Expand Down