From: Fred Fish Date: Tue, 1 Oct 1996 03:29:45 +0000 (+0000) Subject: * gdb.base/interrupt.exp: Add i*86-*-linux* setup_xfail for X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f646eef47b3e027da0765c2588fd1afd3df7cd46;p=binutils-gdb.git * gdb.base/interrupt.exp: Add i*86-*-linux* setup_xfail for "p func1 ()" and note that rests of tests are skipped. * gdb.base/corefile.exp: Add i*86-*-linux* and m68*-*-hpux* setup_xfails for "print func2::coremaker_local". Add i*86-*-linux* setup_xfail for "backtrace in corefile.exp". * gdb.base/mips_pro.exp: Restart gdb in this test so it isn't affected by the previous run test. * gdb.chill/misc.exp: Add m68*-*-hpux* setup_xfails for "print array () ubyte (foo)" and "print/x array () byte (\$i)" * gdb.chill/pr-8742.exp: Add m68*-*-hpux* setup_xfails for "pass int powerset tuple" and "pass modeless int powerset tuple". * gdb.chill/tests2.exp: Add m68*-*-hpux* setup xfails for "real write 4" and "real write 8". * gdb.shill/tuples.exp: Add i*86-*-linux* and m68*-*-hpux* setup_xfails for "print vs1 after tuple assign 2", "print \$i after tuple assign 2", and "print vs2 after tuple assign 2". * lib/gdb.exp (gdb_test): When a gdb aborts, print a more meaningful error message and return -1 so the caller can suppress further tests and avoid a cascade of errors. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index d956cc75b05..6ce744f40bf 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,40 @@ +Mon Sep 30 20:16:22 1996 Fred Fish + + * gdb.base/interrupt.exp: Add i*86-*-linux* setup_xfail for + "p func1 ()" and note that rests of tests are skipped. + * gdb.base/corefile.exp: Add i*86-*-linux* and m68*-*-hpux* + setup_xfails for "print func2::coremaker_local". + Add i*86-*-linux* setup_xfail for "backtrace in corefile.exp". + * gdb.base/mips_pro.exp: Restart gdb in this test so it isn't + affected by the previous run test. + * gdb.chill/misc.exp: Add m68*-*-hpux* setup_xfails for + "print array () ubyte (foo)" and "print/x array () byte (\$i)" + * gdb.chill/pr-8742.exp: Add m68*-*-hpux* setup_xfails for + "pass int powerset tuple" and "pass modeless int powerset tuple". + * gdb.chill/tests2.exp: Add m68*-*-hpux* setup xfails for + "real write 4" and "real write 8". + * gdb.shill/tuples.exp: Add i*86-*-linux* and m68*-*-hpux* + setup_xfails for "print vs1 after tuple assign 2", + "print \$i after tuple assign 2", and + "print vs2 after tuple assign 2". + * lib/gdb.exp (gdb_test): When a gdb aborts, print a more + meaningful error message and return -1 so the caller can + suppress further tests and avoid a cascade of errors. + +Fri Sep 27 10:34:51 1996 Fred Fish + + * gdb.base/a1-selftest.exp: Tweak tests to account for new + format for printing version. + * gdb.base/default.exp: Ditto. + * gdb.base/interrupt.exp: Fix problem with cascade of + errors if child process dies while calling a function. + +Fri Sep 13 21:43:48 1996 Fred Fish + + * Makefile.in (VPATH): Add + * Makefile.in (Makefile, config.status): Fix rules so things get + remade when necessary. + Fri Sep 13 18:16:10 1996 Fred Fish * Makefile.in (just-check): Add path to sibling expect dir diff --git a/gdb/testsuite/gdb.base/mips_pro.exp b/gdb/testsuite/gdb.base/mips_pro.exp new file mode 100644 index 00000000000..55e074461e0 --- /dev/null +++ b/gdb/testsuite/gdb.base/mips_pro.exp @@ -0,0 +1,48 @@ +if $tracelevel then { + strace $tracelevel +} + +set prms_id 0 +set bug_id 0 + +set testfile mips_pro +set srcfile ${srcdir}/$subdir/${testfile}.c +set binfile ${objdir}/${subdir}/${testfile} + +# Create and source the file that provides information about the compiler +# used to compile the test case. +execute_anywhere "rm -f ${binfile}.ci" +if { [compile "-E ${srcdir}/${subdir}/compiler.c >> ${binfile}.ci"] != "" } { + perror "Couldn't make ${binfile}.ci" + return -1 +} +source ${binfile}.ci + +gdb_exit +gdb_start +gdb_reinitialize_dir $srcdir/$subdir +gdb_load ${binfile} + +# This test must be compiled with -O2 if using gcc. + +if {$gcc_compiled} then { + if { [compile "${srcfile} -O2 -g -o ${binfile}"] != "" } { + perror "Couldn't compile ${srcfile} with -O2" + return -1 + } +} else { + if { [compile "${srcfile} -g -o ${binfile}"] != "" } { + perror "Couldn't compile ${srcfile}" + return -1 + } +} + +gdb_reinitialize_dir $srcdir/$subdir +gdb_load $binfile + +if [runto middle] then { + # PR 3016 + if {$gcc_compiled} then { setup_xfail "hppa*-*-*" } + gdb_test "backtrace" "#0.*middle.*#1.*top.*#2.*main.*" +} +return 0 diff --git a/gdb/testsuite/gdb.chill/misc.exp b/gdb/testsuite/gdb.chill/misc.exp index da59bb20ed8..fd4c1b7a36e 100644 --- a/gdb/testsuite/gdb.chill/misc.exp +++ b/gdb/testsuite/gdb.chill/misc.exp @@ -90,9 +90,11 @@ if ![set_lang_chill] then { "info about current line" # check array () type (expr) + setup_xfail "m68*-*-hpux*" gdb_test "print array () ubyte (foo)" { = \[\(0:11\): 0\]} send "set var \$i := foo\n" expect -re ".*$prompt $" + setup_xfail "m68*-*-hpux*" gdb_test "print/x array () byte (\$i)" { = \[\(0:11\): H'0\]} } diff --git a/gdb/testsuite/gdb.chill/pr-8742.exp b/gdb/testsuite/gdb.chill/pr-8742.exp index f9166b4ab82..7b868e785d9 100644 --- a/gdb/testsuite/gdb.chill/pr-8742.exp +++ b/gdb/testsuite/gdb.chill/pr-8742.exp @@ -50,8 +50,10 @@ proc do_tests {} { runto dummy + setup_xfail "m68*-*-hpux*" gdb_test {call x(p [1, 3, 5])} "1 3 5 " "pass int powerset tuple" gdb_test {call y(s_ps [sc])} "sc " "pass set powerset tuple" + setup_xfail "m68*-*-hpux*" gdb_test {call x([1, 3, 5])} "1 3 5 " "pass modeless int powerset tuple" gdb_test {call y([sc])} "sc " "pass modeless set powerset tuple" } diff --git a/gdb/testsuite/gdb.chill/tests2.exp b/gdb/testsuite/gdb.chill/tests2.exp index 719572f6870..566966360ab 100644 --- a/gdb/testsuite/gdb.chill/tests2.exp +++ b/gdb/testsuite/gdb.chill/tests2.exp @@ -211,12 +211,12 @@ proc write_access { } { test_write re1 0 "real write 2" test_write re1 "1e+38" {1e\+38|1\.0[0-9]*e\+38|9\.9[0-9]*e\+37} \ "real write 3" - setup_xfail "i*86-*-linux" + setup_xfail "i*86-*-linux" "m68*-*-hpux*" test_write re1 "1e+39" $infinity "real write 4" test_write re2 42.03 {42.0[0-9]*} "real write 5" test_write re2 0 "real write 6" test_write re2 "1e+308" {1e\+308} "real write 7" - setup_xfail "i*86-*-linux" + setup_xfail "i*86-*-linux" "m68*-*-hpux*" test_write re2 "1e+309" $infinity "real write 8" # array modes test_write arrl1 {[(1:3): [(1:2): -128]]} {\[\(1:3\): \[\(1:2\): -128\]\]}\ diff --git a/gdb/testsuite/gdb.chill/tuples.exp b/gdb/testsuite/gdb.chill/tuples.exp index 284dbef82ed..2c9259614c5 100644 --- a/gdb/testsuite/gdb.chill/tuples.exp +++ b/gdb/testsuite/gdb.chill/tuples.exp @@ -130,6 +130,7 @@ proc do_tests {} { "print vs1 after tuple assign 1" send "set var vs1 := \[ \"bar\", 42, m_ps\[ a \] \]\n" expect -re "$prompt $" + setup_xfail "i*86-*-linux*" "m68*-*-hpux*" gdb_test_exact "print vs1" { = [.str: "bar", .i: 42, .ps: [a]]} \ "print vs1 after tuple assign 2" @@ -139,6 +140,7 @@ proc do_tests {} { "print \$i after tuple assign 1" send "set var \$i := m_s1\[\"foo\", 44, m_ps\[a \]\]\n" expect -re "$prompt $" + setup_xfail "i*86-*-linux*" "m68*-*-hpux*" gdb_test_exact {print $i} { = [.str: "foo", .i: 44, .ps: [a]]} \ "print \$i after tuple assign 2" @@ -149,9 +151,10 @@ proc do_tests {} { "print vs2 after tuple assign 1" send "set var vs2 := \[ 10+3, m_s1\[ \"foo\" , 42, m_ps\[ b \] \] \]\n" expect -re "$prompt $" + setup_xfail "i*86-*-linux*" "m68*-*-hpux*" gdb_test_exact "print vs2" \ { = [.i: 13, .s: [.str: "foo", .i: 42, .ps: [b]]]} \ - "print vs2 after tuple assign 1" + "print vs2 after tuple assign 2" send "set var vs3 := \[ 33, \[ -1, -2, -3 \] \]\n" ; expect -re "$prompt $" gdb_test_exact "print vs3" {[.i: 33, .a: [(1): -1, (2): -2, (3): -3]]} \ diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index ea411c4a81a..ec3b94e962d 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -275,8 +275,7 @@ proc runto_main {} { global usestubs if $usestubs==0 { - runto main - return 1 + return [runto main] } send "delete\n" @@ -320,6 +319,7 @@ proc gdb_test { args } { global prompt global GDB global spawn_id + global expect_out upvar timeout timeout if [llength $args]==3 then { @@ -364,6 +364,24 @@ proc gdb_test { args } { perror "\"$command\" is not a unique command name." set result 1 } + -re "(.*)(Program exited with code \[0-9\]+)(.*$prompt $)" { + if ![string match "" $message] then { + set errmsg "$message: $expect_out(2,string)" + } else { + set errmsg "$command: $expect_out(2,string)" + } + perror "$errmsg" + return -1 + } + -re "The program is not being run.*$prompt $" { + if ![string match "" $message] then { + set errmsg "$message: the program is no longer running" + } else { + set errmsg "$command: the program is no longer running" + } + perror "$errmsg" + return -1 + } -re ".*$prompt $" { if ![string match "" $message] then { fail "$message" @@ -382,7 +400,7 @@ proc gdb_test { args } { perror "Process no longer exists" return -1 } - buffer_full { + full_buffer { perror "internal buffer is full." } timeout {