This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 5/7] nptl/tst-rwlock14: Test pthread/rwlock_timedwrlock correctly



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;
>      }
>  
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]