summaryrefslogtreecommitdiff
path: root/regress/lib
diff options
context:
space:
mode:
authorMarco S Hyman <marc@cvs.openbsd.org>2001-11-09 00:13:33 +0000
committerMarco S Hyman <marc@cvs.openbsd.org>2001-11-09 00:13:33 +0000
commit6173b5a2974ff4b0a0b528da6ceeba4cd6d0d87b (patch)
treec9853cc9d87ef451b5907707927d6841b5018bc1 /regress/lib
parenta2c2f6758bc8f4b18f0594d4bc37b610b8f60c27 (diff)
another pthread regression test: system/waitpid/wait4
Diffstat (limited to 'regress/lib')
-rw-r--r--regress/lib/libc_r/Makefile4
-rw-r--r--regress/lib/libc_r/system/Makefile6
-rw-r--r--regress/lib/libc_r/system/system.c27
-rw-r--r--regress/lib/libpthread/Makefile4
-rw-r--r--regress/lib/libpthread/system/Makefile6
-rw-r--r--regress/lib/libpthread/system/system.c27
6 files changed, 70 insertions, 4 deletions
diff --git a/regress/lib/libc_r/Makefile b/regress/lib/libc_r/Makefile
index bbc47baea6a..a6925e33452 100644
--- a/regress/lib/libc_r/Makefile
+++ b/regress/lib/libc_r/Makefile
@@ -1,9 +1,9 @@
-# $OpenBSD: Makefile,v 1.3 2001/08/23 04:11:03 fgsch Exp $
+# $OpenBSD: Makefile,v 1.4 2001/11/09 00:13:31 marc Exp $
SUBDIR= cancel close cwd execve fork group netdb poll \
preemption pthread_cond_timedwait pthread_create \
pthread_join pthread_mutex readdir select setjmp signal \
- sigsuspend sigwait sleep socket stdarg stdio switch
+ sigsuspend sigwait sleep socket stdarg stdio switch system
# Not available or disabled: fcntl, pause, preemption_float and pw
diff --git a/regress/lib/libc_r/system/Makefile b/regress/lib/libc_r/system/Makefile
new file mode 100644
index 00000000000..9bf5594d250
--- /dev/null
+++ b/regress/lib/libc_r/system/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.1 2001/11/09 00:13:32 marc Exp $
+
+PROG= system
+SRCS= system.c
+
+.include <bsd.prog.mk>
diff --git a/regress/lib/libc_r/system/system.c b/regress/lib/libc_r/system/system.c
new file mode 100644
index 00000000000..4f631c7d8ae
--- /dev/null
+++ b/regress/lib/libc_r/system/system.c
@@ -0,0 +1,27 @@
+/* $OpenBSD: system.c,v 1.1 2001/11/09 00:13:32 marc Exp $ */
+/*
+ * Copyright (c) 2001 Marco S. Hyman
+ *
+ * Permission to copy all or part of this material with or without
+ * modification for any purpose is granted provided that the above
+ * copyright notice and this paragraph are duplicated in all copies.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/*
+ * system checks the threads system interface and that waitpid/wait4
+ * works correctly.
+ */
+
+#include <stdlib.h>
+#include "test.h"
+
+int
+main(int argc, char **argv)
+{
+ ASSERT(system("ls") == 0);
+ SUCCEED;
+}
diff --git a/regress/lib/libpthread/Makefile b/regress/lib/libpthread/Makefile
index bbc47baea6a..a6925e33452 100644
--- a/regress/lib/libpthread/Makefile
+++ b/regress/lib/libpthread/Makefile
@@ -1,9 +1,9 @@
-# $OpenBSD: Makefile,v 1.3 2001/08/23 04:11:03 fgsch Exp $
+# $OpenBSD: Makefile,v 1.4 2001/11/09 00:13:31 marc Exp $
SUBDIR= cancel close cwd execve fork group netdb poll \
preemption pthread_cond_timedwait pthread_create \
pthread_join pthread_mutex readdir select setjmp signal \
- sigsuspend sigwait sleep socket stdarg stdio switch
+ sigsuspend sigwait sleep socket stdarg stdio switch system
# Not available or disabled: fcntl, pause, preemption_float and pw
diff --git a/regress/lib/libpthread/system/Makefile b/regress/lib/libpthread/system/Makefile
new file mode 100644
index 00000000000..9bf5594d250
--- /dev/null
+++ b/regress/lib/libpthread/system/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.1 2001/11/09 00:13:32 marc Exp $
+
+PROG= system
+SRCS= system.c
+
+.include <bsd.prog.mk>
diff --git a/regress/lib/libpthread/system/system.c b/regress/lib/libpthread/system/system.c
new file mode 100644
index 00000000000..4f631c7d8ae
--- /dev/null
+++ b/regress/lib/libpthread/system/system.c
@@ -0,0 +1,27 @@
+/* $OpenBSD: system.c,v 1.1 2001/11/09 00:13:32 marc Exp $ */
+/*
+ * Copyright (c) 2001 Marco S. Hyman
+ *
+ * Permission to copy all or part of this material with or without
+ * modification for any purpose is granted provided that the above
+ * copyright notice and this paragraph are duplicated in all copies.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/*
+ * system checks the threads system interface and that waitpid/wait4
+ * works correctly.
+ */
+
+#include <stdlib.h>
+#include "test.h"
+
+int
+main(int argc, char **argv)
+{
+ ASSERT(system("ls") == 0);
+ SUCCEED;
+}