]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Use correct exit code in test shell scripts if test cannot be performed.
authorUlrich Drepper <drepper@redhat.com>
Wed, 31 Aug 2005 15:14:26 +0000 (15:14 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 31 Aug 2005 15:14:26 +0000 (15:14 +0000)
18 files changed:
tests/ChangeLog
tests/run-addrscopes.sh
tests/run-allfcts.sh
tests/run-ecp-test.sh
tests/run-ecp-test2.sh
tests/run-elflint-test.sh
tests/run-funcscopes.sh
tests/run-get-aranges.sh
tests/run-get-files.sh
tests/run-get-lines.sh
tests/run-get-pubnames.sh
tests/run-line2addr.sh
tests/run-ranlib-test2.sh
tests/run-show-abbrev.sh
tests/run-show-ciefde.sh
tests/run-show-die-info.sh
tests/run-strings-test.sh
tests/run-strip-test.sh

index ad426e13dd3560841f250cdc1ff0d0cc6541abae..3a5d16a74cc3aab1b831d7a697422892c7b1a4db 100644 (file)
@@ -1,3 +1,23 @@
+2005-08-31  Ulrich Drepper  <drepper@redhat.com>
+
+       * run-addrscopes.sh: Use correct exit code if test cannot be performed.
+       * run-allfcts.sh: Likewise.
+       * run-ecp-test.sh: Likewise.
+       * run-ecp-test2.sh: Likewise.
+       * run-elflint-test.sh: Likewise.
+       * run-funcscopes.sh: Likewise.
+       * run-get-aranges.sh: Likewise.
+       * run-get-files.sh: Likewise.
+       * run-get-lines.sh: Likewise.
+       * run-get-pubnames.sh: Likewise.
+       * run-line2addr.sh: Likewise.
+       * run-ranlib-test2.sh: Likewise.
+       * run-show-abbrev.sh: Likewise.
+       * run-show-ciefde.sh: Likewise.
+       * run-show-die-info.sh: Likewise.
+       * run-strings-test.sh: Likewise.
+       * run-strip-test.sh: Likewise.
+
 2005-08-30  Ulrich Drepper  <drepper@redhat.com>
 
        * coverage.sh: Handle case where there is no .gcno file at all.
index 57a610b81cf2fadeb503e15a611dca81905efbb3..d1e89cc85182b2fe354a9f254f1bde9b55deafc1 100755 (executable)
@@ -13,7 +13,7 @@
 set -e
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile22.bz2 > testfile22 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile22.bz2 > testfile22 2>/dev/null || exit 77
 
 LD_LIBRARY_PATH=../libdw:../libebl:../libelf${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH \
   ./addrscopes -e testfile22 0x8048353 >& addrscopes-test.out || :
@@ -29,7 +29,7 @@ EOF
 rm -f testfile22 addrscopes-test.out
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile24.bz2 > testfile24 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile24.bz2 > testfile24 2>/dev/null || exit 77
 
 LD_LIBRARY_PATH=../libdw:../libebl:../libelf${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH \
   ./addrscopes -e testfile24 0x804834e >& addrscopes-test.out || :
index 51fe75cecc0d78ea46d1f27b99d2eefab58f9b62..3fde34b9fafbf00fafb21fde1315a1e84ae1e2c4 100755 (executable)
 set -e
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile.bz2 > testfile 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile.bz2 > testfile 2>/dev/null || exit 77
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 77
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile8.bz2 > testfile8 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile8.bz2 > testfile8 2>/dev/null || exit 77
 
 ./allfcts testfile testfile2 testfile8 > allfcts.out
 
index e4304965b3206552f28622dbadd6742cc84dd33a..c21bb6ca3098ee47ac23c7e4740a7efd3d764431 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002 Red Hat, Inc.
+# Copyright (C) 2002, 2005 Red Hat, Inc.
 # Written by Jakub Jelinek <jakub@redhat.com>, 2002.
 #
 # This program is Open Source software; you can redistribute it and/or
@@ -14,7 +14,7 @@
 set -e
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile10.bz2 > testfile10 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile10.bz2 > testfile10 2>/dev/null || exit 77
 
 ./ecp testfile10 testfile10.tmp
 
index 143c70a6e0568672b1953210d381782aecd92c9f..8f3775be9143770c69600e4cc171d97abe22e8eb 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002 Red Hat, Inc.
+# Copyright (C) 2002, 2005 Red Hat, Inc.
 # Written by Jakub Jelinek <jakub@redhat.com>, 2002.
 #
 # This program is Open Source software; you can redistribute it and/or
@@ -14,7 +14,7 @@
 set -e
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 77
 
 ./ecp testfile2 testfile2.tmp
 
index f008ccdc3b21113d19edfe4ab728ea6c13d53438..74727b66ef220645875bad24eee53cba522663ca 100755 (executable)
 set -e
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile18.bz2 > testfile18 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile18.bz2 > testfile18 2>/dev/null || exit 77
 
 LD_LIBRARY_PATH=../libebl:../libelf${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH \
-  ../src/elflint --gnu testfile18 >& elflint-test.out || :
+  ../src/elflint --gnu-ld testfile18 >& elflint-test.out || :
 
 diff -u elflint-test.out - <<"EOF"
 section [ 8] '.rela.dyn': relocation 1: copy relocation against symbol of type FUNC
index 7236ef919f1b5492371d9d3a78b0c9ba971ca2f1..e0dcfae1684afd80129d457ee0f2592ae595caae 100755 (executable)
@@ -13,7 +13,7 @@
 set -e
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile25.bz2 > testfile25 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile25.bz2 > testfile25 2>/dev/null || exit 77
 
 LD_LIBRARY_PATH=../libdw:../libebl:../libelf${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH \
   ./funcscopes -e testfile25 incr >& funcscopes-test.out || :
index 26b29863cbe315d2c4274c95500ea1a8f87c1d70..a816c218488b3c0e9287b6b9a2b9036b7bbf27d9 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2002 Red Hat, Inc.
+# Copyright (C) 1999, 2000, 2002, 2005 Red Hat, Inc.
 # Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 #
 # This program is Open Source software; you can redistribute it and/or
 set -e
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile.bz2 > testfile 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile.bz2 > testfile 2>/dev/null || exit 77
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 77
 
 ./get-aranges testfile testfile2 > get-aranges.out
 
index 7af5c139d0e6bd1fadd87d26f5edacce8afa8d50..e80cf68d78f99449275433a5f08492a53c31f75c 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2002, 2004 Red Hat, Inc.
+# Copyright (C) 1999, 2000, 2002, 2004, 2005 Red Hat, Inc.
 # Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 #
 # This program is Open Source software; you can redistribute it and/or
 set -e
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile.bz2 > testfile 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile.bz2 > testfile 2>/dev/null || exit 77
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 77
 
 ./get-files testfile testfile2 > get-files.out
 
index 70c9cd84c1e750d7ddd47d8fc521ac4af8e77035..2f7f85809932ce7cacc17122c3e3a238f2738d33 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2002, 2004 Red Hat, Inc.
+# Copyright (C) 1999, 2000, 2002, 2004, 2005 Red Hat, Inc.
 # Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 #
 # This program is Open Source software; you can redistribute it and/or
 set -e
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile.bz2 > testfile 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile.bz2 > testfile 2>/dev/null || exit 77
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 77
 
 ./get-lines testfile testfile2 > get-lines.out
 
index a232bfd2a4a8df8c981a98216b971f51155f6c86..4c9d5c2a7e0a6f4d6fe225d06913c06685360612 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2002, 2003 Red Hat, Inc.
+# Copyright (C) 1999, 2000, 2002, 2003, 2005 Red Hat, Inc.
 # Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 #
 # This program is Open Source software; you can redistribute it and/or
 set -e
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile.bz2 > testfile 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile.bz2 > testfile 2>/dev/null || exit 77
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 77
 
 ./get-pubnames testfile testfile2 > get-pubnames.out
 
index c103ae03ac58d0d9304f8cef2ea07d57957af287..91047c2739a65e890fe0d9ccbed200a7d2a7f535 100755 (executable)
 set -e
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile.bz2 > testfile 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile.bz2 > testfile 2>/dev/null || exit 77
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 77
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile8.bz2 > testfile8 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile8.bz2 > testfile8 2>/dev/null || exit 77
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile14.bz2 > testfile14 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile14.bz2 > testfile14 2>/dev/null || exit 77
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile23.bz2 > testfile23 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile23.bz2 > testfile23 2>/dev/null || exit 77
 
 (./line2addr -e testfile f.c:4 testfile f.c:8
  ./line2addr -e testfile2 m.c:6 b.c:1
index cce9ca7c29966244eeeed9383007b743f4e7fe9a..6eb62f2e390ccff5690b4b0c45c7b4a28ec5393f 100755 (executable)
@@ -17,10 +17,10 @@ original=${original:-testfile19}
 indexed=${indexed:-testfile19.index}
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/$original.bz2 > $original 2>/dev/null || exit 0
+bunzip2 -c $srcdir/$original.bz2 > $original 2>/dev/null || exit 77
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/$indexed.bz2 > $indexed 2>/dev/null || exit 0
+bunzip2 -c $srcdir/$indexed.bz2 > $indexed 2>/dev/null || exit 77
 
 LD_LIBRARY_PATH=../libelf${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH \
   ../src/ranlib $original
index 78812a5ff1de0ee8965632433d85f59a4442e71c..0d0ff60cdb54fb5c90f80f7091a30db391a61cfd 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2002, 2003, 2004 Red Hat, Inc.
+# Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005 Red Hat, Inc.
 # Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 #
 # This program is Open Source software; you can redistribute it and/or
 set -e
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile.bz2 > testfile 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile.bz2 > testfile 2>/dev/null || exit 77
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 77
 
 ./show-abbrev testfile testfile2 > show-abbrev.out
 
index b33553342bc3f95b18c806062aaf98e3c30c47f4..ac97bbb327c2ed980177099dc4b03d05c98f2cad 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2002 Red Hat, Inc.
+# Copyright (C) 1999, 2000, 2002, 2005 Red Hat, Inc.
 # Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 #
 # This program is Open Source software; you can redistribute it and/or
 set -e
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile3.bz2 > testfile3 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile3.bz2 > testfile3 2>/dev/null || exit 77
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile4.bz2 > testfile4 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile4.bz2 > testfile4 2>/dev/null || exit 77
 
 ./show-ciefde testfile3 testfile4 > show-ciefde.out
 
index 042632682927cf3246b45a8cab7356464c48d34a..3cdfae50a77f6512b1b17f4228efaf43b58311aa 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2002, 2003, 2004 Red Hat, Inc.
+# Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005 Red Hat, Inc.
 # Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 #
 # This program is Open Source software; you can redistribute it and/or
 set -e
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile5.bz2 > testfile5 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile5.bz2 > testfile5 2>/dev/null || exit 77
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 77
 
 ./show-die-info testfile5 testfile2 > show-die-info.out
 
index 9c744afe2a7389260b8d4a6485bbaa2464668e3d..4ea7d3c3b78db4dfe26f9befcc0caf322068c28e 100755 (executable)
 set -e
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile.bz2 > testfile 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile.bz2 > testfile 2>/dev/null || exit 77
 
 # Don't fail if we cannot decompress the file.
 for n in $(seq 2 9); do
-bunzip2 -c $srcdir/testfile$n.bz2 > testfile$n 2>/dev/null || exit 0
+bunzip2 -c $srcdir/testfile$n.bz2 > testfile$n 2>/dev/null || exit 77
 done
 
 LD_LIBRARY_PATH=../libelf${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH \
index 526eb091ca8c889d53e9e80729faebac313f8ffe..169e8929ccde0285d894169fddaf8c5d72572607 100755 (executable)
@@ -18,14 +18,14 @@ stripped=${stripped:-testfile7}
 debugout=${debugfile:+-f testfile.debug.temp -F $debugfile}
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/$original.bz2 > $original 2>/dev/null || exit 0
+bunzip2 -c $srcdir/$original.bz2 > $original 2>/dev/null || exit 77
 
 # Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/$stripped.bz2 > $stripped 2>/dev/null || exit 0
+bunzip2 -c $srcdir/$stripped.bz2 > $stripped 2>/dev/null || exit 77
 
 # Don't fail if we cannot decompress the file.
 test -z "$debugfile" ||
-bunzip2 -c $srcdir/$debugfile.bz2 > $debugfile 2>/dev/null || exit 0
+bunzip2 -c $srcdir/$debugfile.bz2 > $debugfile 2>/dev/null || exit 77
 
 LD_LIBRARY_PATH=../libebl:../libelf${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH \
   ../src/strip -o testfile.temp $debugout $original