diff --git a/regress/sys/kern/Makefile b/regress/sys/kern/Makefile index 406e9194c7aa..0114a4e7e0a9 100644 --- a/regress/sys/kern/Makefile +++ b/regress/sys/kern/Makefile @@ -1,5 +1,5 @@ -# $NetBSD: Makefile,v 1.7 1999/06/02 15:57:18 drochner Exp $ +# $NetBSD: Makefile,v 1.8 1999/07/08 17:37:35 ws Exp $ -SUBDIR+= execve extent unfdpass getcwd +SUBDIR+= execve extent unfdpass getcwd sigtramp .include diff --git a/regress/sys/kern/sigtramp/Makefile b/regress/sys/kern/sigtramp/Makefile new file mode 100644 index 000000000000..b5d9dc3d4f97 --- /dev/null +++ b/regress/sys/kern/sigtramp/Makefile @@ -0,0 +1,10 @@ +# $NetBSD: Makefile,v 1.1 1999/07/08 17:37:36 ws Exp $ +# +PROG= sigtramp +MKMAN= no +LDFLAGS= -static -N + +regress: + sh ${.CURDIR}/dotest + +.include diff --git a/regress/sys/kern/sigtramp/dotest b/regress/sys/kern/sigtramp/dotest new file mode 100644 index 000000000000..f504a0b66a0b --- /dev/null +++ b/regress/sys/kern/sigtramp/dotest @@ -0,0 +1,19 @@ +#!/bin/sh + +# Do a bunch of runs of this program + +for i in 0 1 2 3 4 5 6 7 8 9 +do +for j in 0 1 2 3 4 5 6 7 8 9 +do +for k in 0 1 2 3 4 5 6 7 8 9 +do + if ./sigtramp + then + : + else + exit 1 + fi +done +done +done diff --git a/regress/sys/kern/sigtramp/sigtramp.c b/regress/sys/kern/sigtramp/sigtramp.c new file mode 100644 index 000000000000..8dad50559a9c --- /dev/null +++ b/regress/sys/kern/sigtramp/sigtramp.c @@ -0,0 +1,22 @@ +/* + * This program checks whether the kernel correctly synchronizes + * I&D-caches after copying out the signal trampoline code. + */ +#include + +void catch(sig) +int sig; +{ + return; +} + +main() +{ + static struct sigaction sa; + + sa.sa_handler = catch; + + sigaction(SIGUSR1, &sa, 0); + kill(getpid(), SIGUSR1); + return 0; +}