]>
Commit | Line | Data |
---|---|---|
250d07de | 1 | # Copyright (C) 2010-2021 Free Software Foundation, Inc. |
368886ac L |
2 | |
3 | # This program is free software; you can redistribute it and/or modify | |
4 | # it under the terms of the GNU General Public License as published by | |
5 | # the Free Software Foundation; either version 3 of the License, or | |
6 | # (at your option) any later version. | |
5a68afcf | 7 | # |
368886ac L |
8 | # This program is distributed in the hope that it will be useful, |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. | |
5a68afcf | 12 | # |
368886ac L |
13 | # You should have received a copy of the GNU General Public License |
14 | # along with this program; if not, write to the Free Software | |
15 | # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. | |
16 | ||
bbd19b19 | 17 | if {![istarget "x86_64-*-linux*"] || [is_remote host]} { |
368886ac L |
18 | return |
19 | } | |
20 | ||
368886ac L |
21 | set tempfile tmpdir/x86-64temp.o |
22 | set copyfile tmpdir/x86-64copy | |
23 | ||
24 | set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]] | |
25 | foreach t $test_list { | |
26 | # We need to strip the ".d", but can leave the dirname. | |
27 | verbose [file rootname $t] | |
28 | run_dump_test [file rootname $t] | |
29 | } | |
76868f36 L |
30 | |
31 | set t $srcdir/$subdir/pr26808.dwp.bz2 | |
32 | # We need to strip the ".bz2", but can leave the dirname. | |
33 | set test $subdir/[file tail $t] | |
34 | set testname [file rootname $test] | |
35 | verbose $testname | |
36 | if {[catch "system \"bzip2 -dc $t > $tempfile\""] != 0} { | |
37 | untested "bzip2 -dc ($testname)" | |
38 | } else { | |
39 | send_log "$READELF -wi $tempfile > tmpdir/pr26808.out 2> /dev/null\n" | |
40 | verbose "$READELF -wi $tempfile > tmpdir/pr26808.out 2> /dev/null" 1 | |
41 | set got [catch "system \"$READELF -wi $tempfile > tmpdir/pr26808.out 2> /dev/null\""] | |
42 | ||
43 | if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]]} then { | |
44 | fail $testname | |
45 | } else { | |
46 | send_log "cmp tmpdir/pr26808.out $srcdir/$subdir/pr26808.dump\n" | |
47 | verbose "cmp tmpdir/pr26808.out $srcdir/$subdir/pr26808.dump" 1 | |
48 | set status [remote_exec build cmp "tmpdir/pr26808.out $srcdir/$subdir/pr26808.dump"] | |
49 | set exec_output [lindex $status 1] | |
50 | set exec_output [prune_warnings $exec_output] | |
51 | ||
52 | if [string match "" $exec_output] then { | |
53 | pass "readelf -wi ($testname)" | |
54 | } else { | |
55 | send_log "$exec_output\n" | |
56 | verbose "$exec_output" 1 | |
57 | fail "readelf -wi ($testname)" | |
58 | } | |
59 | } | |
60 | } |