diff options
| author | Ulf Hermann <[email protected]> | 2017-05-08 15:28:09 +0200 |
|---|---|---|
| committer | Ulf Hermann <[email protected]> | 2017-05-08 15:55:12 +0200 |
| commit | 3695a1ba8dcd16459e0f35b74e88dbef48d21861 (patch) | |
| tree | 674d0dc13f0065f81e7f672e81fc09b42405656d /tests/backtrace-subr.sh | |
| parent | 9f6ffdc1b75fd69ecda219c9e9f1b2551f542b26 (diff) | |
| parent | 6358858c4d65e8fb12a112198ee1d4bcab0be876 (diff) | |
Merge tag 'elfutils-0.169'QtCreator4.5.1QtCreator4.5.0-rc1QtCreator4.5.0QtCreator4.4.1QtCreator4.4.0-rc1QtCreator4.4.0-beta1QtCreator4.4.04.54.4
Conflicts:
ChangeLog
backends/ChangeLog
config/ChangeLog
lib/ChangeLog
libasm/ChangeLog
libcpu/ChangeLog
libdw/ChangeLog
libdwfl/ChangeLog
libdwfl/derelocate.c
libdwfl/linux-kernel-modules.c
libebl/ChangeLog
libelf/ChangeLog
src/ChangeLog
tests/ChangeLog
Change-Id: I3b7ced947c6498290aaae27443985b84531f0bcd
Diffstat (limited to 'tests/backtrace-subr.sh')
| -rw-r--r-- | tests/backtrace-subr.sh | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/tests/backtrace-subr.sh b/tests/backtrace-subr.sh index 5d3937c2..9731c43a 100644 --- a/tests/backtrace-subr.sh +++ b/tests/backtrace-subr.sh @@ -40,16 +40,26 @@ check_gsignal() false } + +# Makes sure we saw the function that initiated the backtrace +# when the core was generated through the tests backtrace --gencore. +# This might disappear when frame pointer chasing gone bad. +check_backtracegen() +{ + if grep -w backtracegen $1; then + return + fi + echo >&2 $2: no backtracegen + false +} + # Verify the STDERR output does not contain unexpected errors. # In some cases we cannot reliably find out we got behind _start as some # operating system do not properly terminate CFI by undefined PC. # Ignore it here as it is a bug of OS, not a bug of elfutils. -# If the CFI is not terminated correctly, we might find another frame by -# checking for frame pointers. This is still not our problem, but only -# gives an error message when trying to look up the function name. check_err() { - if [ $(egrep -v <$1 'dwfl_thread_getframes: (No DWARF information found|no matching address range|address out of range)$' \ + if [ $(egrep -v <$1 'dwfl_thread_getframes: (No DWARF information found|no matching address range|address out of range|Invalid register)$' \ | wc -c) \ -eq 0 ] then @@ -64,9 +74,7 @@ check_all() bt=$1 err=$2 testname=$3 - if [ "x$4" != "x--allow-unknown" ]; then - check_main $bt $testname - fi + check_main $bt $testname check_gsignal $bt $testname check_err $err $testname } @@ -103,14 +111,14 @@ check_native_unsupported() check_core() { arch=$1 - args=$2 testfiles backtrace.$arch.{exec,core} tempfiles backtrace.$arch.{bt,err} echo ./backtrace ./backtrace.$arch.{exec,core} - testrun ${abs_builddir}/backtrace $args -e ./backtrace.$arch.exec --core=./backtrace.$arch.core 1>backtrace.$arch.bt 2>backtrace.$arch.err || true + testrun ${abs_builddir}/backtrace -e ./backtrace.$arch.exec --core=./backtrace.$arch.core 1>backtrace.$arch.bt 2>backtrace.$arch.err || true cat backtrace.$arch.{bt,err} check_unsupported backtrace.$arch.err backtrace.$arch.core - check_all backtrace.$arch.{bt,err} backtrace.$arch.core $args + check_all backtrace.$arch.{bt,err} backtrace.$arch.core + check_backtracegen backtrace.$arch.bt backtrace.$arch.core } # Backtrace live process. |
