From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============5887865483883500647==" MIME-Version: 1.0 From: Mark Wielaard To: elfutils-devel@lists.fedorahosted.org Subject: [COMMITTED] tests: Split run-stack tests to support missing demangler. Date: Fri, 01 May 2015 10:41:04 +0200 Message-ID: <1430469664-17714-1-git-send-email-mjw@redhat.com> --===============5887865483883500647== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable SKIP tests that need a demangler if it is not there. Signed-off-by: Mark Wielaard --- ChangeLog | 4 +++ configure.ac | 4 ++- tests/ChangeLog | 8 +++++ tests/Makefile.am | 2 ++ tests/run-stack-d-test.sh | 14 ++++----- ...stack-i-test.sh =3D> run-stack-demangled-test.sh} | 34 ++++++++++++++++= ++---- tests/run-stack-i-test.sh | 13 +++++---- 7 files changed, 60 insertions(+), 19 deletions(-) copy tests/{run-stack-i-test.sh =3D> run-stack-demangled-test.sh} (68%) diff --git a/ChangeLog b/ChangeLog index dc20648..1a11c6d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2015-05-01 Mark Wielaard = + * configure.ac (DEMANGLE): Explicitly set enable_demangler. + +2015-05-01 Mark Wielaard + * configure.ac (debugpred): Use and set use_debugpred_val. (textrelcheck): Explicitly set enable_textrelcheck to yes or no. (symbol-versioning): Likewise for enable_symbol_versioning. diff --git a/configure.ac b/configure.ac index 876600d..0ba3db3 100644 --- a/configure.ac +++ b/configure.ac @@ -235,6 +235,8 @@ AC_SUBST([zip_LIBS]) AC_CHECK_LIB([stdc++], [__cxa_demangle], [dnl AC_DEFINE([USE_DEMANGLE], [1], [Defined if demangling is enabled])]) AM_CONDITIONAL(DEMANGLE, test "$ac_cv_lib_stdcpp___cxa_demangle" =3D yes) +AS_IF([test "$ac_cv_lib_stdcpp___cxa_demangle" =3D yes] + [enable_demangler=3Dyes],[enable_demangler=3Dno]) = AC_ARG_ENABLE([textrelcheck], AS_HELP_STRING([--disable-textrelcheck], @@ -378,7 +380,7 @@ AC_MSG_NOTICE([ gzip support : ${with_zlib} bzip2 support : ${with_bzlib} lzma/xz support : ${with_lzma} - libstdc++ demangle support : ${ac_cv_lib_stdcpp___cxa_demangle} + libstdc++ demangle support : ${enable_demangler} File textrel check : ${enable_textrelcheck} Symbol versioning : ${enable_symbol_versioning} = diff --git a/tests/ChangeLog b/tests/ChangeLog index b686184..0556b1f 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,11 @@ +2015-05-01 Mark Wielaard + + * run-stack-d-test.sh: Use --raw and mangled output. + * run-stack-i-test.sh: Likewise. + * run-stack-demangled-test.sh: New test. + * Makefile.am (EXTRA_DIST): Add run-stack-demangled-test.sh. + (TESTS): Likewise. + 2015-04-01 H.J. Lu = * Makefile.am (TESTS): Add run-strip-test10.sh. diff --git a/tests/Makefile.am b/tests/Makefile.am index 45bb74d..f94bd67 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -113,6 +113,7 @@ TESTS =3D run-arextract.sh run-arsymtest.sh newfile tes= t-nlist \ run-backtrace-core-s390x.sh run-backtrace-core-s390.sh \ run-backtrace-core-aarch64.sh \ run-backtrace-demangle.sh run-stack-d-test.sh run-stack-i-test.sh \ + run-stack-demangled-test.sh \ run-readelf-dwz-multi.sh run-allfcts-multi.sh run-deleted.sh \ run-linkmap-cut.sh run-aggregate-size.sh vdsosyms run-readelf-A.sh \ run-getsrc-die.sh run-strptr.sh newdata elfstrtab @@ -282,6 +283,7 @@ EXTRA_DIST =3D run-arextract.sh run-arsymtest.sh \ testfile-backtrace-demangle.cc \ testfile-backtrace-demangle.core.bz2 \ run-stack-d-test.sh run-stack-i-test.sh \ + run-stack-demangled-test.sh \ testfiledwarfinlines.bz2 testfiledwarfinlines.core.bz2 \ run-readelf-zdebug.sh testfile-debug.bz2 testfile-zdebug.bz2 \ run-deleted.sh run-linkmap-cut.sh linkmap-cut-lib.so.bz2 \ diff --git a/tests/run-stack-d-test.sh b/tests/run-stack-d-test.sh index 040c2fa..4198201 100755 --- a/tests/run-stack-d-test.sh +++ b/tests/run-stack-d-test.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2014 Red Hat, Inc. +# Copyright (C) 2014, 2015 Red Hat, Inc. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -68,21 +68,21 @@ else STACKCMD=3D${abs_top_builddir}/src/stack fi = -# Without -d the top function comes out as fu. -testrun_compare ${abs_top_builddir}/src/stack -n 2 -e testfiledwarfinlines= --core testfiledwarfinlines.core<. = +if test -n "$ELFUTILS_DISABLE_DEMANGLE"; then + exit 77 +fi + . $srcdir/test-subr.sh = -# See run-stack-d-test.sh for dwarfinlines.cpp source. +# See run-stack-d-test.sh and run-stack-i-test.sh +# Same tests, now with demangler support, no -r, and without -d. +# Only change in output is an explit fu(int) instead of _Z2fui. + testfiles testfiledwarfinlines testfiledwarfinlines.core = # Depending on whether we are running make check or make installcheck @@ -29,9 +36,26 @@ else STACKCMD=3D${abs_top_builddir}/src/stack fi = -# Compare with run-stack-d-test.sh to see the output without --inlines. -# Only two call frames are visible (there is a jump from main to fu or -# fubar). +# Without -d the top function comes out as fu. +testrun_compare ${abs_top_builddir}/src/stack -n 2 -e testfiledwarfinlines= --core testfiledwarfinlines.core<