summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2017-01-13 15:28:02 +0000
committerkettenis <kettenis@openbsd.org>2017-01-13 15:28:02 +0000
commit39341bfbf26f628019b3cd32b6acd3e348f30d36 (patch)
tree01b80d5bf785fcc9d82537c2ff27ba9d80bbd859
parentI accidentally committed three lines from the future. (diff)
downloadwireguard-openbsd-39341bfbf26f628019b3cd32b6acd3e348f30d36.tar.xz
wireguard-openbsd-39341bfbf26f628019b3cd32b6acd3e348f30d36.zip
Let these hppa-specific tests print "SKIPPED" on non-hppa architectures.
Include some missing header files while I'm there.
-rw-r--r--regress/sys/arch/hppa/probe/probe.c17
-rw-r--r--regress/sys/arch/hppa/sfuid/sfuid.c17
2 files changed, 32 insertions, 2 deletions
diff --git a/regress/sys/arch/hppa/probe/probe.c b/regress/sys/arch/hppa/probe/probe.c
index 057a0b63b8e..6462ddee58e 100644
--- a/regress/sys/arch/hppa/probe/probe.c
+++ b/regress/sys/arch/hppa/probe/probe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: probe.c,v 1.2 2014/04/18 14:38:21 guenther Exp $ */
+/* $OpenBSD: probe.c,v 1.3 2017/01/13 15:28:02 kettenis Exp $ */
/*
* Written by Michael Shalayeff, 2004. Public Domain.
@@ -8,8 +8,12 @@
#include <signal.h>
#include <unistd.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <err.h>
+#ifdef __hppa__
+
char moo[] = "moo"; /* writable */
const char blah[] = "blah"; /* not */
volatile char *label;
@@ -66,3 +70,14 @@ main(int argc, char *argv[])
exit(0);
}
+
+#else
+
+int
+main(int argc, char *argv[])
+{
+ printf("SKIPPED\n");
+ exit(0);
+}
+
+#endif
diff --git a/regress/sys/arch/hppa/sfuid/sfuid.c b/regress/sys/arch/hppa/sfuid/sfuid.c
index 53256210111..10f8d634bbd 100644
--- a/regress/sys/arch/hppa/sfuid/sfuid.c
+++ b/regress/sys/arch/hppa/sfuid/sfuid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sfuid.c,v 1.2 2014/04/18 14:38:21 guenther Exp $ */
+/* $OpenBSD: sfuid.c,v 1.3 2017/01/13 15:28:02 kettenis Exp $ */
/*
* Written by Michael Shalayeff, 2004. Public Domain.
@@ -8,8 +8,12 @@
#include <signal.h>
#include <unistd.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <err.h>
+#ifdef __hppa__
+
#define sfuid(i,r) __asm volatile( \
"spop1,%1,0 %0" : "=r" (r) : "i" (i))
@@ -53,3 +57,14 @@ main(int argc, char *argv[])
exit(0);
}
+
+#else
+
+int
+main(int argc, char *argv[])
+{
+ printf("SKIPPED\n");
+ exit(0);
+}
+
+#endif