aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1994-12-08 01:48:25 +0000
committerKen Raeburn <raeburn@cygnus>1994-12-08 01:48:25 +0000
commit09a1cedb20acfe688efc33c24a0a0f5e1a763ea1 (patch)
tree833ec47704bbec31fd2c41b8e2e14e383255d852 /gas/testsuite
parentd2ccfce3d2bb5bfe2b53c513cef9775b75dad389 (diff)
downloadgdb-09a1cedb20acfe688efc33c24a0a0f5e1a763ea1.zip
gdb-09a1cedb20acfe688efc33c24a0a0f5e1a763ea1.tar.gz
gdb-09a1cedb20acfe688efc33c24a0a0f5e1a763ea1.tar.bz2
boost timeout to at least 2min; fix a couple mips tests for 64-bit host disasm
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/gas/mips/jal.d24
-rw-r--r--gas/testsuite/lib/gas-defs.exp30
3 files changed, 51 insertions, 8 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index b138609..58f05d9 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,7 +1,12 @@
Wed Dec 7 16:49:14 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+ * gas/mips/mul.d,jal.d: Fix 0-strings to work with 64-bit hosted
+ disassembly.
+
* gas/ieee-fp: Renamed from ieee.fp.
+ * lib/gas-defs.exp: Make sure timeout is at least 2 minutes.
+
Wed Nov 30 10:48:00 1994 Jeff Law (law@snake.cs.utah.edu)
* gas/hppa/parse: Renamed from gas/hppa/more.parse.
diff --git a/gas/testsuite/gas/mips/jal.d b/gas/testsuite/gas/mips/jal.d
new file mode 100644
index 0000000..f6250db
--- /dev/null
+++ b/gas/testsuite/gas/mips/jal.d
@@ -0,0 +1,24 @@
+#objdump: -dr
+#name: jal
+
+# Test the jal macro.
+
+.*: +file format .*mips.*
+
+Disassembly of section .text:
+0+0000 <[^>]*> jalr \$t9
+...
+0+0008 <[^>]*> jalr \$a0,\$t9
+...
+0+0010 <[^>]*> jal 0+ <text_label>
+[ ]*RELOC: 0+0010 (JMPADDR|R_MIPS_26) .text
+...
+0+0018 <[^>]*> jal 0+ <text_label>
+[ ]*RELOC: 0+0018 (JMPADDR|R_MIPS_26) external_text_label
+...
+0+0020 <[^>]*> j 0+ <text_label>
+[ ]*RELOC: 0+0020 (JMPADDR|R_MIPS_26) .text
+...
+0+0028 <[^>]*> j 0+ <text_label>
+[ ]*RELOC: 0+0028 (JMPADDR|R_MIPS_26) external_text_label
+...
diff --git a/gas/testsuite/lib/gas-defs.exp b/gas/testsuite/lib/gas-defs.exp
index 773158e..6fb4d78 100644
--- a/gas/testsuite/lib/gas-defs.exp
+++ b/gas/testsuite/lib/gas-defs.exp
@@ -109,7 +109,7 @@ proc gas_test { file as_opts var_opts testname } {
if [expr $i&$num] then {
set extra_opts "$extra_opts $opt($bit)"
if $ignore_stdout($bit) then {
- set maybe_ignore_stdout "1>/dev/null"
+ set maybe_ignore_stdout ">/dev/null"
}
}
}
@@ -131,14 +131,14 @@ proc gas_test { file as_opts var_opts testname } {
proc gas_test_ignore_stdout { file as_opts testname } {
global comp_output
- gas_run $file $as_opts "2>&1 1>/dev/null"
+ gas_run $file $as_opts ">/dev/null"
want_no_output $testname
}
proc gas_test_error { file as_opts testname } {
global comp_output
- gas_run $file $as_opts "2>&1 1>/dev/null"
+ gas_run $file $as_opts ">/dev/null"
if ![string match "" $comp_output] then {
send_log "$comp_output\n"
verbose "$comp_output" 3
@@ -198,6 +198,7 @@ proc run_dump_test { name } {
set opts(nm) {}
set opts(name) {}
set opts(PROG) {}
+ set opts(source) {}
foreach i $opt_array {
set opt_name [lindex $i 0]
@@ -236,7 +237,13 @@ proc run_dump_test { name } {
eval set program \$[string toupper $program]
if { $opts(name) == "" } { set testname "$subdir/$name" } else { set testname $opts(name) }
- catch "exec $srcdir/lib/run $AS $ASFLAGS $opts(as) ${file}.s" comp_output
+ if { $opts(source) == "" } {
+ set sourcefile ${file}.s
+ } else {
+ set sourcefile $srcdir/$subdir/$opts(source)
+ }
+
+ catch "exec $srcdir/lib/run $AS $ASFLAGS $opts(as) $sourcefile" comp_output
if ![string match "" $comp_output] then {
send_log "$comp_output\n"
@@ -245,8 +252,9 @@ proc run_dump_test { name } {
return
}
- if [catch "exec $program -r > dump.out" comp_output] {
- fail_phase $testname {running objdump} {-r}
+ if { $progopts1 == "" } { set $progopts1 "-r" }
+ if [catch "exec $program $progopts $progopts1 > dump.out" comp_output] {
+ fail_phase $testname {running objdump} "$progopts $progopts1"
return
}
@@ -268,7 +276,7 @@ proc slurp_options { file } {
set nws {[^ ]*}
# whitespace is ignored anywhere except within the options list;
# option names are alphabetic only
- set pat "^#${ws}(\[a-zA-Z\]*)$ws:${ws}($nws)$ws\$"
+ set pat "^#${ws}(\[a-zA-Z\]*)$ws:${ws}(.*)$ws\$"
while { [gets $f line] != -1 } {
set line [string trim $line]
# Whitespace here is space-tab.
@@ -312,6 +320,10 @@ proc objdump_finish { } {
catch "wait"
}
+# Default timeout is 10 seconds, loses on a slow machine. But some
+# configurations of dejagnu may override it.
+if {$timeout<120} then { set timeout 120 }
+
expect_after {
timeout { perror "timeout" }
"virtual memory exhausted" { perror "virtual memory exhausted" }
@@ -366,12 +378,14 @@ proc regexp_diff { file_1 file_2 } {
if { $end } { break }
verbose "regexp \"^$line_b$\"\nline \"$line_a\"" 3
if ![regexp "^$line_b$" "$line_a"] {
- verbose "no match" 3
+ send_log "regexp_diff match failure\n"
+ send_log "regexp \"^$line_b$\"\nline \"$line_a\"\n"
set differences 1
}
}
if { $differences == 0 && [eof $file_a] != [eof $file_b] } {
+ send_log "different lengths\n"
verbose "different lengths" 3
set differences 1
}