]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - binutils/testsuite/binutils-all/x86-64/x86-64.exp
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / binutils / testsuite / binutils-all / x86-64 / x86-64.exp
index 612f8cb6576059eee7a26941790e40cfb6e2da62..90fcc84c4f5c356be30178e12a8ab28f8d35f4aa 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright (C) 2010-2019 Free Software Foundation, Inc.
+#   Copyright (C) 2010-2021 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
 
-if {!([istarget "x86_64-*-linux*"]
-      || [istarget "x86_64-*-nacl*"])
-    || [is_remote host]} {
+if {![istarget "x86_64-*-linux*"] || [is_remote host]} {
     return
 }
 
-global tempfile
-global copyfile
 set tempfile tmpdir/x86-64temp.o
 set copyfile tmpdir/x86-64copy
 
@@ -31,3 +27,34 @@ foreach t $test_list {
     verbose [file rootname $t]
     run_dump_test [file rootname $t]
 }
+
+set t $srcdir/$subdir/pr26808.dwp.bz2
+# We need to strip the ".bz2", but can leave the dirname.
+set test $subdir/[file tail $t]
+set testname [file rootname $test]
+verbose $testname
+if {[catch "system \"bzip2 -dc $t > $tempfile\""] != 0} {
+  untested "bzip2 -dc ($testname)"
+} else {
+    send_log "$READELF -wi $tempfile > tmpdir/pr26808.out 2> /dev/null\n"
+    verbose "$READELF -wi $tempfile > tmpdir/pr26808.out 2> /dev/null" 1
+    set got [catch "system \"$READELF -wi $tempfile > tmpdir/pr26808.out 2> /dev/null\""]
+
+    if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]]} then {
+       fail $testname
+    } else {
+       send_log "cmp tmpdir/pr26808.out $srcdir/$subdir/pr26808.dump\n"
+       verbose "cmp tmpdir/pr26808.out $srcdir/$subdir/pr26808.dump" 1
+       set status [remote_exec build cmp "tmpdir/pr26808.out $srcdir/$subdir/pr26808.dump"]
+       set exec_output [lindex $status 1]
+       set exec_output [prune_warnings $exec_output]
+
+       if [string match "" $exec_output] then {
+           pass "readelf -wi ($testname)"
+       } else {
+           send_log "$exec_output\n"
+           verbose "$exec_output" 1
+           fail "readelf -wi ($testname)"
+       }
+    }
+}