From: Mike Crowe Date: Mon, 25 Mar 2019 12:29:50 +0000 (-0300) Subject: nptl/tst-rwlock14: Test pthread_rwlock_timedwrlock correctly X-Git-Tag: glibc-2.30~257 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=82849fde3b8cb9b9396fa8cadf842dc2b1d2cced;p=thirdparty%2Fglibc.git nptl/tst-rwlock14: Test pthread_rwlock_timedwrlock correctly --- diff --git a/ChangeLog b/ChangeLog index 4fcf7db0420..0f4d7465c2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2019-03-25 Mike Crowe + * nptl/tst-rwlock14.c (do_test): Replace duplicate calls to + pthread_rwlock_timedrdlock with calls to + pthread_rwlock_timedwrlock to ensure that the latter is tested + too. Use new function name in diagnostic messages too. + * nptl/tst-sem5.c: Remove unused headers. Add . (do_test) Use libsupport test macros rather than hand-coded conditionals and error messages. Ensure that sem_init returns zero diff --git a/nptl/tst-rwlock14.c b/nptl/tst-rwlock14.c index f8c218395ed..6f57169531a 100644 --- a/nptl/tst-rwlock14.c +++ b/nptl/tst-rwlock14.c @@ -117,15 +117,15 @@ do_test (void) result = 1; } - e = pthread_rwlock_timedrdlock (&r, &ts); + e = pthread_rwlock_timedwrlock (&r, &ts); if (e == 0) { - puts ("second rwlock_timedrdlock did not fail"); + puts ("second rwlock_timedwrlock did not fail"); result = 1; } else if (e != EINVAL) { - puts ("second rwlock_timedrdlock did not return EINVAL"); + puts ("second rwlock_timedwrlock did not return EINVAL"); result = 1; } @@ -145,15 +145,15 @@ do_test (void) result = 1; } - e = pthread_rwlock_timedrdlock (&r, &ts); + e = pthread_rwlock_timedwrlock (&r, &ts); if (e == 0) { - puts ("third rwlock_timedrdlock did not fail"); + puts ("third rwlock_timedwrlock did not fail"); result = 1; } else if (e != EINVAL) { - puts ("third rwlock_timedrdlock did not return EINVAL"); + puts ("third rwlock_timedwrlock did not return EINVAL"); result = 1; }