[libc-commits] [libc] [libc][test] Fix TEST->TEST_F typo in getenv_and_setenv_test.cpp (PR #94304)
Jordan Rupprecht via libc-commits
libc-commits at lists.llvm.org
Mon Jun 3 19:05:01 PDT 2024
https://github.com/rupprecht created https://github.com/llvm/llvm-project/pull/94304
This manifests as `AddressSanitizer: stack-use-after-return` w/o this change. The `~CheckFEnv()` method of checking fenv seems to only work for test fixtures.
>From 8c674d0adad8f46928ab16f189e0be0202d62655 Mon Sep 17 00:00:00 2001
From: Jordan Rupprecht <rupprecht at google.com>
Date: Mon, 3 Jun 2024 19:00:57 -0700
Subject: [PATCH] [libc][test] Fix TEST->TEST_F typo in
getenv_and_setenv_test.cpp
This manifests as `AddressSanitizer: stack-use-after-return` w/o this change. The `~CheckFEnv()` method of checking fenv seems to only work for test fixtures.
---
libc/test/src/fenv/getenv_and_setenv_test.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/test/src/fenv/getenv_and_setenv_test.cpp b/libc/test/src/fenv/getenv_and_setenv_test.cpp
index 7257e75cb421a..8fc2787ecb5b1 100644
--- a/libc/test/src/fenv/getenv_and_setenv_test.cpp
+++ b/libc/test/src/fenv/getenv_and_setenv_test.cpp
@@ -41,7 +41,7 @@ TEST_F(LlvmLibcFEnvTest, GetEnvAndSetEnv) {
}
}
-TEST(LlvmLibcFenvTest, Set_FE_DFL_ENV) {
+TEST_F(LlvmLibcFEnvTest, Set_FE_DFL_ENV) {
// We will disable all exceptions to prevent invocation of the exception
// handler.
LIBC_NAMESPACE::fputil::disable_except(FE_ALL_EXCEPT);
More information about the libc-commits
mailing list