diff options
| author | Mark Wielaard <[email protected]> | 2014-01-16 09:45:51 +0100 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2014-01-20 11:11:05 +0100 |
| commit | d7cffa77ae9eb28a682e436251ab79e86b4e4f64 (patch) | |
| tree | e1ad8d6da30f39f877724a2e45e0df6330c487e7 /tests | |
| parent | 435808a681cc375f0907f2066c4cc062173a6c7e (diff) | |
tests: run-backtrace-demangle.sh check exitcode and max number of frames.
There can be more than 3 frames, but depending on the system/installed
glibc we might not be able to unwind fully till the end.
cxxfunc -> f -> main
Expect to see the top two and a warning that there are more frames
(exit code 1)
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ChangeLog | 4 | ||||
| -rwxr-xr-x | tests/run-backtrace-demangle.sh | 13 |
2 files changed, 15 insertions, 2 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index df5c509a..c9f94ff7 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2014-01-16 Mark Wielaard <[email protected]> + + * run-backtrace-demangle.sh: Check exitcode and max number of frames. + 2014-01-18 Jan Kratochvil <[email protected]> Fix false FAILs on testsuite with ulimit -c unlimited. diff --git a/tests/run-backtrace-demangle.sh b/tests/run-backtrace-demangle.sh index b5bddeb3..6e18e77f 100755 --- a/tests/run-backtrace-demangle.sh +++ b/tests/run-backtrace-demangle.sh @@ -20,13 +20,22 @@ if test -n "$ELFUTILS_DISABLE_DEMANGLE"; then fi . $srcdir/backtrace-subr.sh -set -x child=testfile-backtrace-demangle testfiles $child{,.core} tempfiles $child.{bt,err} -testrun ${abs_top_builddir}/src/stack -e $child --core $child.core >$child.bt 2>$child.err + +# There can be more than 3 frames, but depending on the system/installed +# glibc we might not be able to unwind fully till the end. +# cxxfunc -> f -> main +# Expect to see the top two and a warning that there are more frames +# (exit code 1) +testrun ${abs_top_builddir}/src/stack -n 2 -e $child --core $child.core >$child.bt 2>$child.err || exitcode=$? cat $child.{bt,err} +if test $exitcode != 1 || ! grep "shown max number of frames" $child.err; then + echo >&2 $2: expected more than 2 frames + false +fi if ! grep -w f $child.bt; then echo >&2 $2: no f false |
