sigtramp has been incorporated into ATF test lib/libc/sys/t_sigaction
This commit is contained in:
parent
251231b58b
commit
de60af8cf6
@ -1,6 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.32 2012/11/07 14:04:28 pgoyette Exp $
|
||||
# $NetBSD: Makefile,v 1.33 2012/11/07 16:52:01 pgoyette Exp $
|
||||
|
||||
SUBDIR+= execve getcwd ras \
|
||||
sigtramp sleeping unfdpass
|
||||
sleeping unfdpass
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
|
@ -1,11 +0,0 @@
|
||||
# $NetBSD: Makefile,v 1.5 2003/10/26 07:25:35 lukem Exp $
|
||||
|
||||
NOMAN= # defined
|
||||
LDSTATIC= -static
|
||||
|
||||
PROG= sigtramp
|
||||
|
||||
regress:
|
||||
${HOST_SH} ${.CURDIR}/dotest
|
||||
|
||||
.include <bsd.prog.mk>
|
@ -1,19 +0,0 @@
|
||||
#!/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
|
@ -1,52 +0,0 @@
|
||||
/* $NetBSD: sigtramp.c,v 1.4 2011/05/16 21:51:31 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This program checks whether the kernel correctly synchronizes
|
||||
* I&D-caches after copying out the signal trampoline code.
|
||||
*/
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static void
|
||||
catch(int sig)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
static struct sigaction sa;
|
||||
|
||||
sa.sa_handler = catch;
|
||||
|
||||
sigaction(SIGUSR1, &sa, 0);
|
||||
kill(getpid(), SIGUSR1);
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user