aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2007-08-28 13:21:58 +0000
committerJoseph Myers <joseph@codesourcery.com>2007-08-28 13:21:58 +0000
commit7f6a71ffb6ce85438f442a992e2def6eda2e1554 (patch)
treeb0cab57986aed86fe6234c0ad4a205191c031c4b /binutils
parentad71ef64ac2a85db4cdcf06706db646792ba094a (diff)
downloadfsf-binutils-gdb-7f6a71ffb6ce85438f442a992e2def6eda2e1554.zip
fsf-binutils-gdb-7f6a71ffb6ce85438f442a992e2def6eda2e1554.tar.gz
fsf-binutils-gdb-7f6a71ffb6ce85438f442a992e2def6eda2e1554.tar.bz2
bfd:
2007-08-28 Mark Shinwell <shinwell@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * elf32-arm.c (elf32_arm_compare_mapping): Compare first on vma, then on type. binutils/testsuite: 2007-08-28 Mark Shinwell <shinwell@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * binutils-all/ar.exp (long_filenames): Delete temporary files on the host. * binutils-all/arm/objdump.exp: Only check "which $OBJDUMP" if host is local. * binutils-all/objcopy.exp: Use ${srecfile} to get the name of the srec file to be passed to binutils_run. (objcopy_test_readelf): Use remote_exec. * binutils-all/readelf.exp (readelf_find_size): Use remote_exec. (readelf_test): Likewise. (readelf_wi_test): Likewise. * lib/utils-lib.exp (run_dump_test): Only check "which $binary" if host is local. Use remote_exec. Use $tempfile not tmpdir/bintest.o. gas: 2007-08-28 Mark Shinwell <shinwell@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * as.c (main): Flush stderr before printing listings to ensure consistent output order across platforms. gas/testsuite: 2007-08-28 Mark Shinwell <shinwell@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * lib/gas-defs.exp (gas_version): Use remote_* functions instead of exec. (gas_host_run): New. (gas_run): Use gas_host_run. (gas_start): Likewise. (run_dump_test): Likewise. (objdump): Use gas_host_run. (objdump_start_no_subdir): Likewise. * lib/gas-dg.exp (gas-dg-test): Use "remote_file host delete". * lib/run: Remove. * gas/macros/macros.exp: Download app4b.s to host. * gas/i386/i386.exp (gas_64_check): Use gas_host_run. (gas_32_check): Likewise. * gas/maxq10/maxq10.exp (gas_64_check): Likewise (gas_32_check): Likewise. * gas/maxq20/maxq20.exp (gas_64_check): Likewise (gas_32_check): Likewise. * gas/sparc/sparc.exp (gas_64_check): Likewise. * gas/cfi/cfi.exp: Likewise. * gas/elf/elf.exp (run_list_test): Likewise. Use temporary file for readelf output in place of pipe. * gas/all/gas.exp: Download incbin.dat to host. (do_comment): Allow \r\r\n. ld: 2007-08-28 Mark Shinwell <shinwell@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * ldlang.c (sort_sections_by_lma): Sort by internal id after lma for stable sort. ld/testsuite: 2007-08-28 Mark Shinwell <shinwell@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * ld-elfcomm/elfcomm.exp: Use run_host_cmd. Only check "which $CC" if host is local. * ld-checks/checks.exp: Use run_host_cmd. * ld-elf/exclude.exp: Likewise. * ld-elf/elf.exp: Download merge.ld if host is remote. * ld-elf/binutils.exp (binutils_test): Use remote_exec. * ld-elf/tls_common.exp: Use run_host_cmd. * lib/ld-lib.exp (ld_version): Only check "which $ld" if host is local. Use remote_exec. (run_host_cmd): New. (run_host_cmd_yesno): New. (default_ld_relocate): Use run_host_cmd_yesno. (default_ld_link): Likewise. (default_ld_simple_link): Use run_host_cmd. (default_ld_compile): Only check "which $ccprog" if host is local. Use remote_file and remote_exec. (default_ld_assemble): Only check "which $as" if host is local. Use run_host_cmd. (default_ld_nm): Use remote_exec, remote_upload and remote_file. (run_dump_test): Use remote_exec, remote_upload and remote_file. Only check "which $binary" if host is local. (run_ld_link_tests): Use remote_exec, remote_upload and remote_file. * ld-selective/selective.exp: Only check "which $CXX" if host is local. Use remote_exec. * ld-scripts/phdrs.exp: Only check "which $objdump" if host is local. Use run_host_cmd. * ld-scripts/phdrs2.exp: Likewise. * ld-scripts/weak.exp: Likewise. * ld-undefined/weak-undef.exp: Likewise. * ld-scripts/crossref.exp: Only check "which $CC" if host is local. Use run_host_cmd. * ld-scripts/map-address.exp: Upload map_address.map if host is remote. * ld-srec/srec.exp (run_srec_tests): Use run_host_cmd. Only check "which $CC" and "which $CXX" if host is local. * ld-undefined/undefined.exp: Only check "which $CC" if host is local. Use remote_file and run_host_cmd. * config/default.exp: Use remote_exec to create tmpdir.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/testsuite/ChangeLog17
-rw-r--r--binutils/testsuite/binutils-all/ar.exp3
-rw-r--r--binutils/testsuite/binutils-all/arm/objdump.exp2
-rw-r--r--binutils/testsuite/binutils-all/objcopy.exp23
-rw-r--r--binutils/testsuite/binutils-all/readelf.exp16
-rw-r--r--binutils/testsuite/lib/utils-lib.exp15
6 files changed, 55 insertions, 21 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog
index 46ba568..c1fcd3c 100644
--- a/binutils/testsuite/ChangeLog
+++ b/binutils/testsuite/ChangeLog
@@ -1,3 +1,20 @@
+2007-08-28 Mark Shinwell <shinwell@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * binutils-all/ar.exp (long_filenames): Delete temporary files on
+ the host.
+ * binutils-all/arm/objdump.exp: Only check "which $OBJDUMP" if
+ host is local.
+ * binutils-all/objcopy.exp: Use ${srecfile} to get the name of the
+ srec file to be passed to binutils_run.
+ (objcopy_test_readelf): Use remote_exec.
+ * binutils-all/readelf.exp (readelf_find_size): Use remote_exec.
+ (readelf_test): Likewise.
+ (readelf_wi_test): Likewise.
+ * lib/utils-lib.exp (run_dump_test): Only check "which $binary" if
+ host is local. Use remote_exec. Use $tempfile not
+ tmpdir/bintest.o.
+
2007-08-09 Alan Modra <amodra@bigpond.net.au>
* binutils-all/copy-2.d (not-target): Match *-*-*aout.
diff --git a/binutils/testsuite/binutils-all/ar.exp b/binutils/testsuite/binutils-all/ar.exp
index f90fed8..67504c3 100644
--- a/binutils/testsuite/binutils-all/ar.exp
+++ b/binutils/testsuite/binutils-all/ar.exp
@@ -42,6 +42,7 @@ proc long_filenames { } {
set file2 tmpdir/$n2
remote_file build delete $file1
+ remote_file host delete $n1
# Some file systems truncate file names at 14 characters, which
# makes it impossible to run this test. Check for that now.
@@ -54,8 +55,8 @@ proc long_filenames { } {
puts $f "first"
close $f
-
remote_file build delete $file2
+ remote_file host delete $n2
set status [catch "set f [open tmpdir/$n2 w]" errs]
if { $status != 0 } {
diff --git a/binutils/testsuite/binutils-all/arm/objdump.exp b/binutils/testsuite/binutils-all/arm/objdump.exp
index 226363b..8e435eb 100644
--- a/binutils/testsuite/binutils-all/arm/objdump.exp
+++ b/binutils/testsuite/binutils-all/arm/objdump.exp
@@ -19,7 +19,7 @@ if {![istarget "arm*-*-*"]} then {
return
}
-if {[which $OBJDUMP] == 0} then {
+if {![is_remote host] && [which $OBJDUMP] == 0} then {
perror "$OBJDUMP does not exist"
return
}
diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp
index e05e622..8c232d0 100644
--- a/binutils/testsuite/binutils-all/objcopy.exp
+++ b/binutils/testsuite/binutils-all/objcopy.exp
@@ -194,7 +194,7 @@ if ![string match "" $got] then {
verbose $line
fail "objcopy -O srec"
} else {
- set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -f ${copyfile}.srec"]
+ set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -f ${srecfile}"]
if ![regexp "file format srec" $got] then {
send_log "objdump failed\n"
fail "objcopy -O srec"
@@ -722,23 +722,32 @@ proc objcopy_test_readelf {testname srcfile} {
}
verbose -log "$OBJCOPY $OBJCOPYFLAGS tmpdir/bintest.o tmpdir/copy.o"
- catch "exec $OBJCOPY $OBJCOPYFLAGS tmpdir/bintest.o tmpdir/copy.o" exec_output
- if ![string match "" $exec_output] then {
+ set exec_output [remote_exec host "$OBJCOPY $OBJCOPYFLAGS tmpdir/bintest.o tmpdir/copy.o"]
+ if { [lindex $exec_output 0] != 0
+ || ![string match "" [lindex $exec_output 1]] } then {
fail "objcopy ($testname)"
return
}
verbose -log "$READELF -a tmpdir/bintest.o > tmpdir/bintest.o.out"
- catch "exec $READELF -a tmpdir/bintest.o > tmpdir/bintest.o.out" exec_output
- set exec_output [prune_warnings $exec_output]
+ set exec_output [remote_exec host "$READELF -a tmpdir/bintest.o" "" "/dev/null" "tmpdir/bintest.o.out"]
+ if { [lindex $exec_output 0] != 0 } then {
+ unresolved "objcopy ($testname)"
+ return
+ }
+ set exec_output [prune_warnings [lindex $exec_output 1]]
if ![string match "" $exec_output] then {
unresolved "objcopy ($testname)"
return
}
verbose -log "$READELF -a tmpdir/copy.o > tmpdir/copy.o.out"
- catch "exec $READELF -a tmpdir/copy.o > tmpdir/copy.o.out" exec_output
- set exec_output [prune_warnings $exec_output]
+ set exec_output [remote_exec host "$READELF -a tmpdir/copy.o" "" "/dev/null" "tmpdir/copy.o.out"]
+ if { [lindex $exec_output 0] != 0 } then {
+ unresolved "objcopy ($testname)"
+ return
+ }
+ set exec_output [prune_warnings [lindex $exec_output 1]]
if ![string match "" $exec_output] then {
unresolved "objcopy ($testname)"
return
diff --git a/binutils/testsuite/binutils-all/readelf.exp b/binutils/testsuite/binutils-all/readelf.exp
index 2979cfd..d8ba1c0 100644
--- a/binutils/testsuite/binutils-all/readelf.exp
+++ b/binutils/testsuite/binutils-all/readelf.exp
@@ -41,9 +41,12 @@ proc readelf_find_size { binary_file } {
set readelf_size ""
set testname "finding out ELF size with readelf -h"
- catch "exec $READELF $READELFFLAGS -h $binary_file > readelf.out" got
+ set got [remote_exec host "$READELF $READELFFLAGS -h $binary_file" "" "/dev/null" "readelf.out"]
+ if [is_remote host] then {
+ remote_upload host "readelf.out"
+ }
- if ![string match "" $got] then {
+ if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]]} then {
send_log $got
fail $testname
return
@@ -76,13 +79,13 @@ proc readelf_test { options binary_file regexp_file xfails } {
global subdir
send_log "exec $READELF $READELFFLAGS $options $binary_file > readelf.out\n"
- catch "exec $READELF $READELFFLAGS $options $binary_file > readelf.out" got
+ set got [remote_exec host "$READELF $READELFFLAGS $options $binary_file" "" "/dev/null" "readelf.out"]
foreach xfail $xfails {
setup_xfail $xfail
}
- if ![string match "" $got] then {
+ if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then {
fail "readelf $options (reason: unexpected output)"
send_log $got
send_log "\n"
@@ -146,8 +149,7 @@ proc readelf_wi_test {} {
set tempfile [remote_download host tmpdir/testprog.o]
# Run "readelf -wi" on it.
- send_log "exec $READELF $READELFFLAGS -wi $tempfile > readelf.out\n"
- catch "exec $READELF $READELFFLAGS -wi $tempfile > readelf.out" got
+ set got [remote_exec host "$READELF $READELFFLAGS -wi $tempfile" "" "/dev/null" "readelf.out"]
# Upload the results.
set output [remote_upload host readelf.out]
@@ -155,7 +157,7 @@ proc readelf_wi_test {} {
file_on_host delete $tempfile
# Strip any superflous warnings.
- set got [prune_readelf_wi_warnings $got]
+ set got [prune_readelf_wi_warnings [lindex $got 1]]
if ![string match "" $got] then {
fail "readelf $READELFFLAGS -wi (reason: unexpected output)"
diff --git a/binutils/testsuite/lib/utils-lib.exp b/binutils/testsuite/lib/utils-lib.exp
index 77af172..8ed9330 100644
--- a/binutils/testsuite/lib/utils-lib.exp
+++ b/binutils/testsuite/lib/utils-lib.exp
@@ -462,7 +462,7 @@ proc run_dump_test { name {extra_options {}} } {
set srcfile $srcdir/$subdir/$opts(source)
}
- set exec_output [binutils_assemble ${srcfile} tmpdir/bintest.o]
+ set exec_output [binutils_assemble ${srcfile} $tempfile]
if [string match "" $exec_output] then {
send_log "$exec_output\n"
verbose "$exec_output"
@@ -486,14 +486,14 @@ proc run_dump_test { name {extra_options {}} } {
eval set progopts \$[string toupper $dumpprogram]FLAGS
eval set binary \$[string toupper $dumpprogram]
- if { [which $binary] == 0 } {
+ if { ![is_remote host] && [which $binary] == 0 } {
untested $testname
return
}
verbose "running $binary $progopts $progopts1" 3
- set cmd "$binary $progopts $progopts1 ${copyfile}.o > tmpdir/dump.out"
+ set cmd "$binary $progopts $progopts1 ${copyfile}.o"
# Ensure consistent sorting of symbols
if {[info exists env(LC_ALL)]} {
@@ -501,13 +501,18 @@ proc run_dump_test { name {extra_options {}} } {
}
set env(LC_ALL) "C"
send_log "$cmd\n"
- catch "exec $cmd" comp_output
+ set comp_output [remote_exec host $cmd "" "/dev/null" "tmpdir/dump.out"]
if {[info exists old_lc_all]} {
set env(LC_ALL) $old_lc_all
} else {
unset env(LC_ALL)
}
- set comp_output [prune_warnings $comp_output]
+ if { [lindex $comp_output 0] != 0 } then {
+ send_log "$comp_output\n"
+ fail $testname
+ return
+ }
+ set comp_output [prune_warnings [lindex $comp_output 1]]
if ![string match "" $comp_output] then {
send_log "$comp_output\n"
fail $testname