From: anton Date: Fri, 13 May 2022 15:32:49 +0000 (+0000) Subject: Output the relevant time specs before the assertion, in the hopes of X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6cea90f62a7cf7cc9e535c7671ccd0ca1974f69f;p=openbsd Output the relevant time specs before the assertion, in the hopes of figuring out why this occasionally fails. --- diff --git a/regress/lib/libpthread/semaphore/sem_timedwait/sem_timedwait.c b/regress/lib/libpthread/semaphore/sem_timedwait/sem_timedwait.c index dc39cea75a8..46932154990 100644 --- a/regress/lib/libpthread/semaphore/sem_timedwait/sem_timedwait.c +++ b/regress/lib/libpthread/semaphore/sem_timedwait/sem_timedwait.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sem_timedwait.c,v 1.4 2019/12/20 23:39:01 cheloha Exp $ */ +/* $OpenBSD: sem_timedwait.c,v 1.5 2022/05/13 15:32:49 anton Exp $ */ /* * Martin Pieuchot , 2011. Public Domain. */ @@ -98,6 +98,8 @@ main(int argc, char **argv) delay.tv_nsec = info.tick * 1000; /* usecs -> nsecs */ timespecadd(&delay, &delay, &delay); /* up to two ticks of delay */ timespecadd(&ts, &delay, &ts); + fprintf(stderr, "timeout: expected %lld.%09ld actual %lld.%09ld\n", + ts2.tv_sec, ts2.tv_nsec, ts.tv_sec, ts.tv_nsec); ASSERT(timespeccmp(&ts2, &ts, <=)); CHECKe(sem_destroy(&sem));