diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-03-22 21:11:45 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-03-22 21:11:45 +0000 |
commit | bcd5727bdddbf3063b7a8714708a95863d811a9d (patch) | |
tree | 1bb167b69f36b8c153349b3b8664f1d53d08c666 /gdb/testsuite | |
parent | f3b1572e1aedb92f0d7672c384de4bbc70b59757 (diff) | |
download | gdb-bcd5727bdddbf3063b7a8714708a95863d811a9d.zip gdb-bcd5727bdddbf3063b7a8714708a95863d811a9d.tar.gz gdb-bcd5727bdddbf3063b7a8714708a95863d811a9d.tar.bz2 |
Fix a racy FAIL.
* gdb.base/auxv.exp (fetch_auxv): Fix trailing newlines consumption.
* gdb.base/callfuncs.exp (fetch_all_registers): Likewise.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/auxv.exp | 12 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/callfuncs.exp | 12 |
3 files changed, 20 insertions, 10 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 3de72c4..38837b0 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2009-03-22 Jan Kratochvil <jan.kratochvil@redhat.com> + + Fix a racy FAIL. + * gdb.base/auxv.exp (fetch_auxv): Fix trailing newlines consumption. + * gdb.base/callfuncs.exp (fetch_all_registers): Likewise. + 2009-03-21 Thiago Jung Bauermann <bauerman@br.ibm.com> * gdb.python/python-cmd.exp: Add tests for keyword arguments. diff --git a/gdb/testsuite/gdb.base/auxv.exp b/gdb/testsuite/gdb.base/auxv.exp index b288599..3a55265 100644 --- a/gdb/testsuite/gdb.base/auxv.exp +++ b/gdb/testsuite/gdb.base/auxv.exp @@ -78,8 +78,10 @@ proc fetch_auxv {test} { set auxv_lines {} set bad -1 + # Former trailing `\[\r\n\]+' may eat just \r leaving \n in the buffer + # corrupting the next matches. if {[gdb_test_multiple "info auxv" $test { - -re "info auxv\[\r\n\]+" { + -re "info auxv\r\n" { exp_continue } -ex "The program has no auxiliary information now" { @@ -94,20 +96,20 @@ proc fetch_auxv {test} { set bad 1 exp_continue } - -re "^\[0-9\]+\[ \t\]+(AT_\[^ \t\]+)\[^\r\n\]+\[\r\n\]+" { + -re "^\[0-9\]+\[ \t\]+(AT_\[^ \t\]+)\[^\r\n\]+\r\n" { lappend auxv_lines $expect_out(0,string) exp_continue } - -re "^\[0-9\]+\[ \t\]+\\?\\?\\?\[^\r\n\]+\[\r\n\]+" { + -re "^\[0-9\]+\[ \t\]+\\?\\?\\?\[^\r\n\]+\r\n" { warning "Unrecognized tag value: $expect_out(0,string)" set bad 1 lappend auxv_lines $expect_out(0,string) exp_continue } - -re ".*$gdb_prompt $" { + -re "$gdb_prompt $" { incr bad } - -re "^\[^\r\n\]+\[\r\n\]+" { + -re "^\[^\r\n\]+\r\n" { if {!$bad} { warning "Unrecognized output: $expect_out(0,string)" set bad 1 diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp index be6a872..b17b0ba 100644 --- a/gdb/testsuite/gdb.base/callfuncs.exp +++ b/gdb/testsuite/gdb.base/callfuncs.exp @@ -249,15 +249,17 @@ proc fetch_all_registers {test} { set all_registers_lines {} set bad -1 + # Former trailing `\[\r\n\]+' may eat just \r leaving \n in the buffer + # corrupting the next matches. if {[gdb_test_multiple "info all-registers" $test { - -re "info all-registers\[\r\n\]+" { + -re "info all-registers\r\n" { exp_continue } -ex "The program has no registers now" { set bad 1 exp_continue } - -re "^bspstore\[ \t\]+\[^\r\n\]+\[\r\n\]+" { + -re "^bspstore\[ \t\]+\[^\r\n\]+\r\n" { if [istarget "ia64-*-*"] { # Filter out bspstore which is specially tied to bsp, # giving spurious differences. @@ -266,14 +268,14 @@ proc fetch_all_registers {test} { } exp_continue } - -re "^\[^ \t\]+\[ \t\]+\[^\r\n\]+\[\r\n\]+" { + -re "^\[^ \t\]+\[ \t\]+\[^\r\n\]+\r\n" { lappend all_registers_lines $expect_out(0,string) exp_continue } - -re ".*$gdb_prompt $" { + -re "$gdb_prompt $" { incr bad } - -re "^\[^\r\n\]+\[\r\n\]+" { + -re "^\[^\r\n\]+\r\n" { if {!$bad} { warning "Unrecognized output: $expect_out(0,string)" set bad 1 |