diff options
author | Mark Wielaard <mjw@redhat.com> | 2012-04-03 00:21:50 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2012-04-03 00:21:50 +0200 |
commit | 96a52138eab04f24a86c78e8f2af9c74c2d6bfaf (patch) | |
tree | 0ff635cccbdddb05a2be98cfde043e3e895e2141 | |
parent | 191d1f0b9163593eee8c4f5cbe3e95cabf6ae9a9 (diff) |
Add new run-unstrip-n.sh test for RHBZ#805447 fixed in commit 210c2f.
-rw-r--r-- | tests/ChangeLog | 7 | ||||
-rw-r--r-- | tests/Makefile.am | 7 | ||||
-rwxr-xr-x | tests/run-unstrip-n.sh | 53 | ||||
-rw-r--r-- | tests/testcore-rtlib.bz2 | bin | 0 -> 25566 bytes |
4 files changed, 64 insertions, 3 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index 6f6c5928..c38ede5c 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,5 +1,12 @@ 2012-04-02 Mark Wielaard <mjw@redhat.com> + * Makefile.am (TESTS): Add run-unstrip-n.sh. + (EXTRA_DIST): Add testcore-rtlib.bz2 and run-unstrip-n.sh. + * run-unstrip-n.sh: New test. + * testcore-rtlib.bz2: New testfile. + +2012-04-02 Mark Wielaard <mjw@redhat.com> + * Makefile.am (TESTS): Add run-readelf-d.sh. (EXTRA_DIST): Add testlib_dynseg.so.bz2 and run-readelf-d.sh. * run-readelf-d.sh: New test. diff --git a/tests/Makefile.am b/tests/Makefile.am index 980aa125..23575b76 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to create Makefile.in ## -## Copyright (C) 1996-2011 Red Hat, Inc. +## Copyright (C) 1996-2012 Red Hat, Inc. ## This file is part of Red Hat elfutils. ## ## Red Hat elfutils is free software; you can redistribute it and/or modify @@ -87,7 +87,7 @@ TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \ run-early-offscn.sh run-dwarf-getmacros.sh \ run-test-flag-nobits.sh run-prelink-addr-test.sh \ run-dwarf-getstring.sh run-rerequest_tag.sh run-typeiter.sh \ - run-readelf-d.sh + run-readelf-d.sh run-unstrip-n.sh # run-show-ciefde.sh if !STANDALONE @@ -164,7 +164,8 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ testfile55-64.debug.bz2 testfile55-64.prelink.bz2 \ testfile56.bz2 testfile57.bz2 testfile58.bz2 \ run-typeiter.sh testfile59.bz2 \ - run-readelf-d.sh testlib_dynseg.so.bz2 + run-readelf-d.sh testlib_dynseg.so.bz2 \ + run-unstrip-n.sh testcore-rtlib.bz2 installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir) \ bindir=$(DESTDIR)$(bindir) \ diff --git a/tests/run-unstrip-n.sh b/tests/run-unstrip-n.sh new file mode 100755 index 00000000..873e2a6f --- /dev/null +++ b/tests/run-unstrip-n.sh @@ -0,0 +1,53 @@ +#! /bin/sh +# Copyright (C) 2012 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 + +# https://bugzilla.redhat.com/show_bug.cgi?id=805447 +# eu-unstrip emits garbage for librt.so.1 +# +# #include <stdio.h> +# #include <sys/mman.h> +# +# int main(int argc, char **argv) +# { +# // Yes, this crashes... That is the point. +# return shm_open(argv[1], 0, 0); +# } +# +# gcc -m32 -o rt_crash -lrt rt_crash.c + +testfiles testcore-rtlib + +testrun_compare ../src/unstrip -n --core=testcore-rtlib <<\EOF +0x8048000+0x2000 f1c600bc36cb91bf01f9a63a634ecb79aa4c3199@0x8048178 . - [exe] +0xf77d6000+0x1000 676560b1b765cde9c2e53f134f4ee354ea894747@0xf77d6210 . - linux-gate.so.1 +0xf77b3000+0x9000 c6c5b5e35ab9589d4762ac85b4bd56b1b2720e37@0xf77b3164 /lib/librt.so.1 - librt.so.1 +0xf7603000+0x1b0000 0b9bf374699e141e5dfc14757ff42b8c2373b4de@0xf7603184 /lib/libc.so.6 - libc.so.6 +0xf75e9000+0x1a000 29a103420abe341e92072fb14274e250e4072148@0xf75e9164 /lib/libpthread.so.0 - libpthread.so.0 +0xf77d7000+0x21000 6d2cb32650054f1c176d01d48713a4a5e5e84c1a@0xf77d7124 /lib/ld-linux.so.2 - ld-linux.so.2 +EOF + +exit 0 diff --git a/tests/testcore-rtlib.bz2 b/tests/testcore-rtlib.bz2 Binary files differnew file mode 100644 index 00000000..1dc0f1a3 --- /dev/null +++ b/tests/testcore-rtlib.bz2 |