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] powerpc: Convert tests to the new support test-driver



On 12/19/16, 3:49 PM, "Wainer dos Santos Moschetta" <libc-alpha-owner@sourceware.org on behalf of wainersm@linux.vnet.ibm.com> wrote:

    diff --git a/sysdeps/powerpc/test-get_hwcap.c b/sysdeps/powerpc/test-get_hwcap.c
    index 14fe73b..14093f0 100644
    --- a/sysdeps/powerpc/test-get_hwcap.c
    +++ b/sysdeps/powerpc/test-get_hwcap.c
    @@ -23,6 +23,8 @@
     #include <stdint.h>
     #include <pthread.h>
    
    +#include <support/xthread.h>
    +
     #include <sys/auxv.h>
    
     #include <dl-procinfo.h>
    @@ -160,18 +162,10 @@ do_test (void)
    
       /* Check for other thread.  */
       i++;
    -  if (pthread_create (&threads[i], &attr, t1, (void *)i))
    -    {
    -      printf ("FAIL: error creating thread %ld.\n", i);
    -      return 1;
    -    }
    +  threads[i] = xpthread_create (&attr, t1, (void *)i);
    
       pthread_attr_destroy (&attr);
    -  if (pthread_join (threads[i], &status))
    -    {
    -      printf ("FAIL: error joining thread %ld.\n", i);
    -      return 1;
    -    }
    +  status = xpthread_join (threads[i]);
       if (status)
         {
           return 1;
    @@ -184,5 +178,4 @@ do_test (void)

I don’t think you should omit the FAIL message here. Other than that, LGTM.


--
Carlos Eduardo Seo
Software Engineer - Linux on Power Toolchain
cseo@linux.vnet.ibm.com
 
 
    



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