Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Replace csu test case with a C++ based version. This makes t...
details: https://anonhg.NetBSD.org/src/rev/2d787976b912
branches: trunk
changeset: 756673:2d787976b912
user: joerg <joerg%NetBSD.org@localhost>
date: Wed Jul 28 13:51:38 2010 +0000
description:
Replace csu test case with a C++ based version. This makes the various
assembler routines obsolete. Be more exhaustive by testing dynamically
linked, statically linked and dynamically loaded.
XXX currently hard-codes /usr/tests due to limitations of bsd.test.mk
diffstat:
distrib/sets/lists/tests/mi | 12 ++++-
tests/lib/csu/Makefile | 25 +++++-----
tests/lib/csu/arch/alpha/initfini_asm.S | 48 ---------------------
tests/lib/csu/arch/arm/initfini_asm.S | 42 ------------------
tests/lib/csu/arch/hppa/initfini_asm.S | 44 -------------------
tests/lib/csu/arch/i386/initfini_asm.S | 42 ------------------
tests/lib/csu/arch/m68k/initfini_asm.S | 42 ------------------
tests/lib/csu/arch/mips/initfini_asm.S | 56 -------------------------
tests/lib/csu/arch/powerpc/initfini_asm.S | 42 ------------------
tests/lib/csu/arch/sh3/initfini_asm.S | 58 --------------------------
tests/lib/csu/arch/sparc/initfini_asm.S | 44 -------------------
tests/lib/csu/arch/sparc64/initfini_asm.S | 44 -------------------
tests/lib/csu/arch/vax/initfini_asm.S | 42 ------------------
tests/lib/csu/arch/x86_64/initfini_asm.S | 42 ------------------
tests/lib/csu/dso/Makefile | 21 +++++++++
tests/lib/csu/dso/h_initfini3_dso.cxx | 17 +++++++
tests/lib/csu/h_initfini.c | 69 -------------------------------
tests/lib/csu/h_initfini1.cxx | 9 ++++
tests/lib/csu/h_initfini3.cxx | 22 +++++++++
tests/lib/csu/h_initfini_common.cxx | 17 +++++++
tests/lib/csu/t_crt0.sh | 58 ++++++++++++++++++++++----
21 files changed, 157 insertions(+), 639 deletions(-)
diffs (truncated from 924 to 300 lines):
diff -r bf8390cb2ac0 -r 2d787976b912 distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi Wed Jul 28 11:03:47 2010 +0000
+++ b/distrib/sets/lists/tests/mi Wed Jul 28 13:51:38 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.119 2010/07/26 19:19:15 pooka Exp $
+# $NetBSD: mi,v 1.120 2010/07/28 13:51:38 joerg Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -265,7 +265,9 @@
./usr/libdata/debug/usr/tests/kernel/tty/t_pr.debug tests-kernel-tests debug,atf
./usr/libdata/debug/usr/tests/lib tests-lib-debug
./usr/libdata/debug/usr/tests/lib/csu tests-lib-debug
-./usr/libdata/debug/usr/tests/lib/csu/h_initfini.debug tests-lib-debug debug,atf
+./usr/libdata/debug/usr/tests/lib/csu/h_initfini1.debug tests-lib-debug debug,atf
+./usr/libdata/debug/usr/tests/lib/csu/h_initfini2.debug tests-lib-debug debug,atf
+./usr/libdata/debug/usr/tests/lib/csu/h_initfini3.debug tests-lib-debug debug,atf
./usr/libdata/debug/usr/tests/lib/libc tests-lib-debug
./usr/libdata/debug/usr/tests/lib/libc/hash tests-lib-debug
./usr/libdata/debug/usr/tests/lib/libc/hash/t_sha2.debug tests-lib-debug debug,atf
@@ -1371,7 +1373,11 @@
./usr/tests/lib/Atffile tests-lib-tests atf
./usr/tests/lib/csu tests-lib-tests
./usr/tests/lib/csu/Atffile tests-lib-tests atf
-./usr/tests/lib/csu/h_initfini tests-lib-tests atf
+./usr/tests/lib/csu/h_initfini1 tests-lib-tests atf
+./usr/tests/lib/csu/h_initfini2 tests-lib-tests atf
+./usr/tests/lib/csu/h_initfini3 tests-lib-tests atf
+./usr/tests/lib/csu/libh_initfini3_dso.so tests-lib-tests atf
+./usr/tests/lib/csu/libh_initfini3_dso.so.1 tests-lib-tests atf
./usr/tests/lib/csu/t_crt0 tests-lib-tests atf
./usr/tests/lib/libc tests-lib-tests
./usr/tests/lib/libc/Atffile tests-lib-tests atf
diff -r bf8390cb2ac0 -r 2d787976b912 tests/lib/csu/Makefile
--- a/tests/lib/csu/Makefile Wed Jul 28 11:03:47 2010 +0000
+++ b/tests/lib/csu/Makefile Wed Jul 28 13:51:38 2010 +0000
@@ -1,19 +1,20 @@
-# $NetBSD: Makefile,v 1.1 2010/07/17 19:25:27 jmmv Exp $
+# $NetBSD: Makefile,v 1.2 2010/07/28 13:51:38 joerg Exp $
-NOMAN= # defined
+NOMAN= # defined
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/lib/csu
-
-.if exists(arch/${MACHINE_CPU}/initfini_asm.S)
-TESTS_SH= t_crt0
+TESTSDIR= ${TESTSBASE}/lib/csu
+TESTS_SH= t_crt0
+TESTS_SUBDIRS=
+SUBDIR+= dso
-BINDIR= ${TESTSDIR}
-PROG= h_initfini
-SRCS= h_initfini.c initfini_asm.S
-WARNS?= 1
-.PATH: ${.CURDIR}/arch/${MACHINE_CPU}
-.endif
+BINDIR= ${TESTSDIR}
+PROG_CXX= h_initfini1 h_initfini2 h_initfini3
+SRCS.h_initfini1= h_initfini1.cxx h_initfini_common.cxx
+SRCS.h_initfini2= h_initfini1.cxx h_initfini_common.cxx
+LDADD.h_initfini2+= -static
+SRCS.h_initfini3= h_initfini3.cxx h_initfini_common.cxx
+LDADD.h_initfini3+= -Wl,-rpath,${TESTSDIR}
.include <bsd.test.mk>
diff -r bf8390cb2ac0 -r 2d787976b912 tests/lib/csu/arch/alpha/initfini_asm.S
--- a/tests/lib/csu/arch/alpha/initfini_asm.S Wed Jul 28 11:03:47 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/* $NetBSD: initfini_asm.S,v 1.1 2010/07/17 19:25:27 jmmv Exp $ */
-
-/*
- * Copyright (c) 2008 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 file placed in the public domain.
- * Jason R. Thorpe, July 16, 2001.
- */
-
-#include <machine/asm.h>
-
- .section .init, "ax", @progbits
- br ra, 1f
-1: LDGP(ra)
- jsr ra, i_am_init
- .align 3
- .previous
-
- .section .fini, "ax", @progbits
- br ra, 1f
-1: LDGP(ra)
- jsr ra, i_am_fini
- .align 3
- .previous
diff -r bf8390cb2ac0 -r 2d787976b912 tests/lib/csu/arch/arm/initfini_asm.S
--- a/tests/lib/csu/arch/arm/initfini_asm.S Wed Jul 28 11:03:47 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/* $NetBSD: initfini_asm.S,v 1.1 2010/07/17 19:25:27 jmmv Exp $ */
-
-/*
- * Copyright (c) 2008 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 file placed in the public domain.
- * Matt A. Thomas, July 16, 2001.
- */
-
-#include <machine/asm.h>
-
- .section .init, "ax", "progbits"
- bl _C_LABEL(i_am_init)
- .previous
-
- .section .fini, "ax", "progbits"
- bl _C_LABEL(i_am_fini)
- .previous
diff -r bf8390cb2ac0 -r 2d787976b912 tests/lib/csu/arch/hppa/initfini_asm.S
--- a/tests/lib/csu/arch/hppa/initfini_asm.S Wed Jul 28 11:03:47 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/* $NetBSD: initfini_asm.S,v 1.1 2010/07/17 19:25:27 jmmv Exp $ */
-
-/*
- * Copyright (c) 2008 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 file placed in the public domain.
- * Nick Hudson, May 18, 2004.
- */
-
-#include <machine/asm.h>
-
- .section .init, "ax", @progbits
- bl i_am_init, %rp
- nop
- .previous
-
- .section .fini, "ax", @progbits
- bl i_am_fini, %rp
- nop
- .previous
diff -r bf8390cb2ac0 -r 2d787976b912 tests/lib/csu/arch/i386/initfini_asm.S
--- a/tests/lib/csu/arch/i386/initfini_asm.S Wed Jul 28 11:03:47 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/* $NetBSD: initfini_asm.S,v 1.1 2010/07/17 19:25:27 jmmv Exp $ */
-
-/*
- * Copyright (c) 2008 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 file placed in the public domain.
- * Jason R. Thorpe, July 16, 2001.
- */
-
-#include <machine/asm.h>
-
- .section .init, "ax", @progbits
- call _C_LABEL(i_am_init)
- .previous
-
- .section .fini, "ax", @progbits
- call _C_LABEL(i_am_fini)
- .previous
diff -r bf8390cb2ac0 -r 2d787976b912 tests/lib/csu/arch/m68k/initfini_asm.S
--- a/tests/lib/csu/arch/m68k/initfini_asm.S Wed Jul 28 11:03:47 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/* $NetBSD: initfini_asm.S,v 1.1 2010/07/17 19:25:27 jmmv Exp $ */
-
-/*
- * Copyright (c) 2008 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 file placed in the public domain.
- * Klaus Klein, October 14, 2001.
- */
-
-#include <machine/asm.h>
-
Home |
Main Index |
Thread Index |
Old Index