This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
[PATCH 5/5] Test elfutils output of a mixed core note.
- From: Petr Machata <pmachata at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Mon, 24 Sep 2012 18:24:20 +0200
- Subject: [PATCH 5/5] Test elfutils output of a mixed core note.
This is a test for previous commit. The core file was snipped so that only
headers and note contents are left. NT_ARM_VFP is the note that exercises
the code.
Signed-off-by: Petr Machata <pmachata@redhat.com>
---
tests/ChangeLog | 7 +++
tests/Makefile.am | 6 ++-
tests/run-readelf-mixed-corenote.sh | 87 +++++++++++++++++++++++++++++++++++
tests/testfile63.bz2 | Bin 0 -> 457 bytes
4 files changed, 98 insertions(+), 2 deletions(-)
create mode 100755 tests/run-readelf-mixed-corenote.sh
create mode 100644 tests/testfile63.bz2
diff --git a/tests/ChangeLog b/tests/ChangeLog
index b2f6e4a..1b5271c 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,5 +1,12 @@
2012-09-24 Petr Machata <pmachata@redhat.com>
+ * testfile63.bz2: New testfile.
+ * run-readelf-mixed-corenote.sh: New test.
+ * Makefile.am (TEST): Add run-readelf-mixed-corenote.sh.
+ (EXTRA_DIST): Add testfile63.bz2 and run-readelf-mixed-corenote.sh.
+
+2012-09-24 Petr Machata <pmachata@redhat.com>
+
* testfile62.bz2: New testfile.
* run-readelf-vmcoreinfo.sh: New test.
* Makefile.am (TEST): Add run-readelf-vmcoreinfo.sh.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index e67a853..6cf098b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -84,7 +84,8 @@ TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \
run-dwarf-getstring.sh run-rerequest_tag.sh run-typeiter.sh \
run-readelf-d.sh run-readelf-gdb_index.sh run-unstrip-n.sh \
run-low_high_pc.sh run-macro-test.sh run-elf_cntl_gelf_getshdr.sh \
- run-test-archive64.sh run-readelf-vmcoreinfo.sh
+ run-test-archive64.sh run-readelf-vmcoreinfo.sh \
+ run-readelf-mixed-corenote.sh
if !STANDALONE
check_PROGRAMS += msg_tst md5-sha1-test
@@ -177,7 +178,8 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \
run-elf_cntl_gelf_getshdr.sh \
run-test-archive64.sh testarchive64.a.bz2 \
testfile60.bz2 testfile61.bz2 \
- run-readelf-vmcoreinfo.sh testfile62.bz2
+ run-readelf-vmcoreinfo.sh testfile62.bz2 \
+ run-readelf-mixed-corenote.sh testfile63.bz2
installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir) \
bindir=$(DESTDIR)$(bindir) \
diff --git a/tests/run-readelf-mixed-corenote.sh b/tests/run-readelf-mixed-corenote.sh
new file mode 100755
index 0000000..f9b96c8
--- /dev/null
+++ b/tests/run-readelf-mixed-corenote.sh
@@ -0,0 +1,87 @@
+#! /bin/sh
+# Copyright (C) 2012 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file 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; either version 3 of the License, or
+# (at your option) any later version.
+#
+# 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile63
+
+testrun_compare ../src/readelf -n testfile63 <<\EOF
+
+Note segment of 892 bytes at offset 0x274:
+ Owner Data size Type
+ CORE 148 PRSTATUS
+ info.si_signo: 11, info.si_code: 0, info.si_errno: 0, cursig: 11
+ sigpend: <>
+ sighold: <>
+ pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063
+ utime: 0.000000, stime: 0.010000, cutime: 0.000000, cstime: 0.000000
+ orig_r0: -1, fpvalid: 1
+ r0: 1 r1: -1091672508 r2: -1091672500
+ r3: 0 r4: 0 r5: 0
+ r6: 33728 r7: 0 r8: 0
+ r9: 0 r10: -1225703496 r11: -1091672844
+ r12: 0 sp: 0xbeee64f4 lr: 0xb6dc3f48
+ pc: 0x00008500 spsr: 0x60000010
+ CORE 124 PRPSINFO
+ state: 0, sname: R, zomb: 0, nice: 0, flag: 0x00400500
+ uid: 0, gid: 0, pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063
+ fname: a.out, psargs: ./a.out
+ CORE 144 AUXV
+ HWCAP: 0xe8d7 <swp half thumb fast-mult vfp edsp>
+ PAGESZ: 4096
+ CLKTCK: 100
+ PHDR: 0x8034
+ PHENT: 32
+ PHNUM: 8
+ BASE: 0xb6eee000
+ FLAGS: 0
+ ENTRY: 0x83c0
+ UID: 0
+ EUID: 0
+ GID: 0
+ EGID: 0
+ SECURE: 0
+ RANDOM: 0xbeee674e
+ EXECFN: 0xbeee6ff4
+ PLATFORM: 0xbeee675e
+ NULL
+ CORE 116 FPREGSET
+ f0: 0x000000000000000000000000 f1: 0x000000000000000000000000
+ f2: 0x000000000000000000000000 f3: 0x000000000000000000000000
+ f4: 0x000000000000000000000000 f5: 0x000000000000000000000000
+ f6: 0x000000000000000000000000 f7: 0x000000000000000000000000
+ LINUX 260 ARM_VFP
+ fpscr: 0x00000000
+ d0: 0x0000000000000000 d1: 0x0000000000000000
+ d2: 0x0000000000000000 d3: 0x0000000000000000
+ d4: 0x0000000000000000 d5: 0x0000000000000000
+ d6: 0x0000000000000000 d7: 0x0000000000000000
+ d8: 0x0000000000000000 d9: 0x0000000000000000
+ d10: 0x0000000000000000 d11: 0x0000000000000000
+ d12: 0x0000000000000000 d13: 0x0000000000000000
+ d14: 0x0000000000000000 d15: 0x0000000000000000
+ d16: 0x0000000000000000 d17: 0x0000000000000000
+ d18: 0x0000000000000000 d19: 0x0000000000000000
+ d20: 0x0000000000000000 d21: 0x0000000000000000
+ d22: 0x0000000000000000 d23: 0x0000000000000000
+ d24: 0x0000000000000000 d25: 0x0000000000000000
+ d26: 0x0000000000000000 d27: 0x0000000000000000
+ d28: 0x0000000000000000 d29: 0x0000000000000000
+ d30: 0x0000000000000000 d31: 0x0000000000000000
+EOF
+
+exit 0
diff --git a/tests/testfile63.bz2 b/tests/testfile63.bz2
new file mode 100644
index 0000000000000000000000000000000000000000..4be87cd444244215d100793b9d68ea224a083a54
GIT binary patch
literal 457
zcmV;)0XF_ZT4*^jL0KkKS&ZMe6#xO(a)fB*mg_(a)Thb#DLFb(m`c_#sta$L;yelK|w$O
zK-54*WC*YUhM<9_kreVzAvUH=hJb0NngAP9O&Fd?(dq%cP~%2Sj3W>XCW8Q)4Fe`k
z88R3^VIqk%OqmRtdV(a)xdG-v}OK+`}p006Ubh6o5Gz(a)bQ0R)k1;S2Qa-iU8AhP3u);
z)vu4h*|!X4F=Cc3C4SY+mF^Tk98g;+V4w^LC0WP-Msa0=MO!eV7+_{6VTGn7Tuq6E
zx*rj||0aPx-8z%3KHgQnMJ`H}8nG?rDd49gZ}`y2Nfam(a)MG#2P08{`bg(#>DY#3y-
z>L9gR67zB}nTuE$X0cas99T|_1SQ3K2_T()z(od-DvUPSMSzXQfG(a)EG`5<q`ouU$9
zX)T9HcNtxYOzf~R-WDZ6rI5*5IN+gnoLO0-L5&e(V2Z4(a)5)!;;D;p}j9e~v=M?CpL
zjOZh)+O$$Ghosd`2bnU8Q7pg^x`0oap(id8Z2IX}4_2ZCGzG(*UN?_eD2^Yl#>Rg&
z6zDCwt|1_ppvj^u|BoPcS76Bt?9S(GD;V^0)5B6%&?k^2R{s}rML1B9jNi8vwkf_L
literal 0
HcmV?d00001
--
1.7.6.5