[LIBC] Actually assert no errors in `pthread_call_once` in its test; NFC
authorNoah Goldstein <goldstein.w.n@gmail.com>
Fri, 14 Apr 2023 17:34:27 +0000 (12:34 -0500)
committerNoah Goldstein <goldstein.w.n@gmail.com>
Fri, 14 Apr 2023 18:14:20 +0000 (13:14 -0500)
Just seemed to be missing an assertion.

Reviewed By: sivachandra

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

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

index 8de2841..2019824 100644 (file)
@@ -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);