[libc-commits] [libc] c8a29c2 - [LIBC] Actually assert no errors in `pthread_call_once` in its test; NFC

Noah Goldstein via libc-commits libc-commits at lists.llvm.org
Fri Apr 14 11:14:46 PDT 2023


Author: Noah Goldstein
Date: 2023-04-14T13:14:20-05:00
New Revision: c8a29c2dfc56648a79807e0d475c7906f03cb73f

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

LOG: [LIBC] Actually assert no errors in `pthread_call_once` in its test; NFC

Just seemed to be missing an assertion.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D148289

Added: 
    

Modified: 
    libc/test/integration/src/pthread/pthread_once_test.cpp

Removed: 
    


################################################################################
diff  --git a/libc/test/integration/src/pthread/pthread_once_test.cpp b/libc/test/integration/src/pthread/pthread_once_test.cpp
index 8de28413f8c94..201982460c5ea 100644
--- a/libc/test/integration/src/pthread/pthread_once_test.cpp
+++ b/libc/test/integration/src/pthread/pthread_once_test.cpp
@@ -28,7 +28,7 @@ static void pthread_once_func() { ++call_count; }
 
 static void *func(void *) {
   static pthread_once_t flag = PTHREAD_ONCE_INIT;
-  __llvm_libc::pthread_once(&flag, pthread_once_func);
+  ASSERT_EQ(__llvm_libc::pthread_once(&flag, pthread_once_func), 0);
 
   thread_count.fetch_add(1);
 


        


More information about the libc-commits mailing list