]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
tests: SKIP backtrace-data and backtrace-dwarf on unsupported arches.
authorMark Wielaard <mjw@redhat.com>
Thu, 5 Dec 2013 14:26:51 +0000 (15:26 +0100)
committerMark Wielaard <mjw@redhat.com>
Thu, 5 Dec 2013 14:29:36 +0000 (15:29 +0100)
run-backtrace-data.sh did check stderr whether the arch was unsupported
but the test didn't print that message yet. backtrace-dwarf did print
the message but was missing a check_unsupported test. Also add an explicit
check_main test for backtrace-dwarf.

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

index b3666891444779893f2ad1a24bc213ec736ced5f..89925682515849941b704b67cb92cd50da1bc527 100644 (file)
@@ -1,3 +1,8 @@
+2013-12-05  Mark Wielaard  <mjw@redhat.com>
+
+       * backtrace-data.c (main): If unsupported also print to stderr.
+       * run-backtrace-dwarf.sh: Add check_unsupported and check_main.
+
 2013-12-04  Mark Wielaard  <mjw@redhat.com>
 
        * Makefile.am (backtrace-child-biarch): Add $(EXEEXT).
index f54263b9da7136ad3820a402b0cdb14fd492131d..6d2134527d19f7dcea1ab277e100838e7b25e5bd 100644 (file)
 #ifndef __x86_64__
 
 int
-main (void)
+main (int argc __attribute__ ((unused)), char **argv)
 {
+  fprintf (stderr, "%s: Unwinding not supported for this architecture\n",
+          argv[0]);
   return 77;
 }
 
index b24215e3d3f417b3c780ce9727d07473694984fe..2f4ba0f5bee5b55169f9fb5ff985ef8160b28c2a 100755 (executable)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-. $srcdir/test-subr.sh
+. $srcdir/backtrace-subr.sh
 
-testrun ${abs_builddir}/backtrace-dwarf
+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_main dwarf.bt dwarf