+2017-02-21 Wainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com>
+
+ * sysdeps/powerpc/test-get_hwcap.c: Use <support/test-driver.c>
+ instead of test-skeleton.c.
+ (do_test): Replaced pthread_create and pthread_join with
+ xpthread_create and xpthread_join. Use TEST_VERIFY_EXIT macro.
+ Removed unneeded status variable.
+ * sysdeps/powerpc/test-gettimebase.c: Use <support/test-driver.c>
+ instead of test-skeleton.c.
+ * sysdeps/powerpc/tst-tlsopt-powerpc.c: Likewise.
+
2017-02-20 Mike FABIAN <mfabian@redhat.com>
[BZ #20313]
#include <stdint.h>
#include <pthread.h>
+#include <support/check.h>
+#include <support/xthread.h>
+
#include <sys/auxv.h>
#include <dl-procinfo.h>
pthread_attr_t attr;
pthread_attr_init (&attr);
pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_JOINABLE);
- void *status;
long i = 0;
/* 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;
- }
- if (status)
- {
- return 1;
- }
+ TEST_VERIFY_EXIT (xpthread_join (threads[i]) == NULL);
printf("PASS: HWCAP, HWCAP2 and AT_PLATFORM are correctly set in the TCB for"
" all threads.\n");
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>