077c9d
nptl/tst-rwlock14: Test pthread_rwlock_timedwrlock correctly
077c9d
077c9d
(cherry picked from commit 82849fde3b8cb9b9396fa8cadf842dc2b1d2cced)
077c9d
077c9d
diff --git a/ChangeLog b/ChangeLog
077c9d
index ed1a2ffe8356fd96..74e634670c62d5c2 100644
077c9d
--- a/ChangeLog
077c9d
+++ b/ChangeLog
077c9d
@@ -1,3 +1,10 @@
077c9d
+2019-03-25  Mike Crowe  <mac@mcrowe.com>
077c9d
+
077c9d
+	* nptl/tst-rwlock14.c (do_test): Replace duplicate calls to
077c9d
+	pthread_rwlock_timedrdlock with calls to
077c9d
+	pthread_rwlock_timedwrlock to ensure that the latter is tested
077c9d
+	too. Use new function name in diagnostic messages too.
077c9d
+
077c9d
 2019-01-31  Carlos O'Donell  <carlos@redhat.com>
077c9d
 	    Torvald Riegel  <triegel@redhat.com>
077c9d
 	    Rik Prohaska  <prohaska7@gmail.com>
077c9d
diff --git a/nptl/tst-rwlock14.c b/nptl/tst-rwlock14.c
077c9d
index d6fda87c61e9aed4..073e6c98d2f5cc12 100644
077c9d
--- a/nptl/tst-rwlock14.c
077c9d
+++ b/nptl/tst-rwlock14.c
077c9d
@@ -117,15 +117,15 @@ do_test (void)
077c9d
       result = 1;
077c9d
     }
077c9d
 
077c9d
-  e = pthread_rwlock_timedrdlock (&r, &ts);
077c9d
+  e = pthread_rwlock_timedwrlock (&r, &ts);
077c9d
   if (e == 0)
077c9d
     {
077c9d
-      puts ("second rwlock_timedrdlock did not fail");
077c9d
+      puts ("second rwlock_timedwrlock did not fail");
077c9d
       result = 1;
077c9d
     }
077c9d
   else if (e != EINVAL)
077c9d
     {
077c9d
-      puts ("second rwlock_timedrdlock did not return EINVAL");
077c9d
+      puts ("second rwlock_timedwrlock did not return EINVAL");
077c9d
       result = 1;
077c9d
     }
077c9d
 
077c9d
@@ -145,15 +145,15 @@ do_test (void)
077c9d
       result = 1;
077c9d
     }
077c9d
 
077c9d
-  e = pthread_rwlock_timedrdlock (&r, &ts);
077c9d
+  e = pthread_rwlock_timedwrlock (&r, &ts);
077c9d
   if (e == 0)
077c9d
     {
077c9d
-      puts ("third rwlock_timedrdlock did not fail");
077c9d
+      puts ("third rwlock_timedwrlock did not fail");
077c9d
       result = 1;
077c9d
     }
077c9d
   else if (e != EINVAL)
077c9d
     {
077c9d
-      puts ("third rwlock_timedrdlock did not return EINVAL");
077c9d
+      puts ("third rwlock_timedwrlock did not return EINVAL");
077c9d
       result = 1;
077c9d
     }
077c9d