diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-12-26 11:24:55 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-12-26 11:24:55 +0000 |
commit | e809353af1682550b6f19bdd0fe4a3628d7380cd (patch) | |
tree | af0755ff6ecf0c6672f79c7d178d388ee56d4d18 /gdb/testsuite/gdb.base | |
parent | 15daccb2f784ba59e7e220e2700df78bd987bb41 (diff) | |
download | gdb-e809353af1682550b6f19bdd0fe4a3628d7380cd.zip gdb-e809353af1682550b6f19bdd0fe4a3628d7380cd.tar.gz gdb-e809353af1682550b6f19bdd0fe4a3628d7380cd.tar.bz2 |
gdb/testsuite/
Fix double send_gdb leading to racy FAILs.
* gdb.base/break.exp (set silent break bp_location1): Replace
3x send_gdb and gdb_expect by gdb_test.
* gdb.base/fileio.exp: Replace 2x send_gdb by gdb_exit and sleep.
* gdb.base/foll-vfork.exp (vfork_and_exec_child_follow_to_main_bp)
(vfork_and_exec_child_follow_through_step): Use gdb_test_no_output
instead of send_gdb. Twice.
* gdb.base/sepdebug.exp (set silent break bp_location1): Replace
3x send_gdb and gdb_expect by gdb_test.
* gdb.mi/mi-nsmoribund.exp: Replace 3x send_gdb by mi_gdb_test.
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r-- | gdb/testsuite/gdb.base/break.exp | 9 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/fileio.exp | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/foll-vfork.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/sepdebug.exp | 9 |
4 files changed, 7 insertions, 20 deletions
diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp index 6d6f310..2292373 100644 --- a/gdb/testsuite/gdb.base/break.exp +++ b/gdb/testsuite/gdb.base/break.exp @@ -576,14 +576,7 @@ gdb_test_multiple "break $bp_location1" \ } } -send_gdb "commands $expect_out(1,string)\n" -send_gdb "silent\n" -send_gdb "end\n" -gdb_expect { - -re ".*$gdb_prompt $"\ - {pass "set silent break bp_location1"} - timeout {fail "(timeout) set silent break bp_location1"} -} +gdb_test "commands $expect_out(1,string)\nsilent\nend" ">end" "set silent break bp_location1" gdb_test "info break $expect_out(1,string)" \ "\[0-9\]*\[ \t\]*breakpoint.*:$bp_location1\r\n\[ \t\]*silent.*" \ diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.exp index a145e2b..101da15 100644 --- a/gdb/testsuite/gdb.base/fileio.exp +++ b/gdb/testsuite/gdb.base/fileio.exp @@ -247,8 +247,9 @@ gdb_test continue \ "Continuing\\..*time 2:.*OK$stop_msg" \ "Time(2) returns feasible values" -send_gdb "quit\n" -send_gdb "y\n" +gdb_exit +# Wait till GDB really exits. +sleep 1 remote_exec build {sh -xc test\ -r\ dir2.fileio.test\ &&\ chmod\ -f\ +w\ dir2.fileio.test} remote_exec build {sh -xc rm\ -rf\ *.fileio.test} diff --git a/gdb/testsuite/gdb.base/foll-vfork.exp b/gdb/testsuite/gdb.base/foll-vfork.exp index f8a3eeb..1982f9e 100644 --- a/gdb/testsuite/gdb.base/foll-vfork.exp +++ b/gdb/testsuite/gdb.base/foll-vfork.exp @@ -166,7 +166,7 @@ proc vfork_and_exec_child_follow_to_main_bp {} { send_gdb "kill\n" gdb_expect { -re ".*Kill the program being debugged.*y or n. $" { - send_gdb "y\n" + gdb_test_no_output "y" "" send_gdb "file $binfile\n" gdb_expect { -re ".*Load new symbol table from.*y or n. $" { @@ -224,7 +224,7 @@ proc vfork_and_exec_child_follow_through_step {} { send_gdb "kill\n" gdb_expect { -re ".*Kill the program being debugged.*y or n. $" { - send_gdb "y\n" + gdb_test_no_output "y" "" send_gdb "file $binfile\n" gdb_expect { -re ".*Load new symbol table from.*y or n. $" { diff --git a/gdb/testsuite/gdb.base/sepdebug.exp b/gdb/testsuite/gdb.base/sepdebug.exp index 90fe4ec..57ce305 100644 --- a/gdb/testsuite/gdb.base/sepdebug.exp +++ b/gdb/testsuite/gdb.base/sepdebug.exp @@ -370,14 +370,7 @@ gdb_test_multiple "break $bp_location1" \ } } -send_gdb "commands $expect_out(1,string)\n" -send_gdb "silent\n" -send_gdb "end\n" -gdb_expect { - -re ".*$gdb_prompt $"\ - {pass "set silent break bp_location1"} - timeout {fail "(timeout) set silent break bp_location1"} -} +gdb_test "commands $expect_out(1,string)\nsilent\nend" ">end" "set silent break bp_location1" gdb_test "info break $expect_out(1,string)" \ "\[0-9\]*\[ \t\]*breakpoint.*:$bp_location1\r\n\[ \t\]*silent.*" \ |