[compiler-rt] e619192 - [NFC][lsan] Rename test function

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 18 12:48:09 PDT 2023


Author: Vitaly Buka
Date: 2023-04-18T12:47:23-07:00
New Revision: e6191923f5201d63c350cfc252f9c038a2051436

URL: https://github.com/llvm/llvm-project/commit/e6191923f5201d63c350cfc252f9c038a2051436
DIFF: https://github.com/llvm/llvm-project/commit/e6191923f5201d63c350cfc252f9c038a2051436.diff

LOG: [NFC][lsan] Rename test function

Added: 
    

Modified: 
    compiler-rt/test/lsan/TestCases/thread_context_crash.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/lsan/TestCases/thread_context_crash.cpp b/compiler-rt/test/lsan/TestCases/thread_context_crash.cpp
index 26acc001841d..815967ca780e 100644
--- a/compiler-rt/test/lsan/TestCases/thread_context_crash.cpp
+++ b/compiler-rt/test/lsan/TestCases/thread_context_crash.cpp
@@ -1,4 +1,4 @@
-// Check that concurent CurrentThreadContext does not crash.
+// Check that concurent GetCurrentThread does not crash.
 // RUN: %clangxx_lsan -O3 -pthread %s -o %t && %run %t 100
 
 // REQUIRES: lsan-standalone
@@ -17,7 +17,7 @@ namespace __lsan {
 class ThreadContextLsanBase *GetCurrentThread();
 }
 
-void *null_func(void *args) {
+void *try_to_crash(void *args) {
   for (int i = 0; i < 100000; ++i)
     __lsan::GetCurrentThread();
   return nullptr;
@@ -28,7 +28,7 @@ int main(int argc, char **argv) {
   for (int i = 0; i < atoi(argv[1]); ++i) {
     threads.resize(10);
     for (auto &thread : threads)
-      pthread_create(&thread, 0, null_func, NULL);
+      pthread_create(&thread, 0, try_to_crash, NULL);
 
     for (auto &thread : threads)
       pthread_join(thread, nullptr);


        


More information about the llvm-commits mailing list