Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151982865
D50967.id157411.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D50967.id157411.diff
View Options
diff --git a/cddl/lib/libtpool/tests/libtpool_test.c b/cddl/lib/libtpool/tests/libtpool_test.c
--- a/cddl/lib/libtpool/tests/libtpool_test.c
+++ b/cddl/lib/libtpool/tests/libtpool_test.c
@@ -11,9 +11,12 @@
tp_delay(void *arg)
{
pthread_barrier_t *barrier = arg;
+ int ret;
/* Block this task until all thread pool workers have been created. */
- pthread_barrier_wait(barrier);
+ ret = pthread_barrier_wait(barrier);
+ ATF_REQUIRE_MSG(ret == 0 || ret == PTHREAD_BARRIER_SERIAL_THREAD,
+ "pthread_barrier_wait failed: %s", strerror(ret));
}
/*
@@ -38,7 +41,6 @@
int nworkers;
int r, i;
-
len = sizeof(max_threads_per_proc);
r = sysctlbyname("kern.threads.max_threads_per_proc",
&max_threads_per_proc, &len, NULL, 0);
@@ -65,7 +67,9 @@
ATF_REQUIRE_EQ(tpool_dispatch(tp1, tp_delay, NULL), -1);
/* Cleanup */
- ATF_REQUIRE_EQ(pthread_barrier_wait(&barrier), 0);
+ r = pthread_barrier_wait(&barrier);
+ ATF_REQUIRE_MSG(r == 0 || r == PTHREAD_BARRIER_SERIAL_THREAD,
+ "pthread_barrier_wait failed: %s", strerror(r));
tpool_wait(tp1);
tpool_wait(tp0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 12, 10:25 PM (7 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31376102
Default Alt Text
D50967.id157411.diff (1 KB)
Attached To
Mode
D50967: libtpool/tests: Fix a flaky test
Attached
Detach File
Event Timeline
Log In to Comment