]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Expand testfile53 for 32/64-bit
authorJosh Stone <jistone@redhat.com>
Wed, 12 Jan 2011 03:16:58 +0000 (19:16 -0800)
committerRoland McGrath <roland@redhat.com>
Wed, 12 Jan 2011 18:27:43 +0000 (10:27 -0800)
12 files changed:
tests/ChangeLog
tests/Makefile.am
tests/run-prelink-addr-test.sh
tests/testfile53-32.bz2 [new file with mode: 0755]
tests/testfile53-32.debug.bz2 [new file with mode: 0755]
tests/testfile53-32.prelink.bz2 [new file with mode: 0755]
tests/testfile53-64.bz2 [new file with mode: 0755]
tests/testfile53-64.debug.bz2 [new file with mode: 0755]
tests/testfile53-64.prelink.bz2 [new file with mode: 0755]
tests/testfile53.bz2 [deleted file]
tests/testfile53.debug.bz2 [deleted file]
tests/testfile53.prelink.bz2 [deleted file]

index df97240aeeb4987d3d7448b153d282ddca491c03..bb5634da2811ce1921a305842923299adb01b9f5 100644 (file)
@@ -1,5 +1,14 @@
 2011-01-11  Josh Stone  <jistone@redhat.com>
 
+       * run-prelink-addr-test.sh: Run 32 and 64-bit testfile53 tests.
+       * testfile53.bz2, testfile53.debug.bz2,
+       testfile53.prelink.bz2: Deleted, so...
+       * testfile53-64.bz2, testfile53-64.debug.bz2,
+       testfile53-64.prelink.bz2: Recreated with 64-bit names.
+       * testfile53-32.bz2, testfile53-32.debug.bz2,
+       testfile53-32.prelink.bz2: New in 32-bit.
+       * Makefile.am (EXTRA_DIST): Add and update all.
+
        * run-prelink-addr-test.sh: Run 32 and 64-bit testfile52 tests.
        * testfile52.so.bz2, testfile52.so.debug.bz2,
        testfile52.prelink.so.bz2: Deleted, so...
index 2ab961c35f466aae53f08d8dc8485338dead3bbe..9f191ce215ed71f2616f74eeff54d242569311da 100644 (file)
@@ -145,7 +145,9 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \
             testfile52-32.prelink.so.bz2 testfile52-32.noshdrs.so.bz2 \
             testfile52-64.so.bz2 testfile52-64.so.debug.bz2 \
             testfile52-64.prelink.so.bz2 testfile52-64.noshdrs.so.bz2 \
-            testfile53.bz2 testfile53.debug.bz2 testfile53.prelink.bz2
+            testfile53-32.bz2 testfile53-32.debug.bz2 \
+            testfile53-32.prelink.bz2 testfile53-64.bz2 \
+            testfile53-64.debug.bz2 testfile53-64.prelink.bz2
 
 installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir) \
                              bindir=$(DESTDIR)$(bindir) \
index 6938ec15ccd8e8c7ecbeca4c9975bcaea03c3e0d..e554d4b0b14381ddfa9fdadc7f6c9c368e973c9b 100755 (executable)
@@ -94,26 +94,44 @@ EOF
 
 
 # testfile53.c:
-#   char foo[2000];
+#   char foo[0x1000];
 #   int main() { return 0; }
 #
-# gcc -g testfile53.c -o testfile53
-# eu-strip -f testfile53.debug testfile53
-# cp testfile53 testfile53.prelinked
-# prelink -N testfile53.prelinked
-testfiles testfile53 testfile53.prelink testfile53.debug
+# gcc -m32 -g testfile53-32.c -o testfile53-32
+# eu-strip -f testfile53-32.debug testfile53-32
+# cp testfile53-32 testfile53-32.prelink
+# prelink -N testfile53-32.prelink
+testfiles testfile53-32 testfile53-32.debug testfile53-32.prelink
 
-testrun_compare ../src/addr2line -S -e testfile53 0x400474 0x400475 <<\EOF
+testrun_compare ../src/addr2line -S -e testfile53-32 0x8048394 0x8048395 <<\EOF
 main
