]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
tests: backtrace-subr.sh add check_native_unsupported.
authorMark Wielaard <mjw@redhat.com>
Fri, 13 Jun 2014 23:01:58 +0000 (01:01 +0200)
committerMark Wielaard <mjw@redhat.com>
Tue, 17 Jun 2014 14:50:39 +0000 (16:50 +0200)
The special arm check in check_unsupported should only trigger for native
tests, otherwise on arm various backtrace tests would be skipped that
should work just fine.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
tests/ChangeLog
tests/backtrace-subr.sh
tests/run-backtrace-dwarf.sh

index cd8a8e74cb8079bdfefbb9bb5bce91c252d4f319..7c46428cb24f28318e09bdee5dad72dd3b2f40c0 100644 (file)
@@ -1,3 +1,10 @@
+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
index 875e0b68a442121b25de563bce08692fe87fb18e..1d3d6d4718f0d3ebd5ac0c2353f86934e07256dd 100644 (file)
@@ -74,13 +74,20 @@ check_unsupported()
     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
@@ -109,7 +116,7 @@ check_native()
   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
 }
 
@@ -140,6 +147,6 @@ check_native_core()
   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
 }
index a133b32d3e79b12aa855776e80c5d6cd81d0d520..8834048a2f9e85d9b8cd3c171184e64b2d33a8fb 100755 (executable)
@@ -26,5 +26,5 @@ unset VALGRIND_CMD
 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