Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libc/sys Merge in the minimal test from the old sr...



details:   https://anonhg.NetBSD.org/src/rev/4aa406751a6d
branches:  trunk
changeset: 782582:4aa406751a6d
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Wed Nov 07 16:51:16 2012 +0000

description:
Merge in the minimal test from the old src/regress/sys/kernel/sigtramp
test.

diffstat:

 tests/lib/libc/sys/t_sigaction.c |  30 ++++++++++++++++++++++++++++--
 1 files changed, 28 insertions(+), 2 deletions(-)

diffs (58 lines):

diff -r 13a3e60dea11 -r 4aa406751a6d tests/lib/libc/sys/t_sigaction.c
--- a/tests/lib/libc/sys/t_sigaction.c  Wed Nov 07 16:36:49 2012 +0000
+++ b/tests/lib/libc/sys/t_sigaction.c  Wed Nov 07 16:51:16 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_sigaction.c,v 1.1 2011/10/15 07:00:48 jruoho Exp $ */
+/* $NetBSD: t_sigaction.c,v 1.2 2012/11/07 16:51:16 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
 #include <sys/cdefs.h>
 __COPYRIGHT("@(#) Copyright (c) 2010\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_sigaction.c,v 1.1 2011/10/15 07:00:48 jruoho Exp $");
+__RCSID("$NetBSD: t_sigaction.c,v 1.2 2012/11/07 16:51:16 pgoyette Exp $");
 
 #include <sys/wait.h>
 
@@ -79,6 +79,31 @@
                atf_tc_fail("%s; raw exit status was %d", fail_message, status);
 }
 
+static void
+catch(int sig)
+{
+       return;
+}
+
+ATF_TC(sigaction_basic);
+ATF_TC_HEAD(sigaction_basic, tc)
+{
+
+       atf_tc_set_md_var(tc, "descr", "Checks for correct I&D cache"
+           "synchronization after copying out the trampoline code.");
+}
+
+ATF_TC_BODY(sigaction_basic, tc)
+{
+       static struct sigaction sa;
+
+       sa.sa_handler = catch;
+
+       sigaction(SIGUSR1, &sa, 0);
+       kill(getpid(), SIGUSR1);
+       atf_tc_pass();
+}
+
 ATF_TC(sigaction_noflags);
 ATF_TC_HEAD(sigaction_noflags, tc)
 {
@@ -121,6 +146,7 @@
 ATF_TP_ADD_TCS(tp)
 {
 
+       ATF_TP_ADD_TC(tp, sigaction_basic);
        ATF_TP_ADD_TC(tp, sigaction_noflags);
        ATF_TP_ADD_TC(tp, sigaction_resethand);
 



Home | Main Index | Thread Index | Old Index