about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMike Crowe <mcrowe@brightsign.biz>2019-03-25 09:29:50 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-03-25 10:36:43 -0300
commit82849fde3b8cb9b9396fa8cadf842dc2b1d2cced (patch)
tree9cce0117bdb1249e93c23e5dddc5739f989d3be2
parent7a773abf7c91f74fdc1866951e123e68713e88e1 (diff)
downloadglibc-82849fde3b8cb9b9396fa8cadf842dc2b1d2cced.tar.gz
glibc-82849fde3b8cb9b9396fa8cadf842dc2b1d2cced.tar.xz
glibc-82849fde3b8cb9b9396fa8cadf842dc2b1d2cced.zip
nptl/tst-rwlock14: Test pthread_rwlock_timedwrlock correctly
-rw-r--r--ChangeLog5
-rw-r--r--nptl/tst-rwlock14.c12
2 files changed, 11 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 4fcf7db042..0f4d7465c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2019-03-25  Mike Crowe  <mac@mcrowe.com>
 
+	* 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 <support/check.h>.
 	(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 f8c218395e..6f57169531 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;
     }