[compiler-rt] [NFC] Remove unnececary check from test (PR #112438)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 14:37:58 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Vitaly Buka (vitalybuka)

<details>
<summary>Changes</summary>

Important part of the test to have correct
`ThreadDescriptorSize` after `InitTlsSize()`.

It's not a problem if another test called
`InitTlsSize()` before.

Fixes #<!-- -->112399.


---
Full diff: https://github.com/llvm/llvm-project/pull/112438.diff


1 Files Affected:

- (modified) compiler-rt/lib/sanitizer_common/tests/sanitizer_linux_test.cpp (-1) 


``````````diff
diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_linux_test.cpp b/compiler-rt/lib/sanitizer_common/tests/sanitizer_linux_test.cpp
index ce4a40444cd496..70669ab81691b8 100644
--- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_linux_test.cpp
+++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_linux_test.cpp
@@ -205,7 +205,6 @@ TEST(SanitizerLinux, ThreadDescriptorSize) {
   void *result;
   ASSERT_EQ(0, pthread_create(&tid, 0, thread_descriptor_size_test_func, 0));
   ASSERT_EQ(0, pthread_join(tid, &result));
-  EXPECT_EQ(0u, ThreadDescriptorSize());
   InitTlsSize();
   EXPECT_EQ((uptr)result, ThreadDescriptorSize());
 }

``````````

</details>


https://github.com/llvm/llvm-project/pull/112438


More information about the llvm-commits mailing list