diff options
author | Anton Lindqvist <anton@cvs.openbsd.org> | 2022-05-13 15:32:50 +0000 |
---|---|---|
committer | Anton Lindqvist <anton@cvs.openbsd.org> | 2022-05-13 15:32:50 +0000 |
commit | 546b2217663e86fb5ca9bc8b44732d66b610e709 (patch) | |
tree | 5b8ca31a676f7270b551314e0a93ec77cd62948e /regress/lib/libpthread | |
parent | 717bc758983a5169f4964fcb886c4400e1c18663 (diff) |
Output the relevant time specs before the assertion, in the hopes of
figuring out why this occasionally fails.
Diffstat (limited to 'regress/lib/libpthread')
-rw-r--r-- | regress/lib/libpthread/semaphore/sem_timedwait/sem_timedwait.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 <mpi@openbsd.org>, 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)); |