From patchwork Wed Feb 27 18:23:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Crowe X-Patchwork-Id: 31629 Received: (qmail 51012 invoked by alias); 27 Feb 2019 18:27:18 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 50988 invoked by uid 89); 27 Feb 2019 18:27:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=suffered, Hx-languages-length:1494 X-HELO: avasout02.plus.net X-CM-Score: 0.00 From: Mike Crowe To: libc-alpha@sourceware.org Cc: Mike Crowe Subject: [PATCH 5/7] nptl/tst-rwlock14: Test pthread/rwlock_timedwrlock correctly Date: Wed, 27 Feb 2019 18:23:55 +0000 Message-Id: <5b1b47a18bf6296b635badfeb7b4d1e1c5225340.1551291557.git-series.mac@mcrowe.com> In-Reply-To: References: In-Reply-To: References: The tests for out-of-bounds timespecs first test pthread_rwlock_timedrdlock and then pthread_rwlock_timedwrlock. It appears that the second and third tests suffered from copy-and-paste errors and each test pthread_rwlock_timedrdlock twice in a row. Let's correct that so that pthread_rwlock_timedwrlock is tested too. --- nptl/tst-rwlock14.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nptl/tst-rwlock14.c b/nptl/tst-rwlock14.c index f8c2183..6f57169 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; }