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

Noah Goldstein via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Apr 13 20:03:29 PDT 2023


goldstein.w.n created this revision.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added projects: libc-project, All.
goldstein.w.n requested review of this revision.

Just seemed to be missing an assertion.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148289

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


Index: libc/test/integration/src/pthread/pthread_once_test.cpp
===================================================================
--- libc/test/integration/src/pthread/pthread_once_test.cpp
+++ libc/test/integration/src/pthread/pthread_once_test.cpp
@@ -28,7 +28,7 @@
 
 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);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148289.513415.patch
Type: text/x-patch
Size: 511 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230414/c88964ca/attachment.bin>


More information about the libc-commits mailing list