Source-Changes-HG archive

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

[src/trunk]: src/tests/lib/csu Test LD_PRELOAD for stack alignment as well. T...



details:   https://anonhg.NetBSD.org/src/rev/870d694a11cb
branches:  trunk
changeset: 771952:870d694a11cb
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sun Dec 11 14:57:07 2011 +0000

description:
Test LD_PRELOAD for stack alignment as well. This exposes issues on
AMD64.

diffstat:

 tests/lib/csu/t_crt0.sh |  21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diffs (38 lines):

diff -r 94e6841e7b5a -r 870d694a11cb tests/lib/csu/t_crt0.sh
--- a/tests/lib/csu/t_crt0.sh   Sun Dec 11 14:05:39 2011 +0000
+++ b/tests/lib/csu/t_crt0.sh   Sun Dec 11 14:57:07 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_crt0.sh,v 1.3 2010/11/07 17:51:20 jmmv Exp $
+# $NetBSD: t_crt0.sh,v 1.4 2011/12/11 14:57:07 joerg Exp $
 #
 # Copyright (c) 2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -77,9 +77,28 @@
        atf_check -o file:expout "$(atf_get_srcdir)/h_initfini3"
 }
 
+atf_test_case initfini4
+initfini4_head()
+{
+       atf_set "descr" "Checks support for init/fini sections in LD_PRELOAD"
+}
+initfini4_body()
+{
+       cat >expout <<EOF
+constructor2 executed
+constructor executed
+main executed
+destructor executed
+destructor2 executed
+EOF
+
+       atf_check -o file:expout -x "env LD_PRELOAD=$(atf_get_srcdir)/h_initfini3_dso.so $(atf_get_srcdir)/h_initfini1"
+}
+
 atf_init_test_cases()
 {
        atf_add_test_case initfini1
        atf_add_test_case initfini2
        atf_add_test_case initfini3
+       atf_add_test_case initfini4
 }



Home | Main Index | Thread Index | Old Index