diff options
| author | Ulrich Drepper <[email protected]> | 2005-08-31 15:14:26 +0000 |
|---|---|---|
| committer | Ulrich Drepper <[email protected]> | 2005-08-31 15:14:26 +0000 |
| commit | 7d65d01496e465606740033f6ba76b42ddb9815b (patch) | |
| tree | 80ad09bb0bd1a63fd5f751fd1e0e3db5148350b6 | |
| parent | 5a6f8d18a8c575cb30fea083b238d39d18f63083 (diff) | |
Use correct exit code in test shell scripts if test cannot be performed.
| -rw-r--r-- | tests/ChangeLog | 20 | ||||
| -rwxr-xr-x | tests/run-addrscopes.sh | 4 | ||||
| -rwxr-xr-x | tests/run-allfcts.sh | 6 | ||||
| -rwxr-xr-x | tests/run-ecp-test.sh | 4 | ||||
| -rwxr-xr-x | tests/run-ecp-test2.sh | 4 | ||||
| -rwxr-xr-x | tests/run-elflint-test.sh | 4 | ||||
| -rwxr-xr-x | tests/run-funcscopes.sh | 2 | ||||
| -rwxr-xr-x | tests/run-get-aranges.sh | 6 | ||||
| -rwxr-xr-x | tests/run-get-files.sh | 6 | ||||
| -rwxr-xr-x | tests/run-get-lines.sh | 6 | ||||
| -rwxr-xr-x | tests/run-get-pubnames.sh | 6 | ||||
| -rwxr-xr-x | tests/run-line2addr.sh | 10 | ||||
| -rwxr-xr-x | tests/run-ranlib-test2.sh | 4 | ||||
| -rwxr-xr-x | tests/run-show-abbrev.sh | 6 | ||||
| -rwxr-xr-x | tests/run-show-ciefde.sh | 6 | ||||
| -rwxr-xr-x | tests/run-show-die-info.sh | 6 | ||||
| -rwxr-xr-x | tests/run-strings-test.sh | 4 | ||||
| -rwxr-xr-x | tests/run-strip-test.sh | 6 |
18 files changed, 65 insertions, 45 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index ad426e13..3a5d16a7 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,23 @@ +2005-08-31 Ulrich Drepper <[email protected]> + + * 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 <[email protected]> * coverage.sh: Handle case where there is no .gcno file at all. diff --git a/tests/run-addrscopes.sh b/tests/run-addrscopes.sh index 57a610b8..d1e89cc8 100755 --- a/tests/run-addrscopes.sh +++ b/tests/run-addrscopes.sh @@ -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 || : diff --git a/tests/run-allfcts.sh b/tests/run-allfcts.sh index 51fe75ce..3fde34b9 100755 --- a/tests/run-allfcts.sh +++ b/tests/run-allfcts.sh @@ -14,13 +14,13 @@ 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 diff --git a/tests/run-ecp-test.sh b/tests/run-ecp-test.sh index e4304965..c21bb6ca 100755 --- a/tests/run-ecp-test.sh +++ b/tests/run-ecp-test.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2002 Red Hat, Inc. +# Copyright (C) 2002, 2005 Red Hat, Inc. # Written by Jakub Jelinek <[email protected]>, 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 diff --git a/tests/run-ecp-test2.sh b/tests/run-ecp-test2.sh index 143c70a6..8f3775be 100755 --- a/tests/run-ecp-test2.sh +++ b/tests/run-ecp-test2.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2002 Red Hat, Inc. +# Copyright (C) 2002, 2005 Red Hat, Inc. # Written by Jakub Jelinek <[email protected]>, 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 diff --git a/tests/run-elflint-test.sh b/tests/run-elflint-test.sh index f008ccdc..74727b66 100755 --- a/tests/run-elflint-test.sh +++ b/tests/run-elflint-test.sh @@ -14,10 +14,10 @@ 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 diff --git a/tests/run-funcscopes.sh b/tests/run-funcscopes.sh index 7236ef91..e0dcfae1 100755 --- a/tests/run-funcscopes.sh +++ b/tests/run-funcscopes.sh @@ -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 || : diff --git a/tests/run-get-aranges.sh b/tests/run-get-aranges.sh index 26b29863..a816c218 100755 --- a/tests/run-get-aranges.sh +++ b/tests/run-get-aranges.sh @@ -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 <[email protected]>, 1999. # # This program is Open Source software; you can redistribute it and/or @@ -14,10 +14,10 @@ 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 diff --git a/tests/run-get-files.sh b/tests/run-get-files.sh index 7af5c139..e80cf68d 100755 --- a/tests/run-get-files.sh +++ b/tests/run-get-files.sh @@ -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 <[email protected]>, 1999. # # This program is Open Source software; you can redistribute it and/or @@ -14,10 +14,10 @@ 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 diff --git a/tests/run-get-lines.sh b/tests/run-get-lines.sh index 70c9cd84..2f7f8580 100755 --- a/tests/run-get-lines.sh +++ b/tests/run-get-lines.sh @@ -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 <[email protected]>, 1999. # # This program is Open Source software; you can redistribute it and/or @@ -14,10 +14,10 @@ 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 diff --git a/tests/run-get-pubnames.sh b/tests/run-get-pubnames.sh index a232bfd2..4c9d5c2a 100755 --- a/tests/run-get-pubnames.sh +++ b/tests/run-get-pubnames.sh @@ -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 <[email protected]>, 1999. # # This program is Open Source software; you can redistribute it and/or @@ -14,10 +14,10 @@ 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 diff --git a/tests/run-line2addr.sh b/tests/run-line2addr.sh index c103ae03..91047c27 100755 --- a/tests/run-line2addr.sh +++ b/tests/run-line2addr.sh @@ -14,19 +14,19 @@ 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 diff --git a/tests/run-ranlib-test2.sh b/tests/run-ranlib-test2.sh index cce9ca7c..6eb62f2e 100755 --- a/tests/run-ranlib-test2.sh +++ b/tests/run-ranlib-test2.sh @@ -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 diff --git a/tests/run-show-abbrev.sh b/tests/run-show-abbrev.sh index 78812a5f..0d0ff60c 100755 --- a/tests/run-show-abbrev.sh +++ b/tests/run-show-abbrev.sh @@ -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 <[email protected]>, 1999. # # This program is Open Source software; you can redistribute it and/or @@ -14,10 +14,10 @@ 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 diff --git a/tests/run-show-ciefde.sh b/tests/run-show-ciefde.sh index b3355334..ac97bbb3 100755 --- a/tests/run-show-ciefde.sh +++ b/tests/run-show-ciefde.sh @@ -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 <[email protected]>, 1999. # # This program is Open Source software; you can redistribute it and/or @@ -14,10 +14,10 @@ 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 diff --git a/tests/run-show-die-info.sh b/tests/run-show-die-info.sh index 04263268..3cdfae50 100755 --- a/tests/run-show-die-info.sh +++ b/tests/run-show-die-info.sh @@ -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 <[email protected]>, 1999. # # This program is Open Source software; you can redistribute it and/or @@ -14,10 +14,10 @@ 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 diff --git a/tests/run-strings-test.sh b/tests/run-strings-test.sh index 9c744afe..4ea7d3c3 100755 --- a/tests/run-strings-test.sh +++ b/tests/run-strings-test.sh @@ -14,11 +14,11 @@ 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 \ diff --git a/tests/run-strip-test.sh b/tests/run-strip-test.sh index 526eb091..169e8929 100755 --- a/tests/run-strip-test.sh +++ b/tests/run-strip-test.sh @@ -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 |
