This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] powerpc: Convert tests to the new support test-driver
- From: Carlos Eduardo Seo <cseo at linux dot vnet dot ibm dot com>
- To: Wainer dos Santos Moschetta <wainersm at linux dot vnet dot ibm dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Mon, 19 Dec 2016 16:43:14 -0200
- Subject: Re: [PATCH] powerpc: Convert tests to the new support test-driver
- Authentication-results: sourceware.org; auth=none
- References: <20161219174939.12893-1-wainersm@linux.vnet.ibm.com>
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