Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/regress/lib/libc The *setjmp tests have moved to atf
details: https://anonhg.NetBSD.org/src/rev/62553806a3d7
branches: trunk
changeset: 760125:62553806a3d7
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Mon Dec 27 19:39:09 2010 +0000
description:
The *setjmp tests have moved to atf
diffstat:
regress/lib/libc/Makefile | 10 +-
regress/lib/libc/_setjmp/Makefile | 13 ---
regress/lib/libc/setjmp/Makefile | 14 ---
regress/lib/libc/setjmp/jmptest.c | 138 ------------------------------------
regress/lib/libc/sigsetjmp/Makefile | 15 ---
5 files changed, 3 insertions(+), 187 deletions(-)
diffs (219 lines):
diff -r dca3f0de21f6 -r 62553806a3d7 regress/lib/libc/Makefile
--- a/regress/lib/libc/Makefile Mon Dec 27 19:35:30 2010 +0000
+++ b/regress/lib/libc/Makefile Mon Dec 27 19:39:09 2010 +0000
@@ -1,16 +1,12 @@
-# $NetBSD: Makefile,v 1.63 2010/12/26 13:38:08 pgoyette Exp $
+# $NetBSD: Makefile,v 1.64 2010/12/27 19:39:09 pgoyette Exp $
-SUBDIR+= _setjmp atexit citrus clone context convfp db \
+SUBDIR+= atexit citrus clone context convfp db \
divrem gen gdtoa getaddrinfo hsearch inet int_fmtio locale md5sha \
- nsdispatch pty randomid regex rpc servent setjmp sigsetjmp \
- stdlib strptime sys time
+ nsdispatch pty randomid regex rpc servent stdlib strptime sys time
.include <bsd.own.mk>
.include <bsd.sys.mk>
-.if defined(USE_SSP) && (${USE_SSP} == "yes")
-SUBDIR+= ssp
-.endif
.if (${MACHINE_ARCH} != "vax" && ${MACHINE_ARCH} != "m68000")
SUBDIR+= ieeefp
.endif
diff -r dca3f0de21f6 -r 62553806a3d7 regress/lib/libc/_setjmp/Makefile
--- a/regress/lib/libc/_setjmp/Makefile Mon Dec 27 19:35:30 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-# $NetBSD: Makefile,v 1.7 2002/09/18 05:41:36 lukem Exp $
-
-NOMAN= # defined
-
-PROG= _setjmptest
-SRCS= jmptest.c
-CPPFLAGS+= -DTEST_U_SETJMP
-.PATH: ${.CURDIR}/../setjmp
-
-regress: ${PROG}
- ./${PROG}
-
-.include <bsd.prog.mk>
diff -r dca3f0de21f6 -r 62553806a3d7 regress/lib/libc/setjmp/Makefile
--- a/regress/lib/libc/setjmp/Makefile Mon Dec 27 19:35:30 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-# $NetBSD: Makefile,v 1.7 2002/09/18 05:41:41 lukem Exp $
-
-NOMAN= # defined
-
-PROG= setjmptest
-SRCS= jmptest.c
-CPPFLAGS+= -DTEST_SETJMP
-
-.PATH: ${.CURDIR}/../setjmp
-
-regress: ${PROG}
- ./${PROG}
-
-.include <bsd.prog.mk>
diff -r dca3f0de21f6 -r 62553806a3d7 regress/lib/libc/setjmp/jmptest.c
--- a/regress/lib/libc/setjmp/jmptest.c Mon Dec 27 19:35:30 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-/* $NetBSD: jmptest.c,v 1.8 2003/07/26 19:38:47 salo Exp $ */
-
-/*
- * Copyright (c) 1994 Christopher G. Demetriou
- * 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed for the
- * NetBSD Project. See http://www.NetBSD.org/ for
- * information about NetBSD.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
- */
-
-#include <sys/types.h>
-#include <setjmp.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#if (TEST_SETJMP + TEST_U_SETJMP + TEST_SIGSETJMP) != 1
-#error one of TEST_SETJMP, TEST_U_SETJMP, or TEST_SIGSETJMP must be defined
-#endif
-
-#ifdef TEST_SETJMP
-#define BUF jmp_buf
-#define SET(b, m) setjmp(b)
-#define JMP(b, v) longjmp(b, v)
-#endif
-
-#ifdef TEST_U_SETJMP
-#define BUF jmp_buf
-#define SET(b, m) _setjmp(b)
-#define JMP(b, v) _longjmp(b, v)
-#endif
-
-#ifdef TEST_SIGSETJMP
-#define BUF sigjmp_buf
-#define SET(b, m) sigsetjmp(b, m)
-#define JMP(b, v) siglongjmp(b, v)
-#endif
-
-int expectsignal;
-
-void
-aborthandler(signo)
- int signo;
-{
-
- if (expectsignal)
- exit(0);
- else
- errx(1, "kill(SIGABRT) succeeded");
-}
-
-int
-main(argc, argv)
- int argc;
- char *argv[];
-{
- struct sigaction sa;
- BUF jb;
- sigset_t ss;
- int i, x;
-
- i = getpid();
-
-#ifdef TEST_SETJMP
- expectsignal = 0;
-#endif
-#ifdef TEST_U_SETJMP
- expectsignal = 1;
-#endif
-#ifdef TEST_SIGSETJMP
- if (argc != 2 ||
- (strcmp(argv[1], "save") && strcmp(argv[1], "nosave"))) {
- fprintf(stderr, "usage: %s [save|nosave]\n", argv[0]);
- exit(1);
- }
- expectsignal = (strcmp(argv[1], "save") != 0);
-#endif
-
- sa.sa_handler = aborthandler;
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = 0;
- if (sigaction(SIGABRT, &sa, NULL) == -1)
- err(1, "sigaction failed");
-
- if (sigemptyset(&ss) == -1)
- err(1, "sigemptyset failed");
- if (sigaddset(&ss, SIGABRT) == -1)
- err(1, "sigaddset failed");
- if (sigprocmask(SIG_BLOCK, &ss, NULL) == -1)
- err(1, "sigprocmask (1) failed");
-
- x = SET(jb, !expectsignal);
- if (x != 0) {
- if (x != i)
- errx(1, "setjmp returned wrong value");
-
- kill(i, SIGABRT);
- if (expectsignal)
- errx(1, "kill(SIGABRT) failed");
- else
- exit(0);
- }
-
- if (sigprocmask(SIG_UNBLOCK, &ss, NULL) == -1)
- err(1, "sigprocmask (2) failed");
-
- JMP(jb, i);
-
- errx(1, "jmp failed");
-}
diff -r dca3f0de21f6 -r 62553806a3d7 regress/lib/libc/sigsetjmp/Makefile
--- a/regress/lib/libc/sigsetjmp/Makefile Mon Dec 27 19:35:30 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-# $NetBSD: Makefile,v 1.7 2002/09/18 05:41:41 lukem Exp $
-
-NOMAN= # defined
-
-PROG= sigsetjmptest
-SRCS= jmptest.c
-CPPFLAGS+= -DTEST_SIGSETJMP
-
-.PATH: ${.CURDIR}/../setjmp
-
-regress: ${PROG}
- ./${PROG} save
- ./${PROG} nosave
-
-.include <bsd.prog.mk>
Home |
Main Index |
Thread Index |
Old Index