[PATCH] powerpc: Convert tests to the new support test-driver
Rajalakshmi Srinivasaraghavan
raji@linux.vnet.ibm.com
Tue Dec 20 05:30:00 GMT 2016
On 12/20/2016 12:13 AM, Carlos Eduardo Seo wrote:
>
> 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.
>
I think xpthread_check_return() called from xpthread_join()
is already handling it.
> --
> Carlos Eduardo Seo
> Software Engineer - Linux on Power Toolchain
> cseo@linux.vnet.ibm.com
>
>
>
>
>
>
--
Thanks
Rajalakshmi S
More information about the Libc-alpha
mailing list