summaryrefslogtreecommitdiffstats
path: root/tests/run-find-prologues.sh
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2005-11-16 01:33:38 +0000
committerRoland McGrath <[email protected]>2005-11-16 01:33:38 +0000
commit1b8b446a794ac4babfd687ca48de32e5f4aaa539 (patch)
treeb619a87dfff2b1fb667778f2699daa29a77f74c3 /tests/run-find-prologues.sh
parentfd856b5865368a894c178be0d2ad7285db5b3150 (diff)
2005-11-15 Roland McGrath <[email protected]>
* configure.ac: Add --enable-tests-rpath option. tests/ 2005-11-15 Roland McGrath <[email protected]> * Makefile.am (BUILD_RPATH): New variable. [TESTS_RPATH] (AM_LDFLAGS): Pass -rpath option using that value. (tests_rpath): New variable. (installcheck-local): Pass it to test-wrapper.sh. * test-wrapper.sh: In "installed" format, take yes/no value for elfutils_tests_rpath, which export. When running a test binary for installcheck, exit 77. * test-subr.sh (installed_testrun): When running a test binary for installcheck, exit 77 if $elfutils_tests_rpath = yes.
Diffstat (limited to 'tests/run-find-prologues.sh')
-rwxr-xr-xtests/run-find-prologues.sh43
1 files changed, 29 insertions, 14 deletions
diff --git a/tests/run-find-prologues.sh b/tests/run-find-prologues.sh
index 3e43fc53..56d2819a 100755
--- a/tests/run-find-prologues.sh
+++ b/tests/run-find-prologues.sh
@@ -10,24 +10,18 @@
# License version 1.0 from http://www.opensource.org/licenses/osl.php or
# by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
# 3001 King Ranch Road, Ukiah, CA 95482.
-set -e
+. $srcdir/test-subr.sh
-files="testfile testfile11 testfile22 testfile24 \
-testfile25 testfile3 testfile4 testfile5 testfile6"
+testfiles testfile testfile11 testfile22 testfile24 \
+ testfile25 testfile3 testfile4 testfile5 testfile6
-for file in $files; do
- # Don't fail if we cannot decompress the file.
- bunzip2 -c $srcdir/$file.bz2 > $file 2>/dev/null || exit 77
-done
-
-for file in $files; do
- ./find-prologues -e $file || :
-done > find-prologues-test.out 2>&1
-
-diff -Bbu find-prologues-test.out - <<\EOF
+testrun_compare ./find-prologues -e testfile <<\EOF
main 0x000000000804842c 0x0000000008048432
bar 0x000000000804845c 0x000000000804845f
foo 0x0000000008048468 0x000000000804846b
+EOF
+
+testrun_compare ./find-prologues -e testfile11 <<\EOF
main 0x00000000080489b8 0x00000000080489cd
gnu_obj_2 0x0000000008048c9e 0x0000000008048ca4
gnu_obj_3 0x0000000008048cd8 0x0000000008048cde
@@ -36,22 +30,43 @@ gnu_obj_2 0x0000000008048cf4 0x0000000008048cfa
gnu_obj_1 0x0000000008048d62 0x0000000008048d65
gnu_obj_1 0x0000000008048d8a 0x0000000008048d8d
~invalid_argument 0x0000000008048db2 0x0000000008048db8
+EOF
+
+testrun_compare ./find-prologues -e testfile22 <<\EOF
function 0x0000000008048348 0x000000000804834e
main 0x000000000804835b 0x0000000008048377
+EOF
+
+testrun_compare ./find-prologues -e testfile24 <<\EOF
incr 0x0000000008048348 0x000000000804834e
main 0x0000000008048354 0x0000000008048360
+EOF
+
+testrun_compare ./find-prologues -e testfile25 <<\EOF
incr 0x0000000008048348 0x000000000804834c
+EOF
+
+testrun_compare ./find-prologues -e testfile3 <<\EOF
main 0x000000000804842c 0x0000000008048433
bar 0x0000000008048458 0x000000000804845b
foo 0x0000000008048464 0x0000000008048467
+EOF
+
+testrun_compare ./find-prologues -e testfile4 <<\EOF
get 0x00000000080493fc 0x0000000008049402
main 0x0000000008049498 0x000000000804949e
a 0x000000000804d85c 0x000000000804d85c
__tfPCc 0x000000000804d86c 0x000000000804d872
__tfCc 0x000000000804d8a4 0x000000000804d8a4
+EOF
+
+testrun_compare ./find-prologues -e testfile5 <<\EOF
bar 0x000000000804842c 0x000000000804842f
foo 0x0000000008048438 0x000000000804843b
main 0x0000000008048444 0x000000000804844a
+EOF
+
+testrun_compare ./find-prologues -e testfile6 <<\EOF
main 0x00000000080489b8 0x00000000080489cd
gnu_obj_2 0x0000000008048c9e 0x0000000008048ca4
gnu_obj_3 0x0000000008048cd8 0x0000000008048cde
@@ -62,4 +77,4 @@ gnu_obj_1 0x0000000008048d8a 0x0000000008048d8d
~invalid_argument 0x0000000008048db2 0x0000000008048db8
EOF
-rm -f find-prologues-test.out $files
+exit 0