[NFC] Move setuid.c test into sanitizer_common

GitOrigin-RevId: 33af9a31c012c8b30105d010e3fa67a9e3f1b450
diff --git a/lib/sanitizer_common/sanitizer_linux.cpp b/lib/sanitizer_common/sanitizer_linux.cpp
index fcdb891..5d48f33 100644
--- a/lib/sanitizer_common/sanitizer_linux.cpp
+++ b/lib/sanitizer_common/sanitizer_linux.cpp
@@ -1745,7 +1745,8 @@
   internal_sigfillset(&set);
 #if SANITIZER_LINUX && !SANITIZER_ANDROID
   // Glibc uses SIGSETXID signal during setuid call. If this signal is blocked
-  // on any thread, setuid call hangs (see test/tsan/setuid.c).
+  // on any thread, setuid call hangs.
+  // See test/sanitizer_common/TestCases/Linux/setuid.c.
   internal_sigdelset(&set, 33);
 #endif
   internal_sigprocmask(SIG_SETMASK, &set, &old);
diff --git a/test/tsan/setuid.c b/test/sanitizer_common/TestCases/Linux/setuid.c
similarity index 78%
rename from test/tsan/setuid.c
rename to test/sanitizer_common/TestCases/Linux/setuid.c
index 2d6b7c8..9674ed3 100644
--- a/test/tsan/setuid.c
+++ b/test/sanitizer_common/TestCases/Linux/setuid.c
@@ -1,15 +1,17 @@
-// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
+// RUN: %clang -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
 //
 // setuid(0) hangs on powerpc64 big endian.  When this is fixed remove
 // the unsupported flag.
 // https://llvm.org/bugs/show_bug.cgi?id=25799
 //
 // UNSUPPORTED: powerpc64-unknown-linux-gnu
-#include "test.h"
+
+#include <pthread.h>
+#include <stdio.h>
 #include <sys/types.h>
 #include <unistd.h>
 
-// Setuid call used to hang because the background tsan thread did not handle
+// Setuid call used to hang because the new thread did not handle
 // SIGSETXID signal. Note that we don't care whether setuid call succeeds
 // or not.