This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 5/7] nptl/tst-rwlock14: Test pthread/rwlock_timedwrlock correctly
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: libc-alpha at sourceware dot org
- Date: Tue, 5 Mar 2019 14:36:21 -0300
- Subject: Re: [PATCH 5/7] nptl/tst-rwlock14: Test pthread/rwlock_timedwrlock correctly
- References: <cover.b0c66849a87ca79889a49f2f1f2563b1a8a15d8b.1551291557.git-series.mac@mcrowe.com> <5b1b47a18bf6296b635badfeb7b4d1e1c5225340.1551291557.git-series.mac@mcrowe.com>
On 27/02/2019 15:23, Mike Crowe wrote:
> 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.
This patch looks ok and it should be pushed upstream independently of the
patchset. It also requires a propor ChangeLog.
> ---
> 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;
> }
>
>