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

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


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

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

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

Fixes #112399.


>From 77dac30d91d61f191158b1eda948b75422b571c2 Mon Sep 17 00:00:00 2001
From: Vitaly Buka <vitalybuka at google.com>
Date: Tue, 15 Oct 2024 14:37:07 -0700
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=
 =?UTF-8?q?l=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Created using spr 1.3.4
---
 compiler-rt/lib/sanitizer_common/tests/sanitizer_linux_test.cpp | 1 -
 1 file changed, 1 deletion(-)

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());
 }



More information about the llvm-commits mailing list