aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2013-05-24 09:57:12 +0000
committerYao Qi <yao@codesourcery.com>2013-05-24 09:57:12 +0000
commitdb1ac43683fc23c0e1a1b2bd5715114dde0380a0 (patch)
tree2a766074c3c3048340f2c57b1eb2ddaa8fe70b84
parent5901af59c9833aceaa74afec960ef3769326df05 (diff)
downloadgdb-db1ac43683fc23c0e1a1b2bd5715114dde0380a0.zip
gdb-db1ac43683fc23c0e1a1b2bd5715114dde0380a0.tar.gz
gdb-db1ac43683fc23c0e1a1b2bd5715114dde0380a0.tar.bz2
gdb/testsuite/
* gdb.base/range-stepping.exp: Skip the rest of tests if the test fails. * lib/range-stepping-support.exp (exec_cmd_expect_vCont_count): Return 0 if the test passes, otherwise return 1.
-rw-r--r--gdb/testsuite/ChangeLog8
-rw-r--r--gdb/testsuite/gdb.base/range-stepping.exp10
-rw-r--r--gdb/testsuite/lib/range-stepping-support.exp6
3 files changed, 22 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 882054b..eb7c7a0 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2013-05-24 Yao Qi <yao@codesourcery.com>
+ Pedro Alves <palves@redhat.com>
+
+ * gdb.base/range-stepping.exp: Skip the rest of tests if the
+ test fails.
+ * lib/range-stepping-support.exp (exec_cmd_expect_vCont_count):
+ Return 0 if the test passes, otherwise return 1.
+
2013-05-23 Doug Evans <dje@google.com>
* boards/fission-dwp.exp: New file.
diff --git a/gdb/testsuite/gdb.base/range-stepping.exp b/gdb/testsuite/gdb.base/range-stepping.exp
index 48fc15b..d17596c 100644
--- a/gdb/testsuite/gdb.base/range-stepping.exp
+++ b/gdb/testsuite/gdb.base/range-stepping.exp
@@ -76,7 +76,15 @@ with_test_prefix "multi insns" {
# <-- T05
# --> vCont;rSTART,END (range step)
# <-- T05
- exec_cmd_expect_vCont_count "next" 1 1
+ set result [exec_cmd_expect_vCont_count "next" 1 1]
+ if { $result } {
+ # This is the first range-stepping test, and the simplest
+ # one. If it fails, probably the rest of the tests would
+ # fail too, and the huge number of rsp packets in the test
+ # with the time-consuming loop would blow up the gdb.log file.
+ # Skip the rest of the tests.
+ return
+ }
set pc_after_stepping ""
set msg "pc after stepping"
diff --git a/gdb/testsuite/lib/range-stepping-support.exp b/gdb/testsuite/lib/range-stepping-support.exp
index d849665..ab38b11 100644
--- a/gdb/testsuite/lib/range-stepping-support.exp
+++ b/gdb/testsuite/lib/range-stepping-support.exp
@@ -14,7 +14,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Execute command CMD and check that GDB sends the expected number of
-# vCont;s and vCont;r packets.
+# vCont;s and vCont;r packets. Returns 0 if the test passes,
+# otherwise returns 1.
proc exec_cmd_expect_vCont_count { cmd exp_vCont_s exp_vCont_r } {
global gdb_prompt
@@ -24,6 +25,7 @@ proc exec_cmd_expect_vCont_count { cmd exp_vCont_s exp_vCont_r } {
set test "${cmd}: vCont;s=${exp_vCont_s} vCont;r=${exp_vCont_r}"
set r_counter 0
set s_counter 0
+ set ret 1
gdb_test_multiple $cmd $test {
-re "vCont;s\[^\r\n\]*Packet received: T\[\[:xdigit:\]\]\[\[:xdigit:\]\]" {
incr s_counter
@@ -40,6 +42,7 @@ proc exec_cmd_expect_vCont_count { cmd exp_vCont_s exp_vCont_r } {
-re "$gdb_prompt $" {
if { $r_counter == ${exp_vCont_r} && $s_counter == ${exp_vCont_s} } {
pass $test
+ set ret 0
} else {
fail $test
}
@@ -47,4 +50,5 @@ proc exec_cmd_expect_vCont_count { cmd exp_vCont_s exp_vCont_r } {
}
gdb_test_no_output "set debug remote 0" ""
+ return $ret
}