diff options
| author | Roland McGrath <[email protected]> | 2007-10-23 13:07:39 +0000 |
|---|---|---|
| committer | Roland McGrath <[email protected]> | 2007-10-23 13:07:39 +0000 |
| commit | e4c22ea004c02a58f5db5eb53794275344c17958 (patch) | |
| tree | ec3713d305f8e9f05b15d29240accc71e98998c5 /tests | |
| parent | 98c5ead4ad9fbf96ad3b54d8ca26e354ddc3398d (diff) | |
2007-10-23 Roland McGrath <[email protected]>
* linux-kernel-modules.c (report_kernel_archive): Reorder the kernel
module to appear first.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ChangeLog | 21 | ||||
| -rw-r--r-- | tests/Makefile.am | 5 | ||||
| -rw-r--r-- | tests/dwfl-addr-sect.c | 13 | ||||
| -rwxr-xr-x | tests/run-allregs.sh | 6 | ||||
| -rwxr-xr-x | tests/run-dwfl-addr-sect.sh | 37 | ||||
| -rw-r--r-- | tests/test-subr.sh | 4 | ||||
| -rw-r--r-- | tests/testfile43.bz2 | bin | 0 -> 739 bytes |
7 files changed, 75 insertions, 11 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index 1284b134..f029f156 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,24 @@ +2007-10-20 Roland McGrath <[email protected]> + + * run-dwfl-addr-sect.sh: Change expected output, no errors. + +2007-10-19 Roland McGrath <[email protected]> + + * dwfl-addr-sect.c (handle_address): Return int. + Don't exit on error, just return nonzero. + (main): Collect results. + * run-dwfl-addr-sect.sh: New file. + * testfile43.bz2: New data file. + * Makefile.am (EXTRA_DIST, TESTS): Add them. + +2007-10-18 Roland McGrath <[email protected]> + + * run-allregs.sh: Update expected ppc output for vrsave/vscr. + +2007-10-16 Roland McGrath <[email protected]> + + * test-subr.sh (remove_files): Don't pass -Bb to diff. + 2007-10-09 Roland McGrath <[email protected]> * dwflmodtest.c (print_module): Don't use %p in output. diff --git a/tests/Makefile.am b/tests/Makefile.am index ab325c7a..45560788 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -83,7 +83,7 @@ TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \ run-native-test.sh run-bug1-test.sh \ dwfl-bug-addr-overflow run-addrname-test.sh \ dwfl-bug-fd-leak dwfl-bug-report \ - run-dwfl-bug-offline-rel.sh + run-dwfl-bug-offline-rel.sh run-dwfl-addr-sect.sh # run-show-ciefde.sh if !STANDALONE @@ -114,6 +114,7 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \ run-find-prologues.sh run-allregs.sh run-native-test.sh \ run-addrname-test.sh run-dwfl-bug-offline-rel.sh \ + run-dwfl-addr-sect.sh \ testfile15.bz2 testfile15.debug.bz2 \ testfile16.bz2 testfile16.debug.bz2 \ testfile17.bz2 testfile17.debug.bz2 \ @@ -132,7 +133,7 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ testfile36.bz2 testfile36.debug.bz2 \ testfile37.bz2 testfile37.debug.bz2 \ testfile38.bz2 testfile39.bz2 testfile40.bz2 testfile40.debug.bz2 \ - testfile41.bz2 testfile42.bz2 + testfile41.bz2 testfile42.bz2 testfile43.bz2 installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir) \ bindir=$(DESTDIR)$(bindir) \ diff --git a/tests/dwfl-addr-sect.c b/tests/dwfl-addr-sect.c index b1f29f7c..62d11541 100644 --- a/tests/dwfl-addr-sect.c +++ b/tests/dwfl-addr-sect.c @@ -37,8 +37,7 @@ #include ELFUTILS_HEADER(dwfl) #include <dwarf.h> - -static void +static int handle_address (Dwfl *dwfl, Dwarf_Addr address) { Dwfl_Module *mod = dwfl_addrmodule (dwfl, address); @@ -46,12 +45,16 @@ handle_address (Dwfl *dwfl, Dwarf_Addr address) Dwarf_Addr bias; Elf_Scn *scn = dwfl_module_address_section (mod, &adjusted, &bias); if (scn == NULL) - error (EXIT_FAILURE, 0, "%#" PRIx64 ": dwfl_module_address_section: %s", - address, dwfl_errmsg (-1)); + { + error (0, 0, "%#" PRIx64 ": dwfl_module_address_section: %s", + address, dwfl_errmsg (-1)); + return 1; + } printf ("address %#" PRIx64 " => module \"%s\" section %zu + %#" PRIx64 "\n", address, dwfl_module_info (mod, NULL, NULL, NULL, NULL, NULL, NULL, NULL), elf_ndxscn (scn), adjusted); + return 0; } int @@ -74,7 +77,7 @@ main (int argc, char **argv) char *endp; uintmax_t addr = strtoumax (argv[remaining], &endp, 0); if (endp != argv[remaining]) - handle_address (dwfl, addr); + result |= handle_address (dwfl, addr); else result = 1; } diff --git a/tests/run-allregs.sh b/tests/run-allregs.sh index c7f46b0b..82d57409 100755 --- a/tests/run-allregs.sh +++ b/tests/run-allregs.sh @@ -502,7 +502,6 @@ privileged registers: 353: spr253 (spr253), unsigned 32 bits 354: spr254 (spr254), unsigned 32 bits 355: spr255 (spr255), unsigned 32 bits - 356: vrsave (vrsave), unsigned 32 bits 357: spr257 (spr257), unsigned 32 bits 358: spr258 (spr258), unsigned 32 bits 359: spr259 (spr259), unsigned 32 bits @@ -1147,6 +1146,8 @@ privileged registers: 998: spr898 (spr898), unsigned 32 bits 999: spr899 (spr899), unsigned 32 bits vector registers: + 67: vscr (vscr), unsigned 32 bits + 356: vrsave (vrsave), unsigned 32 bits 1124: vr0 (vr0), unsigned 128 bits 1125: vr1 (vr1), unsigned 128 bits 1126: vr2 (vr2), unsigned 128 bits @@ -1524,7 +1525,6 @@ privileged registers: 353: spr253 (spr253), unsigned 64 bits 354: spr254 (spr254), unsigned 64 bits 355: spr255 (spr255), unsigned 64 bits - 356: vrsave (vrsave), unsigned 64 bits 357: spr257 (spr257), unsigned 64 bits 358: spr258 (spr258), unsigned 64 bits 359: spr259 (spr259), unsigned 64 bits @@ -2169,6 +2169,8 @@ privileged registers: 998: spr898 (spr898), unsigned 64 bits 999: spr899 (spr899), unsigned 64 bits vector registers: + 67: vscr (vscr), unsigned 32 bits + 356: vrsave (vrsave), unsigned 32 bits 1124: vr0 (vr0), unsigned 128 bits 1125: vr1 (vr1), unsigned 128 bits 1126: vr2 (vr2), unsigned 128 bits diff --git a/tests/run-dwfl-addr-sect.sh b/tests/run-dwfl-addr-sect.sh new file mode 100755 index 00000000..69280f58 --- /dev/null +++ b/tests/run-dwfl-addr-sect.sh @@ -0,0 +1,37 @@ +#! /bin/sh +# Copyright (C) 2007 Red Hat, Inc. +# This file is part of Red Hat elfutils. +# +# Red Hat elfutils is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by the +# Free Software Foundation; version 2 of the License. +# +# Red Hat elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Red Hat elfutils; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. +# +# Red Hat elfutils is an included package of the Open Invention Network. +# An included package of the Open Invention Network is a package for which +# Open Invention Network licensees cross-license their patents. No patent +# license is granted, either expressly or impliedly, by designation as an +# included package. Should you wish to participate in the Open Invention +# Network licensing program, please visit www.openinventionnetwork.com +# <http://www.openinventionnetwork.com>. + +. $srcdir/test-subr.sh + +testfiles testfile43 + +export LC_ALL=C +testrun_compare ./dwfl-addr-sect -e testfile43 0x64 0x8 0x98 <<\EOF +address 0x64 => module "" section 4 + 0 +address 0x8 => module "" section 1 + 0x8 +address 0x98 => module "" section 7 + 0 +EOF + +exit 0 diff --git a/tests/test-subr.sh b/tests/test-subr.sh index d92c602e..7fda05a0 100644 --- a/tests/test-subr.sh +++ b/tests/test-subr.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2005 Red Hat, Inc. +# Copyright (C) 2005, 2007 Red Hat, Inc. # This file is part of Red Hat elfutils. # # Red Hat elfutils is free software; you can redistribute it and/or modify @@ -58,7 +58,7 @@ testrun_compare() { outfile="${1##*/}.out" testrun_out $outfile "$@" - diff -Bbu $outfile - + diff -u $outfile - # diff's exit status will kill the script. } diff --git a/tests/testfile43.bz2 b/tests/testfile43.bz2 Binary files differnew file mode 100644 index 00000000..c99db24a --- /dev/null +++ b/tests/testfile43.bz2 |
