Blob Blame History Raw
nptl/tst-rwlock14: Test pthread_rwlock_timedwrlock correctly

(cherry picked from commit 82849fde3b8cb9b9396fa8cadf842dc2b1d2cced)

diff --git a/ChangeLog b/ChangeLog
index ed1a2ffe8356fd96..74e634670c62d5c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +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.
+
 2019-01-31  Carlos O'Donell  <carlos@redhat.com>
 	    Torvald Riegel  <triegel@redhat.com>
 	    Rik Prohaska  <prohaska7@gmail.com>
diff --git a/nptl/tst-rwlock14.c b/nptl/tst-rwlock14.c
index d6fda87c61e9aed4..073e6c98d2f5cc12 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;
     }