diff options
author | Andreas Jaeger <aj@suse.de> | 2012-03-14 16:36:17 +0100 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2012-03-14 16:36:17 +0100 |
commit | 356a10ee3ee36bec0af7e8a1c61e353e0af45904 (patch) | |
tree | 421de93f9f53c04d796ccd31102baf135dc55ed8 /nptl/tst-sem13.c | |
parent | a20026128cef2e95ffd15fb293dd6b1e9bf3ae1e (diff) | |
parent | e456826d7a539fb322bb9719297bd386eded8e32 (diff) | |
download | glibc-356a10ee3ee36bec0af7e8a1c61e353e0af45904.tar.gz glibc-356a10ee3ee36bec0af7e8a1c61e353e0af45904.tar.xz glibc-356a10ee3ee36bec0af7e8a1c61e353e0af45904.zip |
Merge branch 'master' into bug13658-branch
Diffstat (limited to 'nptl/tst-sem13.c')
-rw-r--r-- | nptl/tst-sem13.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/nptl/tst-sem13.c b/nptl/tst-sem13.c index 8756b2262f..068d79e85e 100644 --- a/nptl/tst-sem13.c +++ b/nptl/tst-sem13.c @@ -30,12 +30,31 @@ do_test (void) } if (errno != EINVAL) { - puts ("sem_timedwait did not fail with EINVAL"); + perror ("sem_timedwait did not fail with EINVAL"); return 1; } if (u.ns.nwaiters != 0) { - puts ("nwaiters modified"); + printf ("sem_timedwait modified nwaiters: %ld\n", u.ns.nwaiters); + return 1; + } + + ts.tv_sec = /* Invalid. */ -2; + ts.tv_nsec = 0; + errno = 0; + if (sem_timedwait (&u.s, &ts) >= 0) + { + puts ("2nd sem_timedwait did not fail"); + return 1; + } + if (errno != ETIMEDOUT) + { + perror ("2nd sem_timedwait did not fail with ETIMEDOUT"); + return 1; + } + if (u.ns.nwaiters != 0) + { + printf ("2nd sem_timedwait modified nwaiters: %ld\n", u.ns.nwaiters); return 1; } |