summaryrefslogtreecommitdiff
path: root/test/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'test/nptl')
-rw-r--r--test/nptl/Makefile.in10
-rw-r--r--test/nptl/tst-atfork1.c12
-rw-r--r--test/nptl/tst-atfork2.c12
-rw-r--r--test/nptl/tst-atfork2mod.c2
-rw-r--r--test/nptl/tst-barrier2.c11
-rw-r--r--test/nptl/tst-basic4.c12
-rw-r--r--test/nptl/tst-cancel16.c11
-rw-r--r--test/nptl/tst-cancel21.c11
-rw-r--r--test/nptl/tst-cancel4.c12
-rw-r--r--test/nptl/tst-cond12.c11
-rw-r--r--test/nptl/tst-cond4.c11
-rw-r--r--test/nptl/tst-cond6.c11
-rw-r--r--test/nptl/tst-cpuclock1.c12
-rw-r--r--test/nptl/tst-cputimer3.c12
-rw-r--r--test/nptl/tst-exec2.c12
-rw-r--r--test/nptl/tst-exec3.c11
-rw-r--r--test/nptl/tst-flock2.c12
-rw-r--r--test/nptl/tst-fork1.c12
-rw-r--r--test/nptl/tst-fork2.c12
-rw-r--r--test/nptl/tst-fork3.c11
-rw-r--r--test/nptl/tst-fork4.c11
-rw-r--r--test/nptl/tst-getpid3.c12
-rw-r--r--test/nptl/tst-mqueue1.c12
-rw-r--r--test/nptl/tst-mqueue3.c12
-rw-r--r--test/nptl/tst-mqueue5.c12
-rw-r--r--test/nptl/tst-mutex4.c11
-rw-r--r--test/nptl/tst-mutex9.c12
-rw-r--r--test/nptl/tst-rwlock12.c12
-rw-r--r--test/nptl/tst-rwlock4.c11
-rw-r--r--test/nptl/tst-sem3.c11
-rw-r--r--test/nptl/tst-sem4.c12
-rw-r--r--test/nptl/tst-signal1.c11
-rw-r--r--test/nptl/tst-signal2.c11
-rw-r--r--test/nptl/tst-spin2.c11
-rw-r--r--test/nptl/tst-tls3.c10
-rw-r--r--test/nptl/tst-tls3mod.c6
-rw-r--r--test/nptl/tst-tsd6.c12
37 files changed, 395 insertions, 14 deletions
diff --git a/test/nptl/Makefile.in b/test/nptl/Makefile.in
index 35859f9..6f33342 100644
--- a/test/nptl/Makefile.in
+++ b/test/nptl/Makefile.in
@@ -5,9 +5,17 @@ ifeq ($(TARGET_ARCH),metag)
TESTS_DISABLED := tst-cleanup0 tst-cleanupx0
endif
+ifeq ($(TARGET_ARCH),riscv32)
+TESTS_DISABLED := tst-rwlock9
+endif
+
# qemu crash
ifeq ($(TARGET_ARCH),microblaze)
-TESTS_DISABLED := tst-tls2
+TESTS_DISABLED := tst-tls2 tst-cancelx4 tst-cancelx8 tst-cancelx9 tst-cancelx10 tst-cancelx11 \
+ tst-cancelx12 tst-cancelx13 tst-cancelx14 tst-cancelx15 \
+ tst-cancelx16 tst-cancelx18 tst-cancelx20 tst-cancelx21 \
+ tst-cleanupx0 tst-cleanupx1 tst-cleanupx3 tst-oncex3 tst-oncex4 \
+ tst-sem11 tst-sem12
endif
# deadlock
diff --git a/test/nptl/tst-atfork1.c b/test/nptl/tst-atfork1.c
index 483f7a6..2537fc2 100644
--- a/test/nptl/tst-atfork1.c
+++ b/test/nptl/tst-atfork1.c
@@ -24,6 +24,8 @@
#include <sys/wait.h>
#include "../test-skeleton.h"
+#ifdef __ARCH_USE_MMU__
+
static int val;
@@ -118,3 +120,13 @@ do_test (void)
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-atfork2.c b/test/nptl/tst-atfork2.c
index b9808ac..00e96ed 100644
--- a/test/nptl/tst-atfork2.c
+++ b/test/nptl/tst-atfork2.c
@@ -25,6 +25,8 @@
#include <sys/wait.h>
#include "../test-skeleton.h"
+#ifdef __ARCH_USE_MMU__
+
/* Must be exported. */
int val;
@@ -154,3 +156,13 @@ do_test (void)
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-atfork2mod.c b/test/nptl/tst-atfork2mod.c
index 7c592b4..8259721 100644
--- a/test/nptl/tst-atfork2mod.c
+++ b/test/nptl/tst-atfork2mod.c
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <stdlib.h>
+extern void *__dso_handle __attribute__ ((__weak__));
extern int val;
@@ -46,7 +47,6 @@ static void
__attribute__ ((constructor))
init (void)
{
- extern void *__dso_handle;
printf ("dsohandle = %p\n", __dso_handle);
if (pthread_atfork (prepare, parent, child) != 0)
diff --git a/test/nptl/tst-barrier2.c b/test/nptl/tst-barrier2.c
index 8ffcda0..35a74b1 100644
--- a/test/nptl/tst-barrier2.c
+++ b/test/nptl/tst-barrier2.c
@@ -26,6 +26,7 @@
#include <sys/mman.h>
#include <sys/wait.h>
+#ifdef __ARCH_USE_MMU__
static int
do_test (void)
@@ -182,3 +183,13 @@ do_test (void)
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-basic4.c b/test/nptl/tst-basic4.c
index f7bdf1d..02ddf93 100644
--- a/test/nptl/tst-basic4.c
+++ b/test/nptl/tst-basic4.c
@@ -25,6 +25,8 @@
#include <sys/wait.h>
#include "../test-skeleton.h"
+#ifdef __ARCH_USE_MMU__
+
static void
final_test (void)
{
@@ -98,3 +100,13 @@ do_test (void)
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-cancel16.c b/test/nptl/tst-cancel16.c
index a1e3c5a..9a53e99 100644
--- a/test/nptl/tst-cancel16.c
+++ b/test/nptl/tst-cancel16.c
@@ -26,6 +26,7 @@
#include <sys/wait.h>
#include "../test-skeleton.h"
+#ifdef __ARCH_USE_MMU__
static pthread_barrier_t b2;
static int fd;
@@ -229,3 +230,13 @@ do_test (void)
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-cancel21.c b/test/nptl/tst-cancel21.c
index 489c18a..db2d8ae 100644
--- a/test/nptl/tst-cancel21.c
+++ b/test/nptl/tst-cancel21.c
@@ -24,6 +24,7 @@
#include <sys/wait.h>
#include <unistd.h>
+#ifdef __ARCH_USE_MMU__
static int fd[4];
static pthread_barrier_t b;
@@ -291,3 +292,13 @@ do_test (void)
#define TIMEOUT 40
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-cancel4.c b/test/nptl/tst-cancel4.c
index 6eaf5b1..a5fc2ff 100644
--- a/test/nptl/tst-cancel4.c
+++ b/test/nptl/tst-cancel4.c
@@ -39,6 +39,8 @@
#include <sys/wait.h>
#include "../test-skeleton.h"
+#ifdef __ARCH_USE_MMU__
+
#if defined(__GLIBC__) || defined(__UCLIBC__)
#define SIGCANCEL __SIGRTMIN
#else
@@ -2396,3 +2398,13 @@ do_test (void)
#define TIMEOUT 60
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-cond12.c b/test/nptl/tst-cond12.c
index b38d9d5..2f41bcb 100644
--- a/test/nptl/tst-cond12.c
+++ b/test/nptl/tst-cond12.c
@@ -25,6 +25,7 @@
#include <sys/mman.h>
#include <sys/wait.h>
+#ifdef __ARCH_USE_MMU__
static char fname[] = "/tmp/tst-cond12-XXXXXX";
static int fd;
@@ -193,3 +194,13 @@ do_test (void)
return 0;
}
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-cond4.c b/test/nptl/tst-cond4.c
index 47a7380..25bfa82 100644
--- a/test/nptl/tst-cond4.c
+++ b/test/nptl/tst-cond4.c
@@ -26,6 +26,7 @@
#include <sys/wait.h>
#include <stdint.h>
+#ifdef __ARCH_USE_MMU__
int *condition;
@@ -261,3 +262,13 @@ do_test (void)
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-cond6.c b/test/nptl/tst-cond6.c
index f28d4c1..9189989 100644
--- a/test/nptl/tst-cond6.c
+++ b/test/nptl/tst-cond6.c
@@ -28,6 +28,7 @@
#include <sys/wait.h>
#include <stdint.h>
+#ifdef __ARCH_USE_MMU__
int *condition;
@@ -231,3 +232,13 @@ do_test (void)
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-cpuclock1.c b/test/nptl/tst-cpuclock1.c
index 9d68ec5..a7e76be 100644
--- a/test/nptl/tst-cpuclock1.c
+++ b/test/nptl/tst-cpuclock1.c
@@ -26,6 +26,8 @@
#include <signal.h>
#include <sys/wait.h>
+#ifdef __ARCH_USE_MMU__
+
/* This function is intended to rack up both user and system time. */
static void
chew_cpu (void)
@@ -304,3 +306,13 @@ do_test (void)
#define TIMEOUT 5
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-cputimer3.c b/test/nptl/tst-cputimer3.c
index 056766a..335c9f4 100644
--- a/test/nptl/tst-cputimer3.c
+++ b/test/nptl/tst-cputimer3.c
@@ -13,6 +13,8 @@
#include <signal.h>
#include <sys/wait.h>
+#ifdef __ARCH_USE_MMU__
+
static clockid_t child_clock;
#define TEST_CLOCK child_clock
@@ -128,3 +130,13 @@ setup_test (void)
#endif
#include "tst-timer4.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-exec2.c b/test/nptl/tst-exec2.c
index c621b4e..e916fec 100644
--- a/test/nptl/tst-exec2.c
+++ b/test/nptl/tst-exec2.c
@@ -28,6 +28,8 @@
#include <sys/wait.h>
#include "../test-skeleton.h"
+#ifdef __ARCH_USE_MMU__
+
static void *
tf (void *arg)
{
@@ -151,3 +153,13 @@ do_test (void)
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-exec3.c b/test/nptl/tst-exec3.c
index f4a6807..c4683f2 100644
--- a/test/nptl/tst-exec3.c
+++ b/test/nptl/tst-exec3.c
@@ -28,6 +28,7 @@
#include <sys/wait.h>
#include "../test-skeleton.h"
+#ifdef __ARCH_USE_MMU__
static void *
tf (void *arg)
@@ -150,3 +151,13 @@ do_test (void)
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-flock2.c b/test/nptl/tst-flock2.c
index acc6972..dac6c2c 100644
--- a/test/nptl/tst-flock2.c
+++ b/test/nptl/tst-flock2.c
@@ -27,6 +27,8 @@
#include <sys/wait.h>
#include "../test-skeleton.h"
+#ifdef __ARCH_USE_MMU__
+
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t lock2 = PTHREAD_MUTEX_INITIALIZER;
static int fd;
@@ -258,3 +260,13 @@ do_test (void)
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-fork1.c b/test/nptl/tst-fork1.c
index 448255d..8c603b9 100644
--- a/test/nptl/tst-fork1.c
+++ b/test/nptl/tst-fork1.c
@@ -25,6 +25,8 @@
#include <sys/wait.h>
#include "../test-skeleton.h"
+#ifdef __ARCH_USE_MMU__
+
static void *
thread_function (void * arg)
{
@@ -118,3 +120,13 @@ main (void)
return result;
}
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-fork2.c b/test/nptl/tst-fork2.c
index e653d7e..1c4bc2f 100644
--- a/test/nptl/tst-fork2.c
+++ b/test/nptl/tst-fork2.c
@@ -24,6 +24,8 @@
#include <sys/wait.h>
#include "../test-skeleton.h"
+#ifdef __ARCH_USE_MMU__
+
static pid_t initial_pid;
@@ -87,3 +89,13 @@ main (void)
return status;
}
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-fork3.c b/test/nptl/tst-fork3.c
index 434aa8f..defac30 100644
--- a/test/nptl/tst-fork3.c
+++ b/test/nptl/tst-fork3.c
@@ -24,6 +24,7 @@
#include <sys/wait.h>
#include "../test-skeleton.h"
+#ifdef __ARCH_USE_MMU__
static pid_t initial_pid;
@@ -105,3 +106,13 @@ main (void)
return 1;
}
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-fork4.c b/test/nptl/tst-fork4.c
index ee87108..5a86fe2 100644
--- a/test/nptl/tst-fork4.c
+++ b/test/nptl/tst-fork4.c
@@ -24,6 +24,7 @@
#include <sys/wait.h>
#include <string.h>
+#ifdef __ARCH_USE_MMU__
static int
do_test (void)
@@ -62,3 +63,13 @@ do_test (void)
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-getpid3.c b/test/nptl/tst-getpid3.c
index 974cd99..01d1e46 100644
--- a/test/nptl/tst-getpid3.c
+++ b/test/nptl/tst-getpid3.c
@@ -7,6 +7,8 @@
#include <sys/wait.h>
#include "../test-skeleton.h"
+#ifdef __ARCH_USE_MMU__
+
static pid_t pid;
static void *
@@ -112,3 +114,13 @@ do_test (void)
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-mqueue1.c b/test/nptl/tst-mqueue1.c
index f07df0b..1ce364e 100644
--- a/test/nptl/tst-mqueue1.c
+++ b/test/nptl/tst-mqueue1.c
@@ -29,6 +29,8 @@
#include "tst-mqueue.h"
#include "../test-skeleton.h"
+#ifdef __ARCH_USE_MMU__
+
static int
intcmp (const void *a, const void *b)
{
@@ -415,3 +417,13 @@ do_test (void)
}
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-mqueue3.c b/test/nptl/tst-mqueue3.c
index 2cec763..f7bee31 100644
--- a/test/nptl/tst-mqueue3.c
+++ b/test/nptl/tst-mqueue3.c
@@ -34,6 +34,8 @@
#if _POSIX_THREADS
# include <pthread.h>
+#ifdef __ARCH_USE_MMU__
+
static pid_t pid;
static mqd_t m;
static const char message[] = "hello";
@@ -243,3 +245,13 @@ do_test (void)
#endif
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-mqueue5.c b/test/nptl/tst-mqueue5.c
index ea6cc96..c17cfb3 100644
--- a/test/nptl/tst-mqueue5.c
+++ b/test/nptl/tst-mqueue5.c
@@ -34,6 +34,8 @@
#include "tst-mqueue.h"
#include "../test-skeleton.h"
+#ifdef __ARCH_USE_MMU__
+
#define TIMEOUT 3
#if _POSIX_THREADS
@@ -1012,3 +1014,13 @@ do_test (void)
#endif
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-mutex4.c b/test/nptl/tst-mutex4.c
index f66abc0..c18883f 100644
--- a/test/nptl/tst-mutex4.c
+++ b/test/nptl/tst-mutex4.c
@@ -26,6 +26,7 @@
#include <sys/mman.h>
#include <sys/wait.h>
+#ifdef __ARCH_USE_MMU__
static int
do_test (void)
@@ -188,3 +189,13 @@ do_test (void)
#define TIMEOUT 4
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-mutex9.c b/test/nptl/tst-mutex9.c
index 2d5bf75..687a474 100644
--- a/test/nptl/tst-mutex9.c
+++ b/test/nptl/tst-mutex9.c
@@ -28,6 +28,8 @@
#include <sys/time.h>
#include "../test-skeleton.h"
+#ifdef __ARCH_USE_MMU__
+
//int gettimeofday(struct timeval *tv, struct timezone *tz);
@@ -189,3 +191,13 @@ do_test (void)
#define TIMEOUT 3
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-rwlock12.c b/test/nptl/tst-rwlock12.c
index 695e720..123a918 100644
--- a/test/nptl/tst-rwlock12.c
+++ b/test/nptl/tst-rwlock12.c
@@ -27,6 +27,8 @@
#include <sys/wait.h>
#include "../test-skeleton.h"
+#ifdef __ARCH_USE_MMU__
+
static int
do_test (void)
{
@@ -205,3 +207,13 @@ do_test (void)
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-rwlock4.c b/test/nptl/tst-rwlock4.c
index 0bbf083..5067462 100644
--- a/test/nptl/tst-rwlock4.c
+++ b/test/nptl/tst-rwlock4.c
@@ -26,6 +26,7 @@
#include <sys/mman.h>
#include <sys/wait.h>
+#ifdef __ARCH_USE_MMU__
static int
do_test (void)
@@ -187,3 +188,13 @@ do_test (void)
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-sem3.c b/test/nptl/tst-sem3.c
index 1b598dc..3969bc7 100644
--- a/test/nptl/tst-sem3.c
+++ b/test/nptl/tst-sem3.c
@@ -27,6 +27,7 @@
#include <sys/wait.h>
#include "../test-skeleton.h"
+#ifdef __ARCH_USE_MMU__
int
do_test (void)
@@ -143,3 +144,13 @@ do_test (void)
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-sem4.c b/test/nptl/tst-sem4.c
index 4293b2c..1ef1428 100644
--- a/test/nptl/tst-sem4.c
+++ b/test/nptl/tst-sem4.c
@@ -24,6 +24,8 @@
#include <unistd.h>
#include "../test-skeleton.h"
+#ifdef __ARCH_USE_MMU__
+
static void
remove_sem (int status, void *arg)
{
@@ -151,3 +153,13 @@ do_test (void)
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-signal1.c b/test/nptl/tst-signal1.c
index cb31108..54c9a3b 100644
--- a/test/nptl/tst-signal1.c
+++ b/test/nptl/tst-signal1.c
@@ -27,6 +27,7 @@
#include <sys/wait.h>
#include "../test-skeleton.h"
+#ifdef __ARCH_USE_MMU__
static sigset_t ss;
static pthread_barrier_t *b;
@@ -187,3 +188,13 @@ do_test (void)
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-signal2.c b/test/nptl/tst-signal2.c
index 4df0868..3db8ab2 100644
--- a/test/nptl/tst-signal2.c
+++ b/test/nptl/tst-signal2.c
@@ -27,6 +27,7 @@
#include <string.h>
#include "../test-skeleton.h"
+#ifdef __ARCH_USE_MMU__
static sigset_t ss;
static pthread_barrier_t *b;
@@ -196,3 +197,13 @@ do_test (void)
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-spin2.c b/test/nptl/tst-spin2.c
index 6119a3b..af3ec05 100644
--- a/test/nptl/tst-spin2.c
+++ b/test/nptl/tst-spin2.c
@@ -26,6 +26,7 @@
#include <sys/mman.h>
#include <sys/wait.h>
+#ifdef __ARCH_USE_MMU__
static int
do_test (void)
@@ -156,3 +157,13 @@ do_test (void)
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif
diff --git a/test/nptl/tst-tls3.c b/test/nptl/tst-tls3.c
index 5f54948..3765ba2 100644
--- a/test/nptl/tst-tls3.c
+++ b/test/nptl/tst-tls3.c
@@ -25,6 +25,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+
#include "../test-skeleton.h"
#define THE_SIG SIGUSR1
@@ -68,17 +69,11 @@ pthread_barrier_t b;
#define TOTAL_SIGS 1000
int nsigs;
+#define TCB_ALIGNMENT 16
int
do_test (void)
{
-#if !HAVE___THREAD
-
- puts ("No __thread support in compiler, test skipped.");
-
- return 0;
-#else
-
if ((uintptr_t) pthread_self () & (TCB_ALIGNMENT - 1))
{
puts ("initial thread's struct pthread not aligned enough");
@@ -214,7 +209,6 @@ do_test (void)
}
return 0;
-#endif
}
diff --git a/test/nptl/tst-tls3mod.c b/test/nptl/tst-tls3mod.c
index c2cefdf..4b30500 100644
--- a/test/nptl/tst-tls3mod.c
+++ b/test/nptl/tst-tls3mod.c
@@ -24,10 +24,10 @@
#include <stdlib.h>
#include <unistd.h>
-#if HAVE___THREAD
-
static pthread_barrier_t* b = NULL;
+#define TCB_ALIGNMENT 16
+
#define TOTAL_SIGS 1000
static int* nsigs = NULL;
@@ -99,5 +99,3 @@ tf (void *arg)
return NULL;
}
-
-#endif
diff --git a/test/nptl/tst-tsd6.c b/test/nptl/tst-tsd6.c
index ea0a481..7605745 100644
--- a/test/nptl/tst-tsd6.c
+++ b/test/nptl/tst-tsd6.c
@@ -6,6 +6,8 @@
#include <sys/wait.h>
#include "../test-skeleton.h"
+#ifdef __ARCH_USE_MMU__
+
#define NKEYS 100
static pthread_key_t keys[NKEYS];
static pthread_barrier_t b;
@@ -88,3 +90,13 @@ do_test (void)
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+
+#else
+
+int main(void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return 23;
+}
+
+#endif