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
20testfiles testfile testfile2
21
22testrun_compare ${abs_builddir}/dwfllines -e testfile <<\EOF
23mod:  CU: [b] m.c
240 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
261 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
282 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
303 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
324 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
34mod:  CU: [ca] b.c
350 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
371 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
392 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
413 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
43mod:  CU: [15fc] f.c
440 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
461 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
482 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
503 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
52EOF
53
54testrun_compare ${abs_builddir}/dwfllines -e testfile2 <<\EOF
55mod:  CU: [b] b.c
560 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
581 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
602 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
623 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
64mod:  CU: [97d] f.c
650 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
671 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
692 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
713 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
73mod:  CU: [9e4] m.c
740 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
761 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
782 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
803 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
824 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
84EOF
85
86testrun_on_self_quiet ${abs_builddir}/dwfllines -e
87
88exit 0
89