-/home/jistone/src/elfutils/tests/testfile53.c:2
+/home/jistone/src/elfutils/tests/testfile53-32.c:2
 main+0x1
-/home/jistone/src/elfutils/tests/testfile53.c:2
+/home/jistone/src/elfutils/tests/testfile53-32.c:2
 EOF
 
 # prelink shuffled some of the sections, but .text is in the same place.
-testrun_compare ../src/addr2line -S -e testfile53.prelink 0x400476 0x400477 <<\EOF
+testrun_compare ../src/addr2line -S -e testfile53-32.prelink 0x8048396 0x8048397 <<\EOF
 main+0x2
-/home/jistone/src/elfutils/tests/testfile53.c:2
+/home/jistone/src/elfutils/tests/testfile53-32.c:2
 main+0x3
-/home/jistone/src/elfutils/tests/testfile53.c:2
+/home/jistone/src/elfutils/tests/testfile53-32.c:2
+EOF
+
+# Repeat testfile53 in 64-bit, except use foo[0x800] to achieve the same
+# prelink section shuffling.
+testfiles testfile53-64 testfile53-64.debug testfile53-64.prelink
+
+testrun_compare ../src/addr2line -S -e testfile53-64 0x400474 0x400475 <<\EOF
+main
+/home/jistone/src/elfutils/tests/testfile53-64.c:2
+main+0x1
+/home/jistone/src/elfutils/tests/testfile53-64.c:2
+EOF
+
+testrun_compare ../src/addr2line -S -e testfile53-64.prelink 0x400476 0x400477 <<\EOF
+main+0x2
+/home/jistone/src/elfutils/tests/testfile53-64.c:2
+main+0x3
+/home/jistone/src/elfutils/tests/testfile53-64.c:2
 EOF
diff --git a/tests/testfile53-32.bz2 b/tests/testfile53-32.bz2
new file mode 100755 (executable)
index 0000000..7bf48d9
Binary files /dev/null and b/tests/testfile53-32.bz2 differ
diff --git a/tests/testfile53-32.debug.bz2 b/tests/testfile53-32.debug.bz2
new file mode 100755 (executable)
index 0000000..79ea566
Binary files /dev/null and b/tests/testfile53-32.debug.bz2 differ
diff --git a/tests/testfile53-32.prelink.bz2 b/tests/testfile53-32.prelink.bz2
new file mode 100755 (executable)
index 0000000..8e05abf
Binary files /dev/null and b/tests/testfile53-32.prelink.bz2 differ
diff --git a/tests/testfile53-64.bz2 b/tests/testfile53-64.bz2
new file mode 100755 (executable)
index 0000000..235a763
Binary files /dev/null and b/tests/testfile53-64.bz2 differ
diff --git a/tests/testfile53-64.debug.bz2 b/tests/testfile53-64.debug.bz2
new file mode 100755 (executable)
index 0000000..675c6ea
Binary files /dev/null and b/tests/testfile53-64.debug.bz2 differ
diff --git a/tests/testfile53-64.prelink.bz2 b/tests/testfile53-64.prelink.bz2
new file mode 100755 (executable)
index 0000000..853aba7
Binary files /dev/null and b/tests/testfile53-64.prelink.bz2 differ
diff --git a/tests/testfile53.bz2 b/tests/testfile53.bz2
deleted file mode 100755 (executable)
index 2e0e74c..0000000
Binary files a/tests/testfile53.bz2 and /dev/null differ
diff --git a/tests/testfile53.debug.bz2 b/tests/testfile53.debug.bz2
deleted file mode 100755 (executable)
index ec36e98..0000000
Binary files a/tests/testfile53.debug.bz2 and /dev/null differ
diff --git a/tests/testfile53.prelink.bz2 b/tests/testfile53.prelink.bz2
deleted file mode 100755 (executable)
index b2f4dea..0000000
Binary files a/tests/testfile53.prelink.bz2 and /dev/null differ