1 #! /bin/sh 2 # Copyright (C) 2013 Red Hat, Inc. 3 # This file is part of elfutils. 4 # 5 # This file is free software; you can redistribute it and/or modify 6 # it under the terms of the GNU General Public License as published by 7 # the Free Software Foundation; either version 3 of the License, or 8 # (at your option) any later version. 9 # 10 # elfutils is distributed in the hope that it will be useful, but 11 # WITHOUT ANY WARRANTY; without even the implied warranty of 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 # GNU General Public License for more details. 14 # 15 # You should have received a copy of the GNU General Public License 16 # along with this program. If not, see <http://www.gnu.org/licenses/>. 17 18 . $srcdir/test-subr.sh 19 20 testfiles testfile testfile2 21 22 testrun_compare ${abs_builddir}/dwfllines -e testfile <<\EOF 23 mod: CU: [b] m.c 24 0 0x804842c /home/drepper/gnu/new-bu/build/ttt/m.c:5:0 25 time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 26 1 0x8048432 /home/drepper/gnu/new-bu/build/ttt/m.c:6:0 27 time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 28 2 0x804844d /home/drepper/gnu/new-bu/build/ttt/m.c:7:0 29 time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 30 3 0x8048458 /home/drepper/gnu/new-bu/build/ttt/m.c:8:0 31 time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 32 4 0x804845a /home/drepper/gnu/new-bu/build/ttt/m.c:8:0 33 time: 0, len: 0, idx: 0, b: 1, e: 1, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 34 mod: CU: [ca] b.c 35 0 0x804845c /home/drepper/gnu/new-bu/build/ttt/b.c:4:0 36 time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 37 1 0x804845f /home/drepper/gnu/new-bu/build/ttt/b.c:5:0 38 time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 39 2 0x8048464 /home/drepper/gnu/new-bu/build/ttt/b.c:6:0 40 time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 41 3 0x8048466 /home/drepper/gnu/new-bu/build/ttt/b.c:6:0 42 time: 0, len: 0, idx: 0, b: 1, e: 1, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 43 mod: CU: [15fc] f.c 44 0 0x8048468 /home/drepper/gnu/new-bu/build/ttt/f.c:3:0 45 time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 46 1 0x804846b /home/drepper/gnu/new-bu/build/ttt/f.c:4:0 47 time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 48 2 0x8048470 /home/drepper/gnu/new-bu/build/ttt/f.c:5:0 49 time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 50 3 0x8048472 /home/drepper/gnu/new-bu/build/ttt/f.c:5:0 51 time: 0, len: 0, idx: 0, b: 1, e: 1, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 52 EOF 53 54 testrun_compare ${abs_builddir}/dwfllines -e testfile2 <<\EOF 55 mod: CU: [b] b.c 56 0 0x10000470 /shoggoth/drepper/b.c:4:0 57 time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 58 1 0x1000047c /shoggoth/drepper/b.c:5:0 59 time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 60 2 0x10000480 /shoggoth/drepper/b.c:6:0 61 time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 62 3 0x10000490 /shoggoth/drepper/b.c:6:0 63 time: 0, len: 0, idx: 0, b: 1, e: 1, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 64 mod: CU: [97d] f.c 65 0 0x10000490 /shoggoth/drepper/f.c:3:0 66 time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 67 1 0x1000049c /shoggoth/drepper/f.c:4:0 68 time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 69 2 0x100004a0 /shoggoth/drepper/f.c:5:0 70 time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 71 3 0x100004b0 /shoggoth/drepper/f.c:5:0 72 time: 0, len: 0, idx: 0, b: 1, e: 1, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 73 mod: CU: [9e4] m.c 74 0 0x100004b0 /shoggoth/drepper/m.c:5:0 75 time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 76 1 0x100004cc /shoggoth/drepper/m.c:6:0 77 time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 78 2 0x100004e8 /shoggoth/drepper/m.c:7:0 79 time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 80 3 0x100004f4 /shoggoth/drepper/m.c:8:0 81 time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 82 4 0x10000514 /shoggoth/drepper/m.c:8:0 83 time: 0, len: 0, idx: 0, b: 1, e: 1, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 84 EOF 85 86 testrun_on_self_quiet ${abs_builddir}/dwfllines -e 87 88 exit 0 89