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