summaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/test-get_hwcap.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 16:03:01 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 16:03:01 +0000
commit14970231a38310b9561052a67b617138eeaad300 (patch)
tree35c201a651afa5d5e4fff241280081b3f88b9c2c /sysdeps/powerpc/test-get_hwcap.c
parentf08c7420b5e8b017a1a47b880a62b15bdc588f4d (diff)
parent25ead03a3712d57df2208fe82f3d316eb8faeaf6 (diff)
Merge commit 'refs/top-bases/t/extern_inline' into t/extern_inline
Diffstat (limited to 'sysdeps/powerpc/test-get_hwcap.c')
-rw-r--r--sysdeps/powerpc/test-get_hwcap.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/sysdeps/powerpc/test-get_hwcap.c b/sysdeps/powerpc/test-get_hwcap.c
index 14fe73b177..0f06f14753 100644
--- a/sysdeps/powerpc/test-get_hwcap.c
+++ b/sysdeps/powerpc/test-get_hwcap.c
@@ -1,5 +1,5 @@
/* Check __ppc_get_hwcap() and __ppc_get_at_plaftorm() functionality.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,6 +23,9 @@
#include <stdint.h>
#include <pthread.h>
+#include <support/check.h>
+#include <support/xthread.h>
+
#include <sys/auxv.h>
#include <dl-procinfo.h>
@@ -148,7 +151,6 @@ do_test (void)
pthread_attr_t attr;
pthread_attr_init (&attr);
pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_JOINABLE);
- void *status;
long i = 0;
@@ -160,22 +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;
- }
- 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");
@@ -184,5 +174,4 @@ do_test (void)
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>