+2014-06-13 Mark Wielaard <mjw@redhat.com>
+
+ * backtrace-subr.sh (check_native_unsupported): New function.
+ (check_native): Call it.
+ (check_native_core): Likewise.
+ * run-backtrace-dwarf.sh: Likewise.
+
2014-06-11 Mark Wielaard <mjw@redhat.com>
* backtrace.c (main): Check that Dwfl was attached by calling
echo >&2 $testname: arch not supported
exit 77
fi
+}
+
+check_native_unsupported()
+{
+ err=$1
+ testname=$2
+ check_unsupported $err $testname
# ARM is special. It is supported, but it doesn't use .eh_frame by default
# making the native tests fail unless debuginfo (for glibc) is installed
# and we can fall back on .debug_frame for the CFI.
case "`uname -m`" in
arm* )
- if grep 'dwfl_thread_getframes: No DWARF information found' $1; then
+ if grep 'dwfl_thread_getframes: No DWARF information found' $err; then
echo >&2 $testname: arm needs debuginfo installed for all libraries
exit 77
fi
tempfiles $child.{bt,err}
(set +ex; testrun ${abs_builddir}/backtrace --backtrace-exec=${abs_builddir}/$child 1>$child.bt 2>$child.err; true)
cat $child.{bt,err}
- check_unsupported $child.err $child
+ check_native_unsupported $child.err $child
check_all $child.{bt,err} $child
}
tempfiles $core{,.{bt,err}}
(set +ex; testrun ${abs_builddir}/backtrace -e ${abs_builddir}/$child --core=$core 1>$core.bt 2>$core.err; true)
cat $core.{bt,err}
- check_unsupported $core.err $child-$core
+ check_native_unsupported $core.err $child-$core
check_all $core.{bt,err} $child-$core
}
tempfiles dwarf.{bt,err}
(set +ex; testrun ${abs_builddir}/backtrace-dwarf 1>dwarf.bt 2>dwarf.err; true)
cat dwarf.{bt,err}
-check_unsupported dwarf.err dwarf
+check_native_unsupported dwarf.err dwarf
check_main dwarf.bt dwarf