diff options
Diffstat (limited to 'nptl/tst-rwlock14.c')
-rw-r--r-- | nptl/tst-rwlock14.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/nptl/tst-rwlock14.c b/nptl/tst-rwlock14.c index 4451a023f7..b9611a81f0 100644 --- a/nptl/tst-rwlock14.c +++ b/nptl/tst-rwlock14.c @@ -104,7 +104,7 @@ do_test (void) result = 1; } - ts.tv_nsec = 2000000000; + ts.tv_nsec = 1000000000; e = pthread_rwlock_timedrdlock (&r, &ts); if (e == 0) @@ -130,6 +130,34 @@ do_test (void) result = 1; } + ts.tv_nsec = 0x100001000LL; + if (ts.tv_nsec != 0x100001000LL) + ts.tv_nsec = 2000000000; + + e = pthread_rwlock_timedrdlock (&r, &ts); + if (e == 0) + { + puts ("third rwlock_timedrdlock did not fail"); + result = 1; + } + else if (e != EINVAL) + { + puts ("third rwlock_timedrdlock did not return EINVAL"); + result = 1; + } + + e = pthread_rwlock_timedrdlock (&r, &ts); + if (e == 0) + { + puts ("third rwlock_timedrdlock did not fail"); + result = 1; + } + else if (e != EINVAL) + { + puts ("third rwlock_timedrdlock did not return EINVAL"); + result = 1; + } + if (result == 0) puts ("no bugs"); |