[compiler-rt] [tsan][test] Move the linux specific TSan test to the linux subdirectory (PR #86896)

Nazım Can Altınova via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 27 17:55:01 PDT 2024


https://github.com/canova created https://github.com/llvm/llvm-project/pull/86896

I introduced this test in #86537 but it should only be run on Linux since it's tests Linux syscalls specifically.
This PR moves it to `compiler-rt/test/tsan/Linux/` subdirectory, and removes some unneeded debugging comments in the meantime.

>From c3b83e839567846f00c5e2a5e3728974e9aa5130 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Naz=C4=B1m=20Can=20Alt=C4=B1nova?= <canaltinova at gmail.com>
Date: Thu, 28 Mar 2024 01:45:22 +0100
Subject: [PATCH 1/2] Remove some unneded debug comments

---
 compiler-rt/test/tsan/signal_in_futex_wait.cpp | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/compiler-rt/test/tsan/signal_in_futex_wait.cpp b/compiler-rt/test/tsan/signal_in_futex_wait.cpp
index cf31e5467486ad..485d87d5ee846c 100644
--- a/compiler-rt/test/tsan/signal_in_futex_wait.cpp
+++ b/compiler-rt/test/tsan/signal_in_futex_wait.cpp
@@ -57,16 +57,13 @@ class Mutex {
 Mutex mutex;
 
 void *Thread(void *x) {
-  // fprintf(stderr, "canova here thread 0\n");
   // Waiting for the futex.
   mutex.lock();
-  // fprintf(stderr, "canova here thread 1\n");
   // Finished waiting.
   return nullptr;
 }
 
 static void SigprofHandler(int signal, siginfo_t *info, void *context) {
-  // fprintf(stderr, "canova here sigprof handler\n");
   // Unlock the futex.
   mutex.unlock();
 }

>From 1f65ad400547efe8df47bda33a71b2aee7b18be3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Naz=C4=B1m=20Can=20Alt=C4=B1nova?= <canaltinova at gmail.com>
Date: Thu, 28 Mar 2024 01:47:49 +0100
Subject: [PATCH 2/2] Move the linux specific TSan test to the linux
 subdirectory

---
 compiler-rt/test/tsan/{ => Linux}/signal_in_futex_wait.cpp | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename compiler-rt/test/tsan/{ => Linux}/signal_in_futex_wait.cpp (100%)

diff --git a/compiler-rt/test/tsan/signal_in_futex_wait.cpp b/compiler-rt/test/tsan/Linux/signal_in_futex_wait.cpp
similarity index 100%
rename from compiler-rt/test/tsan/signal_in_futex_wait.cpp
rename to compiler-rt/test/tsan/Linux/signal_in_futex_wait.cpp



More information about the llvm-commits mailing list