aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-01-22 15:42:35 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2021-01-22 15:42:36 -0500
commit0ac85db529d1077551b92c6da66044eff672c315 (patch)
tree2194bfbc559e8f8df81890088f00dc8048217c31 /gdb
parent9d2d8a16e1ce033d6b7956d4b4f37961705bb5cf (diff)
downloadgdb-0ac85db529d1077551b92c6da66044eff672c315.zip
gdb-0ac85db529d1077551b92c6da66044eff672c315.tar.gz
gdb-0ac85db529d1077551b92c6da66044eff672c315.tar.bz2
gdb/testsuite: eliminate gdb_suppress_tests mechanism
There is a lot of support code for the test suppression mechanism. But as far as I know, it is not useful. The gdb_suppress_tests proc is in fact disabled with this comment that has been there since forever: return; # fnf - disable pending review of results where # testsuite ran better without this I suggest to just remove everything related to test suppression, that removes some unnecessary complexity from the support code and the tests. gdb/testsuite/ChangeLog: * lib/gdb.exp (gdb_test_multiple): Remove things related to test suppression. (default_gdb_exit): Likewise. (default_gdb_spawn): Likewise. (send_gdb): Likewise. (gdb_expect): Likewise. (gdb_expect_list): Likewise. (default_gdb_init): Likewise. (gdb_suppress_entire_file): Remove. (gdb_suppress_tests): Remove. (gdb_stop_suppressing_tests): Remove. (gdb_clear_suppressed): Remove. * lib/mi-support.exp (mi_uncatched_gdb_exit): Remove things related to test suppression. (default_mi_gdb_start): Likewise. (mi_gdb_reinitialize_dir): Likewise. (mi_gdb_test): Likewise. (mi_run_cmd_full): Likewise. (mi_runto_helper): Likewise. (mi_execute_to): Likewise. * lib/prompt.exp (default_prompt_gdb_start): Likewise. * gdb.base/bitfields.exp: Likewise. * gdb.base/bitfields2.exp: Likewise. * gdb.base/break.exp: Likewise. * gdb.base/call-sc.exp: Likewise. * gdb.base/callfuncs.exp: Likewise. * gdb.base/dfp-test.exp: Likewise. * gdb.base/endian.exp: Likewise. * gdb.base/exprs.exp: Likewise. * gdb.base/funcargs.exp: Likewise. * gdb.base/hbreak2.exp: Likewise. * gdb.base/recurse.exp: Likewise. * gdb.base/scope.exp: Likewise. * gdb.base/sepdebug.exp: Likewise. * gdb.base/structs.exp: Likewise. * gdb.base/until.exp: Likewise. * gdb.cp/misc.exp: Likewise. Change-Id: Ie6d3025091691ba72010faa28b85ebd417b738f7
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog40
-rw-r--r--gdb/testsuite/gdb.base/bitfields.exp137
-rw-r--r--gdb/testsuite/gdb.base/bitfields2.exp81
-rw-r--r--gdb/testsuite/gdb.base/break.exp23
-rw-r--r--gdb/testsuite/gdb.base/call-sc.exp2
-rw-r--r--gdb/testsuite/gdb.base/callfuncs.exp2
-rw-r--r--gdb/testsuite/gdb.base/dfp-test.exp48
-rw-r--r--gdb/testsuite/gdb.base/endian.exp36
-rw-r--r--gdb/testsuite/gdb.base/exprs.exp9
-rw-r--r--gdb/testsuite/gdb.base/funcargs.exp156
-rw-r--r--gdb/testsuite/gdb.base/hbreak2.exp27
-rw-r--r--gdb/testsuite/gdb.base/recurse.exp37
-rw-r--r--gdb/testsuite/gdb.base/scope.exp284
-rw-r--r--gdb/testsuite/gdb.base/sepdebug.exp23
-rw-r--r--gdb/testsuite/gdb.base/structs.exp2
-rw-r--r--gdb/testsuite/gdb.base/until.exp10
-rw-r--r--gdb/testsuite/gdb.cp/misc.exp10
-rw-r--r--gdb/testsuite/lib/gdb.exp102
-rw-r--r--gdb/testsuite/lib/mi-support.exp41
-rw-r--r--gdb/testsuite/lib/prompt.exp2
20 files changed, 300 insertions, 772 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index d6fa740..c64f3bc 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,43 @@
+2021-01-22 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * lib/gdb.exp (gdb_test_multiple): Remove things related to test
+ suppression.
+ (default_gdb_exit): Likewise.
+ (default_gdb_spawn): Likewise.
+ (send_gdb): Likewise.
+ (gdb_expect): Likewise.
+ (gdb_expect_list): Likewise.
+ (default_gdb_init): Likewise.
+ (gdb_suppress_entire_file): Remove.
+ (gdb_suppress_tests): Remove.
+ (gdb_stop_suppressing_tests): Remove.
+ (gdb_clear_suppressed): Remove.
+ * lib/mi-support.exp (mi_uncatched_gdb_exit): Remove things
+ related to test suppression.
+ (default_mi_gdb_start): Likewise.
+ (mi_gdb_reinitialize_dir): Likewise.
+ (mi_gdb_test): Likewise.
+ (mi_run_cmd_full): Likewise.
+ (mi_runto_helper): Likewise.
+ (mi_execute_to): Likewise.
+ * lib/prompt.exp (default_prompt_gdb_start): Likewise.
+ * gdb.base/bitfields.exp: Likewise.
+ * gdb.base/bitfields2.exp: Likewise.
+ * gdb.base/break.exp: Likewise.
+ * gdb.base/call-sc.exp: Likewise.
+ * gdb.base/callfuncs.exp: Likewise.
+ * gdb.base/dfp-test.exp: Likewise.
+ * gdb.base/endian.exp: Likewise.
+ * gdb.base/exprs.exp: Likewise.
+ * gdb.base/funcargs.exp: Likewise.
+ * gdb.base/hbreak2.exp: Likewise.
+ * gdb.base/recurse.exp: Likewise.
+ * gdb.base/scope.exp: Likewise.
+ * gdb.base/sepdebug.exp: Likewise.
+ * gdb.base/structs.exp: Likewise.
+ * gdb.base/until.exp: Likewise.
+ * gdb.cp/misc.exp: Likewise.
+
2021-01-22 Andrew Burgess <andrew.burgess@embecosm.com>
PR cli/25956
diff --git a/gdb/testsuite/gdb.base/bitfields.exp b/gdb/testsuite/gdb.base/bitfields.exp
index cc16bf9..cf00824 100644
--- a/gdb/testsuite/gdb.base/bitfields.exp
+++ b/gdb/testsuite/gdb.base/bitfields.exp
@@ -35,72 +35,33 @@ proc bitfield_uniqueness {} {
global srcfile
if { ! [runto break1] } {
- gdb_suppress_tests
- }
-
- if [gdb_test "print flags" ".*uc = 1 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 0.*"] {
- gdb_suppress_tests
- }
- if [gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #1"] {
- gdb_suppress_tests
+ return
}
+
+ gdb_test "print flags" ".*uc = 1 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 0.*"
+ gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #1"
+
# Note that we check for s1 as either 1 or -1, so that failure to
# treat it correctly as a signed 1bit field (values 0 or -1) while
# printing its value does not cause a spurious failure. We do the
# signedness preservation test later.
- if [gdb_test "print flags" ".*uc = 0 .*, s1 = (1|-1), u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (s1)"] {
- gdb_suppress_tests
- }
- if [gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #2"] {
- gdb_suppress_tests
- }
- if [gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 1, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (u1)"] {
- gdb_suppress_tests
- }
- if [gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #3"] {
- gdb_suppress_tests
- }
- if [gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 1, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (s2)"] {
- gdb_suppress_tests
- }
- if [gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #4"] {
- gdb_suppress_tests
- }
- if [gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 1, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (u2)"] {
- gdb_suppress_tests
- }
- if [gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #5"] {
- gdb_suppress_tests
- }
- if [gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 1, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (s3)"] {
- gdb_suppress_tests
- }
- if [gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #6"] {
- gdb_suppress_tests
- }
- if [gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 1, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (u3)"] {
- gdb_suppress_tests
- }
- if [gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #7"] {
- gdb_suppress_tests
- }
- if [gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 1, u9 = 0, sc = 0.*" "bitfield uniqueness (s9)"] {
- gdb_suppress_tests
- }
- if [gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #8"] {
- gdb_suppress_tests
- }
- if [gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 1, sc = 0.*" "bitfield uniqueness (u9)"] {
- gdb_suppress_tests
- }
- if [gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #9"] {
- gdb_suppress_tests
- }
- if [gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 1.*" "bitfield uniqueness (sc)"] {
- gdb_suppress_tests
- }
- # Hmmmm?
- gdb_stop_suppressing_tests
+ gdb_test "print flags" ".*uc = 0 .*, s1 = (1|-1), u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (s1)"
+ gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #2"
+ gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 1, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (u1)"
+ gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #3"
+ gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 1, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (s2)"
+ gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #4"
+ gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 1, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (u2)"
+ gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #5"
+ gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 1, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (s3)"
+ gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #6"
+ gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 1, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (u3)"
+ gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #7"
+ gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 1, u9 = 0, sc = 0.*" "bitfield uniqueness (s9)"
+ gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #8"
+ gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 1, sc = 0.*" "bitfield uniqueness (u9)"
+ gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #9"
+ gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 1.*" "bitfield uniqueness (sc)"
}
@@ -119,24 +80,16 @@ proc bitfield_containment {} {
delete_breakpoints
if { ![runto break2] } {
- gdb_suppress_tests
- }
-
- if [gdb_test "print/x flags" "= {uc = 0xff, s1 = 0x0, u1 = 0x1, s2 = 0x0, u2 = 0x3, s3 = 0x0, u3 = 0x7, s9 = 0x0, u9 = 0x1ff, sc = 0x0}" "bitfield containment #1"] {
- gdb_suppress_tests
+ return
}
- if [gdb_test "cont" "Break.*break2 \\(\\) at .*$srcfile:$decimal.*" "continuing to break2"] {
- gdb_suppress_tests
- }
+ gdb_test "print/x flags" "= {uc = 0xff, s1 = 0x0, u1 = 0x1, s2 = 0x0, u2 = 0x3, s3 = 0x0, u3 = 0x7, s9 = 0x0, u9 = 0x1ff, sc = 0x0}" "bitfield containment #1"
+ gdb_test "cont" "Break.*break2 \\(\\) at .*$srcfile:$decimal.*" "continuing to break2"
# If program is compiled with Sun CC, then these print out as their
# actual sizes; if compiled with gcc, they print out as 0xffffffff
# (which strikes me as bogus, but accept it at least for now).
- if [gdb_test "print/x flags" "= {uc = 0x0, s1 = 0x(1|f*), u1 = 0x0, s2 = 0x(3|f*), u2 = 0x0, s3 = 0x(7|f*), u3 = 0x0, s9 = 0x(1ff|f*), u9 = 0x0, sc = 0xff}" "bitfield containment #2"] {
- gdb_suppress_tests
- }
- gdb_stop_suppressing_tests
+ gdb_test "print/x flags" "= {uc = 0x0, s1 = 0x(1|f*), u1 = 0x0, s2 = 0x(3|f*), u2 = 0x0, s3 = 0x(7|f*), u3 = 0x0, s9 = 0x(1ff|f*), u9 = 0x0, sc = 0xff}" "bitfield containment #2"
}
# Test unsigned bitfields for unsignedness and range.
@@ -152,13 +105,10 @@ proc bitfield_unsignedness {} {
delete_breakpoints
if { ![runto break3] } {
- gdb_suppress_tests
+ return
}
- if [gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 1, s2 = 0, u2 = 3, s3 = 0, u3 = 7, s9 = 0, u9 = 511, sc = 0.*" "unsigned bitfield ranges"] {
- gdb_suppress_tests
- }
- gdb_stop_suppressing_tests
+ gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 1, s2 = 0, u2 = 3, s3 = 0, u3 = 7, s9 = 0, u9 = 511, sc = 0.*" "unsigned bitfield ranges"
}
#
@@ -177,16 +127,11 @@ proc bitfield_signedness {} {
delete_breakpoints
if { ! [runto break4] } {
- gdb_suppress_tests
+ return
}
- if [gdb_test "print flags" "= {uc = 0 .*, s1 = 0, u1 = 0, s2 = 1, u2 = 0, s3 = 3, u3 = 0, s9 = 255, u9 = 0, sc = 0 .*}" "signed bitfields, max positive values"] {
- gdb_suppress_tests
- }
-
- if [gdb_test "cont" "Break.*break4 \\(\\) at .*$srcfile:$decimal.*" "continuing to break4 #1"] {
- gdb_suppress_tests
- }
+ gdb_test "print flags" "= {uc = 0 .*, s1 = 0, u1 = 0, s2 = 1, u2 = 0, s3 = 3, u3 = 0, s9 = 255, u9 = 0, sc = 0 .*}" "signed bitfields, max positive values"
+ gdb_test "cont" "Break.*break4 \\(\\) at .*$srcfile:$decimal.*" "continuing to break4 #1"
# Determine if the target has signed bitfields so we can xfail the
# the signed bitfield tests if it doesn't.
@@ -200,27 +145,15 @@ proc bitfield_signedness {} {
}
-re ".*$gdb_prompt $" {
fail "determining signed-ness of bitfields"
- gdb_suppress_tests
}
- default {
+ default {
fail "determining signed-ness of bitfields"
- gdb_suppress_tests
}
}
- if [gdb_test "print flags" ".*uc = 0 .*, s1 = -1, u1 = 0, s2 = -2, u2 = 0, s3 = -4, u3 = 0, s9 = -256, u9 = 0, sc = 0.*" "signed bitfields, max negative values"] {
- gdb_suppress_tests
- }
-
- if [gdb_test "cont" "Break.*break4 \\(\\) at .*$srcfile:$decimal.*" "continuing to break4 #2"] {
- gdb_suppress_tests
- }
-
- if [gdb_test "print flags" ".*uc = 0 .*, s1 = -1, u1 = 0, s2 = -1, u2 = 0, s3 = -1, u3 = 0, s9 = -1, u9 = 0, sc = 0.*" "signed bitfields with -1"] {
- gdb_suppress_tests
- }
- # Hmmmm???
- gdb_stop_suppressing_tests
+ gdb_test "print flags" ".*uc = 0 .*, s1 = -1, u1 = 0, s2 = -2, u2 = 0, s3 = -4, u3 = 0, s9 = -256, u9 = 0, sc = 0.*" "signed bitfields, max negative values"
+ gdb_test "cont" "Break.*break4 \\(\\) at .*$srcfile:$decimal.*" "continuing to break4 #2"
+ gdb_test "print flags" ".*uc = 0 .*, s1 = -1, u1 = 0, s2 = -1, u2 = 0, s3 = -1, u3 = 0, s9 = -1, u9 = 0, sc = 0.*" "signed bitfields with -1"
}
# Test bitfields at non-zero offsets in a struct.
diff --git a/gdb/testsuite/gdb.base/bitfields2.exp b/gdb/testsuite/gdb.base/bitfields2.exp
index db192a5..adc1cf5 100644
--- a/gdb/testsuite/gdb.base/bitfields2.exp
+++ b/gdb/testsuite/gdb.base/bitfields2.exp
@@ -40,9 +40,7 @@ proc continue_test { function tag } {
global decimal
global srcfile
- if [gdb_test "cont" "Break.*$function \\(\\) at .*$srcfile:$decimal.*" "continuing to $function $tag"] {
- gdb_suppress_tests
- }
+ gdb_test "cont" "Break.*$function \\(\\) at .*$srcfile:$decimal.*" "continuing to $function $tag"
}
#
@@ -51,13 +49,9 @@ proc continue_test { function tag } {
#
proc start_test { function } {
delete_breakpoints
- if [gdb_test "break tester" ".*" "break tester prior to $function"] {
- gdb_suppress_tests
- }
+ gdb_test "break tester" ".*" "break tester prior to $function"
continue_test "tester" "prior to $function"
- if ![gdb_breakpoint $function] {
- gdb_suppress_tests
- }
+ gdb_breakpoint $function
continue_test $function "#0"
}
@@ -75,31 +69,18 @@ proc bitfield_uniqueness {} {
global srcfile
start_test break1
-
- if [gdb_test "print flags" ".*u1 = 0, u2 = 0, u3 = 0, s1 = 1, s2 = 0, s3 = 0.*" "bitfield uniqueness; flags.s1 = 1"] {
- gdb_suppress_tests
- }
+
+ gdb_test "print flags" ".*u1 = 0, u2 = 0, u3 = 0, s1 = 1, s2 = 0, s3 = 0.*" "bitfield uniqueness; flags.s1 = 1"
continue_test break1 "#1"
- if [gdb_test "print flags" ".*u1 = 1, u2 = 0, u3 = 0, s1 = 0, s2 = 0, s3 = 0.*" "bitfield uniqueness; flags.u1 = 1"] {
- gdb_suppress_tests
- }
+ gdb_test "print flags" ".*u1 = 1, u2 = 0, u3 = 0, s1 = 0, s2 = 0, s3 = 0.*" "bitfield uniqueness; flags.u1 = 1"
continue_test break1 "#2"
- if [gdb_test "print flags" ".*u1 = 0, u2 = 0, u3 = 0, s1 = 0, s2 = 1, s3 = 0.*" "bitfield uniqueness; flags.s2 = 1"] {
- gdb_suppress_tests
- }
+ gdb_test "print flags" ".*u1 = 0, u2 = 0, u3 = 0, s1 = 0, s2 = 1, s3 = 0.*" "bitfield uniqueness; flags.s2 = 1"
continue_test break1 "#3"
- if [gdb_test "print flags" ".*u1 = 0, u2 = 1, u3 = 0, s1 = 0, s2 = 0, s3 = 0.*" "bitfield uniqueness; flags.u2 = 1"] {
- gdb_suppress_tests
- }
+ gdb_test "print flags" ".*u1 = 0, u2 = 1, u3 = 0, s1 = 0, s2 = 0, s3 = 0.*" "bitfield uniqueness; flags.u2 = 1"
continue_test break1 "#4"
- if [gdb_test "print flags" ".*u1 = 0, u2 = 0, u3 = 0, s1 = 0, s2 = 0, s3 = 1.*" "bitfield uniqueness; flags.s3 = 1"] {
- gdb_suppress_tests
- }
+ gdb_test "print flags" ".*u1 = 0, u2 = 0, u3 = 0, s1 = 0, s2 = 0, s3 = 1.*" "bitfield uniqueness; flags.s3 = 1"
continue_test break1 "#5"
- if [gdb_test "print flags" ".*u1 = 0, u2 = 0, u3 = 1, s1 = 0, s2 = 0, s3 = 0.*" "bitfield uniqueness; flags.u3 = 1"] {
- gdb_suppress_tests
- }
- gdb_stop_suppressing_tests
+ gdb_test "print flags" ".*u1 = 0, u2 = 0, u3 = 1, s1 = 0, s2 = 0, s3 = 0.*" "bitfield uniqueness; flags.u3 = 1"
}
@@ -119,16 +100,11 @@ proc bitfield_containment {} {
# If program is compiled with Sun CC, signed fields print out as their
# actual sizes; if compiled with gcc, they print out as 0xffffffff.
- if [gdb_test "print/x flags" "= {u1 = 0x7fff, u2 = 0x0, u3 = 0xffff, s1 = 0x0, s2 = 0x(1ffffffff|f*), s3 = 0x0}" "bitfield containment; flags.u1, flags.u3, and flags.s3 to all 1s"] {
- gdb_suppress_tests
- }
+ gdb_test "print/x flags" "= {u1 = 0x7fff, u2 = 0x0, u3 = 0xffff, s1 = 0x0, s2 = 0x(1ffffffff|f*), s3 = 0x0}" "bitfield containment; flags.u1, flags.u3, and flags.s3 to all 1s"
continue_test break2 "#1"
- if [gdb_test "print/x flags" "= {u1 = 0x0, u2 = 0x1ffffffff, u3 = 0x0, s1 = 0x(7fff|f*), s2 = 0x0, s3 = 0xf*}" "bitfield containment; flags.u2, flags.s1, flags.s2 to all 1s"] {
- gdb_suppress_tests
- }
- gdb_stop_suppressing_tests
+ gdb_test "print/x flags" "= {u1 = 0x0, u2 = 0x1ffffffff, u3 = 0x0, s1 = 0x(7fff|f*), s2 = 0x0, s3 = 0xf*}" "bitfield containment; flags.u2, flags.s1, flags.s2 to all 1s"
}
# Test unsigned bitfields for unsignedness and range.
@@ -143,10 +119,7 @@ proc bitfield_unsignedness {} {
start_test break3
- if [gdb_test "print flags" ".*u1 = 32767, u2 = 8589934591, u3 = 65535, s1 = 0, s2 = 0, s3 = 0.*" "maximum unsigned bitfield values"] {
- gdb_suppress_tests
- }
- gdb_stop_suppressing_tests
+ gdb_test "print flags" ".*u1 = 32767, u2 = 8589934591, u3 = 65535, s1 = 0, s2 = 0, s3 = 0.*" "maximum unsigned bitfield values"
}
#
@@ -165,9 +138,7 @@ proc bitfield_signedness {} {
start_test break4
- if [gdb_test "print flags" "= {.*u1 = 0, u2 = 0, u3 = 0, s1 = 16383, s2 = 4294967295, s3 = 32767.*}" "maximum signed bitfield values"] {
- gdb_suppress_tests
- }
+ gdb_test "print flags" "= {.*u1 = 0, u2 = 0, u3 = 0, s1 = 16383, s2 = 4294967295, s3 = 32767.*}" "maximum signed bitfield values"
continue_test break4 "#1"
@@ -185,15 +156,12 @@ proc bitfield_signedness {} {
}
-re ".*$gdb_prompt $" {
fail "determining signed-ness of bitfields"
- gdb_suppress_tests
}
}
set test "most negative signed bitfield values"
if $has_signed_bitfields then {
- if [gdb_test "print flags" "u1 = 0, u2 = 0, u3 = 0, s1 = -16384, s2 = -4294967296, s3 = -32768.*" $test ] {
- gdb_suppress_tests
- }
+ gdb_test "print flags" "u1 = 0, u2 = 0, u3 = 0, s1 = -16384, s2 = -4294967296, s3 = -32768.*" $test
} else {
unsupported $test
}
@@ -202,14 +170,10 @@ proc bitfield_signedness {} {
set test "signed bitfields containing -1"
if $has_signed_bitfields then {
- if [gdb_test "print flags" "u1 = 0, u2 = 0, u3 = 0, s1 = -1, s2 = -1, s3 = -1.*" $test ] {
- gdb_suppress_tests
- }
+ gdb_test "print flags" "u1 = 0, u2 = 0, u3 = 0, s1 = -1, s2 = -1, s3 = -1.*" $test
} else {
unsupported $test
}
-
- gdb_stop_suppressing_tests
}
@@ -229,7 +193,6 @@ proc bitfield_set {} {
gdb_test_multiple "print flags.u2 = 0x100000000" $test {
-re "warning: Value does not fit.*$gdb_prompt $" {
fail "$test"
- gdb_suppress_tests
}
-re "= 4294967296.*$gdb_prompt $" {
pass "$test"
@@ -240,23 +203,19 @@ proc bitfield_set {} {
gdb_test_multiple "print flags.s2 = 0x80000000" $test {
-re "warning: Value does not fit.*$gdb_prompt $" {
fail "$test"
- gdb_suppress_tests
}
-re "= 2147483648.*$gdb_prompt $" {
pass "$test"
}
}
- if [gdb_test "print flags" "u1 = 0, u2 = 4294967296, u3 = 0, s1 = 0, s2 = 2147483648, s3 = 0.*" "long long bitfield values after set"] {
- gdb_suppress_tests
- }
+ gdb_test "print flags" "u1 = 0, u2 = 4294967296, u3 = 0, s1 = 0, s2 = 2147483648, s3 = 0.*" "long long bitfield values after set"
set test "set long long signed bitfield negative"
if $has_signed_bitfields then {
gdb_test_multiple "print flags.s2 = -1" $test {
-re "warning: Value does not fit.*$gdb_prompt $" {
fail "$test"
- gdb_suppress_tests
}
-re "= -1.*$gdb_prompt $" {
pass "$test"
@@ -268,14 +227,10 @@ proc bitfield_set {} {
set test "long long bitfield values after set negative"
if $has_signed_bitfields then {
- if [gdb_test "print flags" "u1 = 0, u2 = 4294967296, u3 = 0, s1 = 0, s2 = -1, s3 = 0.*" $test] {
- gdb_suppress_tests
- }
+ gdb_test "print flags" "u1 = 0, u2 = 4294967296, u3 = 0, s1 = 0, s2 = -1, s3 = 0.*" $test
} else {
unsupported $test
}
-
- gdb_stop_suppressing_tests
}
clean_restart ${binfile}
diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp
index b704f5a..c896a48 100644
--- a/gdb/testsuite/gdb.base/break.exp
+++ b/gdb/testsuite/gdb.base/break.exp
@@ -687,22 +687,22 @@ proc test_next_with_recursion {} {
# Continue until we call factorial recursively with 5.
- if [gdb_test "continue" \
+ gdb_test "continue" \
"Continuing.*Break.* factorial .value=5. .*" \
- "continue to factorial(5)"] then { gdb_suppress_tests }
+ "continue to factorial(5)"
# Do a backtrace just to confirm how many levels deep we are.
- if [gdb_test "backtrace" \
+ gdb_test "backtrace" \
"#0\[ \t\]+ factorial .value=5..*" \
- "backtrace from factorial(5)"] then { gdb_suppress_tests }
+ "backtrace from factorial(5)"
# Now a "next" should position us at the recursive call, which
# we will be performing with 4.
- if [gdb_test "next" \
+ gdb_test "next" \
".* factorial .value - 1.;.*" \
- "next to recursive call"] then { gdb_suppress_tests }
+ "next to recursive call"
# Disable the breakpoint at the entry to factorial by deleting them all.
# The "next" should run until we return to the next line from this
@@ -734,14 +734,13 @@ proc test_next_with_recursion {} {
# OK, we should be back in the same stack frame we started from.
# Do a backtrace just to confirm.
- set result [gdb_test "backtrace" \
+ gdb_test "backtrace" \
"#0\[ \t\]+ factorial .value=120.*\r\n#1\[ \t\]+ \[0-9a-fx\]+ in factorial .value=6..*" \
- "backtrace from factorial(5.1)"]
- if { $result != 0 } { gdb_suppress_tests }
+ "backtrace from factorial(5.1)"
- if [target_info exists gdb,noresults] { gdb_suppress_tests }
- gdb_continue_to_end "recursive next test"
- gdb_stop_suppressing_tests
+ if { ![target_info exists gdb,noresults] } {
+ gdb_continue_to_end "recursive next test"
+ }
}
test_next_with_recursion
diff --git a/gdb/testsuite/gdb.base/call-sc.exp b/gdb/testsuite/gdb.base/call-sc.exp
index 81b2271..6b712a3 100644
--- a/gdb/testsuite/gdb.base/call-sc.exp
+++ b/gdb/testsuite/gdb.base/call-sc.exp
@@ -68,7 +68,7 @@ proc start_scalars_test { type } {
# Advance to main
if { ![runto_main] } then {
- gdb_suppress_tests
+ return
}
# Get the debug format
diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp
index c5298cc..71c39da 100644
--- a/gdb/testsuite/gdb.base/callfuncs.exp
+++ b/gdb/testsuite/gdb.base/callfuncs.exp
@@ -332,7 +332,7 @@ proc rerun_and_prepare {} {
with_test_prefix "rerun number ${rerun_count}" {
if { ![runto_main] } {
- gdb_suppress_tests
+ return
}
gdb_test_no_output "set language c"
diff --git a/gdb/testsuite/gdb.base/dfp-test.exp b/gdb/testsuite/gdb.base/dfp-test.exp
index d365d76..379794a 100644
--- a/gdb/testsuite/gdb.base/dfp-test.exp
+++ b/gdb/testsuite/gdb.base/dfp-test.exp
@@ -130,24 +130,24 @@ proc d128_set_tests {} {
# of finite numbers, infinite and NaN, and also the setting of different
# decimal value.
-if [gdb_test "next" \
+gdb_test "next" \
".*Positive infd32.*" \
- "next after initializing d32"] then { gdb_suppress_tests }
+ "next after initializing d32"
gdb_test "print d32" "1.2345" "d32 is initialized to 1.2345"
-if [gdb_test "next" \
+gdb_test "next" \
".*Negative infd32.*" \
- "next after assigning builtin infinity to d32"] then { gdb_suppress_tests }
+ "next after assigning builtin infinity to d32"
gdb_test "print d32" "Infinity" "d32 is positive Infinity"
-if [gdb_test "next" \
+gdb_test "next" \
".*__builtin_nand32.*" \
- "next after assigning negative builtin infinity to d32"] then { gdb_suppress_tests }
+ "next after assigning negative builtin infinity to d32"
gdb_test "print d32" "-Infinity" "d32 is negative Infinity"
-if [gdb_test "next" \
+gdb_test "next" \
".*d64 = 1.2345.*" \
- "next after assigning builtin NaN to d32"] then { gdb_suppress_tests }
+ "next after assigning builtin NaN to d32"
gdb_test "print d32" "NaN" "d32 is NaN"
d32_set_tests
@@ -157,24 +157,24 @@ d32_set_tests
# of finite number, infinite and NaN, and also the setting of different
# decimal value.
-if [gdb_test "next" \
+gdb_test "next" \
".*Positive infd64.*" \
- "next after initializing d64"] then { gdb_suppress_tests }
+ "next after initializing d64"
gdb_test "print d64" "1.2345" "d64 is initialized to 1.2345"
-if [gdb_test "next" \
+gdb_test "next" \
".*Negative infd64.*" \
- "next after assigning builtin infinity to d64"] then { gdb_suppress_tests }
+ "next after assigning builtin infinity to d64"
gdb_test "print d64" "Infinity" "d64 is positive Infinity"
-if [gdb_test "next" \
+gdb_test "next" \
".*__builtin_nand64.*" \
- "next after assigning negative builtin infinity to d64"] then { gdb_suppress_tests }
+ "next after assigning negative builtin infinity to d64"
gdb_test "print d64" "-Infinity" "d64 is negative Infinity"
-if [gdb_test "next" \
+gdb_test "next" \
".*d128 = 1.2345.*" \
- "next after assigning builtin NaN to d64"] then { gdb_suppress_tests }
+ "next after assigning builtin NaN to d64"
gdb_test "print d64" "NaN" "d64 is NaN"
d64_set_tests
@@ -184,26 +184,26 @@ d64_set_tests
# of finite number, infinite and NaN, and also the setting of different
# decimal value.
-if [gdb_test "next" \
+gdb_test "next" \
".*Positive infd128.*" \
- "next after initializing d128"] then { gdb_suppress_tests }
+ "next after initializing d128"
gdb_test "print d128" "1.2345" "d128 is initialized to 1.2345"
d128_set_tests
-if [gdb_test "next" \
+gdb_test "next" \
".*Negative infd128.*" \
- "next after assigning builtin infinity to d128"] then { gdb_suppress_tests }
+ "next after assigning builtin infinity to d128"
gdb_test "print d128" "Infinity" "d128 is positive Infinity"
-if [gdb_test "next" \
+gdb_test "next" \
".*__builtin_nand128.*" \
- "next after assigning negative builtin infinity to d128"] then { gdb_suppress_tests }
+ "next after assigning negative builtin infinity to d128"
gdb_test "print d128" "-Infinity" "d128 is negative Infinity"
-if [gdb_test "next" \
+gdb_test "next" \
".*arg0_32.*" \
- "next after assigning builtin NaN to d128"] then { gdb_suppress_tests }
+ "next after assigning builtin NaN to d128"
gdb_test "print d128" "NaN" "d128 is NaN"
# The following tests are intended to verify that gdb can correctly handle
diff --git a/gdb/testsuite/gdb.base/endian.exp b/gdb/testsuite/gdb.base/endian.exp
index 39cb1e1..86932a5 100644
--- a/gdb/testsuite/gdb.base/endian.exp
+++ b/gdb/testsuite/gdb.base/endian.exp
@@ -41,12 +41,12 @@ gdb_test "set endian auto" "$en_auto \\\(currently big endian\\\)\\." \
"auto target endianness big"
if { [build_executable ${testfile}.exp $testfile] } {
- gdb_suppress_entire_file "$pf_prefix cannot build executable"
+ untested "failed to compile"
+ return
}
-if { [gdb_file_cmd $binfile] } {
- gdb_suppress_entire_file "$pf_prefix cannot select executable"
-}
+gdb_file_cmd $binfile
+
set test "get target endianness"
if { [gdb_test_multiple "show endian" "$test" {
-re "$en_auto \\\(currently \(big\|little\) endian\\\)\\..*$gdb_prompt" {
@@ -54,41 +54,33 @@ if { [gdb_test_multiple "show endian" "$test" {
pass "$test"
}
}] } {
- gdb_suppress_entire_file \
- "$pf_prefix cannot determine executable endianness"
- set endian ""
+ return
}
# Now check that the automatic endianness is updated
# according to the executable selected.
-if { [gdb_unload] } {
- gdb_suppress_entire_file "$pf_prefix cannot unselect executable"
-}
+gdb_unload
gdb_test "set endian big" "$en_set big endian\\." \
"override target endianness big"
gdb_test "set endian auto" "$en_auto \\\(currently big endian\\\)\\." \
"override auto target endianness big"
-if { [gdb_file_cmd $binfile] } {
- gdb_suppress_entire_file "$pf_prefix cannot select executable"
-}
+
+gdb_file_cmd $binfile
gdb_test "show endian" "$en_auto \\\(currently $endian endian\\\)\\." \
"previously big default executable endianness"
-if { [gdb_unload] } {
- gdb_suppress_entire_file "$pf_prefix cannot unselect executable"
-}
+
+gdb_unload
gdb_test "show endian" "$en_auto \\\(currently $endian endian\\\)\\." \
"previously big default no executable endianness"
gdb_test "set endian little" "$en_set little endian\\." \
"override target endianness little"
gdb_test "set endian auto" "$en_auto \\\(currently little endian\\\)\\." \
"override auto target endianness little"
-if { [gdb_file_cmd $binfile] } {
- gdb_suppress_entire_file "$pf_prefix cannot select executable"
-}
+
+gdb_file_cmd $binfile
gdb_test "show endian" "$en_auto \\\(currently $endian endian\\\)\\." \
"previously little default executable endianness"
-if { [gdb_unload] } {
- gdb_suppress_entire_file "$pf_prefix cannot unselect executable"
-}
+
+gdb_unload
gdb_test "show endian" "$en_auto \\\(currently $endian endian\\\)\\." \
"previously little default no executable endianness"
diff --git a/gdb/testsuite/gdb.base/exprs.exp b/gdb/testsuite/gdb.base/exprs.exp
index 6aa374d..50272d1 100644
--- a/gdb/testsuite/gdb.base/exprs.exp
+++ b/gdb/testsuite/gdb.base/exprs.exp
@@ -47,15 +47,10 @@ proc test_expr { args } {
}
set last_ent [expr [llength $args] - 1]
set testname [lindex $args $last_ent]
- if [gdb_test [lindex $args 0] ".*" "$testname (setup)"] {
- gdb_suppress_tests
- }
+ gdb_test [lindex $args 0] ".*" "$testname (setup)"
for {set x 1} {$x < $last_ent} {set x [expr $x + 2]} {
- if [gdb_test [lindex $args $x] [lindex $args [expr $x + 1]] "$testname ([lindex $args $x])"] {
- gdb_suppress_tests
- }
+ gdb_test [lindex $args $x] [lindex $args [expr $x + 1]] "$testname ([lindex $args $x])"
}
- gdb_stop_suppressing_tests
}
#
# test expressions with "char" types
diff --git a/gdb/testsuite/gdb.base/funcargs.exp b/gdb/testsuite/gdb.base/funcargs.exp
index 80f2b47..7031e02 100644
--- a/gdb/testsuite/gdb.base/funcargs.exp
+++ b/gdb/testsuite/gdb.base/funcargs.exp
@@ -65,25 +65,16 @@ proc integral_args {} {
gdb_test "print l " ".* = 3" "print l after run to call0a"
# Continue; should stop at call0b and print actual arguments.
- if [gdb_test "cont" ".* call0b \\(s=1, i=2, l=3, c=97 'a'\\) .*" "continue to call0b"] {
- gdb_suppress_tests
- }
+ gdb_test "cont" ".* call0b \\(s=1, i=2, l=3, c=97 'a'\\) .*" "continue to call0b"
# Continue; should stop at call0c and print actual arguments.
- if [gdb_test "cont" ".* call0c \\(i=2, l=3, c=97 'a', s=1\\) .*" "continue to call0c"] {
- gdb_suppress_tests
- }
+ gdb_test "cont" ".* call0c \\(i=2, l=3, c=97 'a', s=1\\) .*" "continue to call0c"
# Continue; should stop at call0d and print actual arguments.
- if [gdb_test "cont" ".* call0d \\(l=3, c=97 'a', s=1, i=2\\) .*" "continue to call0d";] {
- gdb_suppress_tests
- }
+ gdb_test "cont" ".* call0d \\(l=3, c=97 'a', s=1, i=2\\) .*" "continue to call0d"
# Continue; should stop at call0e and print actual arguments.
- if [gdb_test "cont" ".* call0e \\(c1=97 'a', l=3, c2=97 'a', i=2, c3=97 'a', s=1, c4=97 'a', c5=97 'a'\\) .*" "continue to call0e" ] {
- gdb_suppress_tests
- }
- gdb_stop_suppressing_tests
+ gdb_test "cont" ".* call0e \\(c1=97 'a', l=3, c2=97 'a', i=2, c3=97 'a', s=1, c4=97 'a', c5=97 'a'\\) .*" "continue to call0e"
}
#
@@ -114,27 +105,18 @@ proc unsigned_integral_args {} {
gdb_test "print us" ".* = 6"
gdb_test "print ui" ".* = 7"
gdb_test "print ul" ".* = 8"
-
+
# Continue; should stop at call1b and print actual arguments.
- if [gdb_test "cont" ".* call1b \\(us=6, ui=7, ul=8, uc=98 'b'\\) .*" "continue to call1b"] {
- gdb_suppress_tests
- }
+ gdb_test "cont" ".* call1b \\(us=6, ui=7, ul=8, uc=98 'b'\\) .*" "continue to call1b"
# Continue; should stop at call1c and print actual arguments.
- if [gdb_test "cont" ".* call1c \\(ui=7, ul=8, uc=98 'b', us=6\\) .*" "continue to call1c"] {
- gdb_suppress_tests
- }
+ gdb_test "cont" ".* call1c \\(ui=7, ul=8, uc=98 'b', us=6\\) .*" "continue to call1c"
# Continue; should stop at call1d and print actual arguments.
- if [gdb_test "cont" ".* call1d \\(ul=8, uc=98 'b', us=6, ui=7\\) .*" "continue to call1d"] {
- gdb_suppress_tests
- }
+ gdb_test "cont" ".* call1d \\(ul=8, uc=98 'b', us=6, ui=7\\) .*" "continue to call1d"
# Continue; should stop at call1e and print actual arguments.
- if [gdb_test "cont" ".* call1e \\(uc1=98 'b', ul=8, uc2=98 'b', ui=7, uc3=98 'b', us=6, uc4=98 'b', uc5=98 'b'\\) .*" "continue to call1e"] {
- gdb_suppress_tests
- }
- gdb_stop_suppressing_tests
+ gdb_test "cont" ".* call1e \\(uc1=98 'b', ul=8, uc2=98 'b', ui=7, uc3=98 'b', us=6, uc4=98 'b', uc5=98 'b'\\) .*" "continue to call1e"
}
#
@@ -183,39 +165,25 @@ proc float_and_integral_args {} {
setup_xfail "rs6000-*-*"
# Continue; should stop at call2b and print actual arguments.
- if [gdb_test "cont" ".* call2b \\(f1=4, s=1, d1=5, i=2, f2=4, l=3, d2=5, c=97 'a'\\) .*" "continue to call2b"] {
- gdb_suppress_tests
- }
+ gdb_test "cont" ".* call2b \\(f1=4, s=1, d1=5, i=2, f2=4, l=3, d2=5, c=97 'a'\\) .*" "continue to call2b"
# Continue; should stop at call2c and print actual arguments.
- if [gdb_test "cont" ".* call2c \\(s=1, d1=5, i=2, f2=4, l=3, d2=5, c=97 'a', f1=4\\) .*" "continue to call2c"] {
- gdb_suppress_tests
- }
+ gdb_test "cont" ".* call2c \\(s=1, d1=5, i=2, f2=4, l=3, d2=5, c=97 'a', f1=4\\) .*" "continue to call2c"
# Continue; should stop at call2d and print actual arguments.
- if [gdb_test "cont" ".* call2d \\(d1=5, i=2, f2=4, l=3, d2=5, c=97 'a', f1=4, s=1\\) .*" "continue to call2d"] {
- gdb_suppress_tests
- }
+ gdb_test "cont" ".* call2d \\(d1=5, i=2, f2=4, l=3, d2=5, c=97 'a', f1=4, s=1\\) .*" "continue to call2d"
# Continue; should stop at call2e and print actual arguments.
- if [gdb_test "cont" ".* call2e \\(i=2, f2=4, l=3, d2=5, c=97 'a', f1=4, s=1, d1=5\\) .*" "continue to call2e"] {
- gdb_suppress_tests
- }
+ gdb_test "cont" ".* call2e \\(i=2, f2=4, l=3, d2=5, c=97 'a', f1=4, s=1, d1=5\\) .*" "continue to call2e"
# Continue; should stop at call2f and print actual arguments.
- if [gdb_test "cont" ".* call2f \\(f2=4, l=3, d2=5, c=97 'a', f1=4, s=1, d1=5, i=2\\) .*" "continue to call2f"] {
- gdb_suppress_tests
- }
+ gdb_test "cont" ".* call2f \\(f2=4, l=3, d2=5, c=97 'a', f1=4, s=1, d1=5, i=2\\) .*" "continue to call2f"
# Continue; should stop at call2g and print actual arguments.
- if [gdb_test "cont" ".* call2g \\(l=3, d2=5, c=97 'a', f1=4, s=1, d1=5, i=2, f2=4\\) .*" "continue to call2g"] {
- gdb_suppress_tests
- }
+ gdb_test "cont" ".* call2g \\(l=3, d2=5, c=97 'a', f1=4, s=1, d1=5, i=2, f2=4\\) .*" "continue to call2g"
# Continue; should stop at call2h and print actual arguments.
- if [gdb_test "cont" ".* call2h \\(d2=5, c=97 'a', f1=4, s=1, d1=5, i=2, f2=4, l=3\\) .*" "continue to call2h"] {
- gdb_suppress_tests
- }
+ gdb_test "cont" ".* call2h \\(d2=5, c=97 'a', f1=4, s=1, d1=5, i=2, f2=4, l=3\\) .*" "continue to call2h"
# monitor only allows 8 breakpoints; w89k board allows 10, so
# break them up into two groups.
@@ -223,10 +191,7 @@ proc float_and_integral_args {} {
gdb_breakpoint call2i
# Continue; should stop at call2i and print actual arguments.
- if [gdb_test "cont" ".* call2i \\(c1=97 'a', f1=4, c2=97 'a', c3=97 'a', d1=5, c4=97 'a', c5=97 'a', c6=97 'a', f2=4, s=1, c7=97 'a', d2=5\\) .*" "continue to call2i"] {
- gdb_suppress_tests
- }
- gdb_stop_suppressing_tests
+ gdb_test "cont" ".* call2i \\(c1=97 'a', f1=4, c2=97 'a', c3=97 'a', d1=5, c4=97 'a', c5=97 'a', c6=97 'a', f2=4, s=1, c7=97 'a', d2=5\\) .*" "continue to call2i"
}
@@ -322,9 +287,7 @@ proc pointer_args {} {
# Continue; should stop at call3b and print actual arguments.
# Try dereferencing the arguments.
- if [gdb_test "cont" ".* call3b \\(ucp=$hex <uc> \"b.*\", usp=$hex <us>, uip=$hex <ui>, ulp=$hex <ul>\\) .*" "continue to call3b"] {
- gdb_suppress_tests
- }
+ gdb_test "cont" ".* call3b \\(ucp=$hex <uc> \"b.*\", usp=$hex <us>, uip=$hex <ui>, ulp=$hex <ul>\\) .*" "continue to call3b"
gdb_test "print *ucp" ".* = 98 'b'"
gdb_test "print *usp" ".* = 6"
@@ -333,15 +296,10 @@ proc pointer_args {} {
# Continue; should stop at call3c and print actual arguments.
# Try dereferencing the arguments.
- if [gdb_test "cont" ".* call3c \\(fp=$hex <f>, dp=$hex <d>\\) .*" "continue to call3c"] {
- gdb_suppress_tests
- }
+ gdb_test "cont" ".* call3c \\(fp=$hex <f>, dp=$hex <d>\\) .*" "continue to call3c"
gdb_test "print *fp" ".* = 4"
gdb_test "print *dp" ".* = 5"
-
-# pass "locate actual args, pointer types"
- gdb_stop_suppressing_tests
}
#
@@ -391,7 +349,6 @@ proc structs_by_reference {} {
}
pass "locate actual args, structs/unions passed by reference"
- gdb_stop_suppressing_tests
}
#
@@ -452,8 +409,6 @@ proc structs_by_value {} {
} else {
fail "print un (unknown case)"
}
-
- gdb_stop_suppressing_tests
}
#
@@ -500,12 +455,10 @@ proc discard_and_shuffle {} {
gdb_continue call6b
- if [gdb_test_sequence "backtrace 100" "backtrace from call6b" {
+ gdb_test_sequence "backtrace 100" "backtrace from call6b" {
"\[\r\n\]#0 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#1 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#2 .* main \\(.*\\) at "
- } ] {
- gdb_suppress_tests
}
# Continue; should stop at call6c and print actual arguments.
@@ -513,27 +466,24 @@ proc discard_and_shuffle {} {
gdb_continue call6c
- if [gdb_test_sequence "backtrace 100" "backtrace from call6c" {
+ gdb_test_sequence "backtrace 100" "backtrace from call6c" {
"\[\r\n\]#0 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#1 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#2 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#3 .* main \\(.*\\) at "
- } ] {
- gdb_suppress_tests
}
+
# Continue; should stop at call6d and print actual arguments.
# Print backtrace.
gdb_continue call6d
- if [gdb_test_sequence "backtrace 100" "backtrace from call6d" {
+ gdb_test_sequence "backtrace 100" "backtrace from call6d" {
"\[\r\n\]#0 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#1 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#2 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#3 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#4 .* main \\(.*\\) at "
- } ] {
- gdb_suppress_tests
}
# Continue; should stop at call6e and print actual arguments.
@@ -541,15 +491,13 @@ proc discard_and_shuffle {} {
gdb_continue call6e
- if [gdb_test_sequence "backtrace 100" "backtrace from call6e" {
+ gdb_test_sequence "backtrace 100" "backtrace from call6e" {
"\[\r\n\]#0 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#1 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#2 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#3 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#4 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#5 .* main \\(.*\\) at "
- } ] {
- gdb_suppress_tests
}
# Continue; should stop at call6f and print actual arguments.
@@ -557,7 +505,7 @@ proc discard_and_shuffle {} {
gdb_continue call6f
- if [gdb_test_sequence "backtrace 100" "backtrace from call6f" {
+ gdb_test_sequence "backtrace 100" "backtrace from call6f" {
"\[\r\n\]#0 .* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#1 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#2 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
@@ -565,8 +513,6 @@ proc discard_and_shuffle {} {
"\[\r\n\]#4 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#5 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#6 .* main \\(.*\\) at "
- } ] {
- gdb_suppress_tests
}
# Continue; should stop at call6g and print actual arguments.
@@ -574,7 +520,7 @@ proc discard_and_shuffle {} {
gdb_continue call6g
- if [gdb_test_sequence "backtrace 100" "backtrace from call6g" {
+ gdb_test_sequence "backtrace 100" "backtrace from call6g" {
"\[\r\n\]#0 .* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#1 .* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#2 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
@@ -583,8 +529,6 @@ proc discard_and_shuffle {} {
"\[\r\n\]#5 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#6 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#7 .* main \\(.*\\) at "
- } ] {
- gdb_suppress_tests
}
# Continue; should stop at call6h and print actual arguments.
@@ -592,7 +536,7 @@ proc discard_and_shuffle {} {
gdb_continue call6h
- if [gdb_test_sequence "backtrace 100" "backtrace from call6h" {
+ gdb_test_sequence "backtrace 100" "backtrace from call6h" {
"\[\r\n\]#0 .* call6h \\(us=6, ui=7, ul=8\\) "
"\[\r\n\]#1 .* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#2 .* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
@@ -602,8 +546,6 @@ proc discard_and_shuffle {} {
"\[\r\n\]#6 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#7 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#8 .* main \\(.*\\) at "
- } ] {
- gdb_suppress_tests
}
# monitor only allows 8 breakpoints; w89k board allows 10, so
@@ -618,7 +560,7 @@ proc discard_and_shuffle {} {
gdb_continue call6i
- if [gdb_test_sequence "backtrace 100" "backtrace from call6i" {
+ gdb_test_sequence "backtrace 100" "backtrace from call6i" {
"\[\r\n\]#0 .* call6i \\(ui=7, ul=8\\) "
"\[\r\n\]#1 .* call6h \\(us=6, ui=7, ul=8\\) "
"\[\r\n\]#2 .* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) "
@@ -629,8 +571,6 @@ proc discard_and_shuffle {} {
"\[\r\n\]#7 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#8 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#9 .* main \\(.*\\) at "
- } ] {
- gdb_suppress_tests
}
# Continue; should stop at call6j and print actual arguments.
@@ -638,7 +578,7 @@ proc discard_and_shuffle {} {
gdb_continue call6j
- if [gdb_test_sequence "backtrace 100" "backtrace from call6j" {
+ gdb_test_sequence "backtrace 100" "backtrace from call6j" {
"\[\r\n\]#0 .* call6j \\(ul=8\\) "
"\[\r\n\]#1 .* call6i \\(ui=7, ul=8\\) "
"\[\r\n\]#2 .* call6h \\(us=6, ui=7, ul=8\\) "
@@ -650,15 +590,13 @@ proc discard_and_shuffle {} {
"\[\r\n\]#8 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#9 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#10 .* main \\(.*\\) at "
- } ] {
- gdb_suppress_tests
}
# Continue; should stop at call6k and print actual arguments.
# Print backtrace.
gdb_continue call6k
- if [gdb_test_sequence "backtrace 100" "backtrace from call6k" {
+ gdb_test_sequence "backtrace 100" "backtrace from call6k" {
"\[\r\n\]#0 .* call6k \\(\\) "
"\[\r\n\]#1 .* call6j \\(ul=8\\) "
"\[\r\n\]#2 .* call6i \\(ui=7, ul=8\\) "
@@ -671,10 +609,7 @@ proc discard_and_shuffle {} {
"\[\r\n\]#9 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#10 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
"\[\r\n\]#11 .* main \\(.*\\) at "
- } ] {
- gdb_suppress_tests
}
- gdb_stop_suppressing_tests
}
@@ -873,7 +808,6 @@ proc shuffle_round_robin {} {
"\[\r\n\]#10 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
"\[\r\n\]#11 .* main \\(.*\\) at "
}
- gdb_stop_suppressing_tests
}
#
@@ -905,7 +839,6 @@ proc recursive_structs_by_value {} {
"\[\r\n\]#6 .* test_struct_args \\(\\) "
"\[\r\n\]#7 .* main \\(.*\\) at "
}
- gdb_stop_suppressing_tests
}
#
@@ -917,7 +850,9 @@ proc localvars_after_alloca { } {
global decimal
global gcc_compiled
- if { ! [ runto localvars_after_alloca ] } then { gdb_suppress_tests; }
+ if { ![runto localvars_after_alloca] } {
+ return
+ }
# Print each arg as a double check to see if we can print
# them here as well as with backtrace.
@@ -941,7 +876,6 @@ proc localvars_after_alloca { } {
gdb_test "print l" " = 3" "print l in localvars_after_alloca"
gdb_test "backtrace 8" "#0.*localvars_after_alloca \\(c=97 'a', s=1, i=2, l=3\\).*#1.*main.*" "backtrace after alloca"
- gdb_stop_suppressing_tests
}
proc call_after_alloca { } {
@@ -950,7 +884,9 @@ proc call_after_alloca { } {
global decimal
global gcc_compiled
- if { ! [ runto call_after_alloca_subr ] } then { gdb_suppress_tests; }
+ if { ![runto call_after_alloca_subr] } {
+ return
+ }
# Print each arg as a double check to see if we can print
# them here as well as with backtrace.
@@ -964,7 +900,6 @@ proc call_after_alloca { } {
if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
gdb_test "backtrace 8" "#0.*call_after_alloca_subr \\(c=97 'a', s=1, i=2, l=3, uc=98 'b', us=11, ui=12, ul=13\\).*#1.*call_after_alloca \\(c=97 'a', s=1, i=2, l=3\\).*#2.*main.*" "backtrace from call_after_alloca_subr"
- gdb_stop_suppressing_tests
}
#
@@ -981,7 +916,9 @@ proc localvars_in_indirect_call { } {
# Can not use "runto call0a" as call0a is called several times
# during single run. Instead stop in a marker function and
# take control from there.
- if { ! [ runto marker_indirect_call ] } then { gdb_suppress_tests; }
+ if { ![runto marker_indirect_call] } {
+ return
+ }
# break on the next call to call0a, then delete all the breakpoints
# and start testing.
@@ -1026,18 +963,15 @@ proc localvars_in_indirect_call { } {
}
-re ".*$gdb_prompt $" {
fail "finish from indirectly called function"
- gdb_suppress_tests
}
- default {
+ default {
fail "finish from indirectly called function"
- gdb_suppress_tests
}
}
if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
gdb_test "step" "call0a \\(c=97 'a', s=1, i=2, l=3\\).*" \
"stepping into indirectly called function"
- gdb_stop_suppressing_tests
}
#
@@ -1051,7 +985,9 @@ proc test_stepping_over_trampolines { } {
global decimal
# Stop in a marker function and take control from there.
- if { ! [ runto marker_call_with_trampolines ] } then { gdb_suppress_tests; }
+ if { ![runto marker_call_with_trampolines] } {
+ return
+ }
# Cater for gdb stopping in midline, see comment for finish above.
gdb_test_multiple "finish" "finish from marker_call_with_trampolines" {
@@ -1065,9 +1001,8 @@ proc test_stepping_over_trampolines { } {
-re ".*$gdb_prompt $" {
fail "finish from marker_call_with_trampolines"
}
- default {
+ default {
fail "finish from marker_call_with_trampolines"
- gdb_suppress_tests
}
}
@@ -1086,7 +1021,6 @@ proc test_stepping_over_trampolines { } {
gdb_test_multiple "step" "stepping back to main from function called with trampolines" {
-re "main .* at.*$gdb_prompt $" {
pass "stepping back to main from function called with trampolines"
- gdb_suppress_tests
}
-re "\}.*End of call_with_trampolines.*$gdb_prompt $" {
send_gdb "step\n"
@@ -1097,10 +1031,8 @@ proc test_stepping_over_trampolines { } {
}
default {
fail "stepping back to main from function called with trampolines"
- gdb_suppress_tests
}
}
- gdb_stop_suppressing_tests
}
set prev_timeout $timeout
diff --git a/gdb/testsuite/gdb.base/hbreak2.exp b/gdb/testsuite/gdb.base/hbreak2.exp
index 6761454..cedc151 100644
--- a/gdb/testsuite/gdb.base/hbreak2.exp
+++ b/gdb/testsuite/gdb.base/hbreak2.exp
@@ -439,28 +439,28 @@ proc test_next_with_recursion {} {
# Run until we call factorial with 6
gdb_run_cmd
- if [gdb_test "" \
+ gdb_test "" \
"Break.* factorial .value=6. .*" \
- "run to factorial(6)"] then { gdb_suppress_tests }
+ "run to factorial(6)"
# Continue until we call factorial recursively with 5.
- if [gdb_test "continue" \
+ gdb_test "continue" \
"Continuing.*Break.* factorial .value=5. .*" \
- "continue to factorial(5)"] then { gdb_suppress_tests }
+ "continue to factorial(5)"
# Do a backtrace just to confirm how many levels deep we are.
- if [gdb_test "backtrace" \
+ gdb_test "backtrace" \
"#0\[ \t\]+ factorial .value=5..*" \
- "backtrace from factorial(5)"] then { gdb_suppress_tests }
+ "backtrace from factorial(5)"
# Now a "next" should position us at the recursive call, which
# we will be performing with 4.
- if [gdb_test "next" \
+ gdb_test "next" \
".* factorial .value - 1.;.*" \
- "next to recursive call"] then { gdb_suppress_tests }
+ "next to recursive call"
# Disable the breakpoint at the entry to factorial by deleting them all.
# The "next" should run until we return to the next line from this
@@ -492,14 +492,13 @@ proc test_next_with_recursion {} {
# OK, we should be back in the same stack frame we started from.
# Do a backtrace just to confirm.
- set result [gdb_test "backtrace" \
+ gdb_test "backtrace" \
"#0\[ \t\]+ factorial .value=120.*\r\n#1\[ \t\]+ \[0-9a-fx\]+ in factorial .value=6..*" \
- "backtrace from factorial(5.1)"]
- if { $result != 0 } { gdb_suppress_tests }
+ "backtrace from factorial(5.1)"
- if [target_info exists gdb,noresults] { gdb_suppress_tests }
- gdb_continue_to_end "recursive next test"
- gdb_stop_suppressing_tests
+ if { ![target_info exists gdb,noresults] } {
+ gdb_continue_to_end "recursive next test"
+ }
}
test_next_with_recursion
diff --git a/gdb/testsuite/gdb.base/recurse.exp b/gdb/testsuite/gdb.base/recurse.exp
index 403035e..df85427 100644
--- a/gdb/testsuite/gdb.base/recurse.exp
+++ b/gdb/testsuite/gdb.base/recurse.exp
@@ -37,11 +37,9 @@ proc recurse_tests {} {
"set first instance watchpoint"
# Continue until initial set of b.
- if [gdb_test "continue" \
+ gdb_test "continue" \
"Continuing.*\[Ww\]atchpoint.*: b.*Old value = 0.*New value = 10.*" \
- "continue to first instance watchpoint, first time"] then {
- gdb_suppress_tests
- }
+ "continue to first instance watchpoint, first time"
# Continue inward for a few iterations
gdb_test "continue" "Breakpoint.* recurse \\(a=9\\).*" \
@@ -63,11 +61,9 @@ proc recurse_tests {} {
"set second instance watchpoint"
# Continue until initial set of b (second instance).
- if [gdb_test "continue" \
+ gdb_test "continue" \
"Continuing.*\[Ww\]atchpoint.*: b.*Old value = 0.*New value = 5.*"\
- "continue to second instance watchpoint, first time"] then {
- gdb_suppress_tests
- }
+ "continue to second instance watchpoint, first time"
# Continue inward for a few iterations
gdb_test "continue" "Breakpoint.* recurse \\(a=4\\).*" \
@@ -80,29 +76,23 @@ proc recurse_tests {} {
"continue to recurse (a = 1)"
# Continue until second set of b (second instance).
- if [gdb_test "continue" \
+ gdb_test "continue" \
"Continuing.*\[Ww\]atchpoint.*: b.*Old value = 5.*New value = 120.*return.*" \
- "continue to second instance watchpoint, second time"] then {
- gdb_suppress_tests
- }
+ "continue to second instance watchpoint, second time"
# Continue again. We should have a watchpoint go out of scope now
- if [gdb_test "continue" \
+ gdb_test "continue" \
"Continuing.*\[Ww\]atchpoint.*deleted.*recurse \\(a=6\\) .*" \
- "second instance watchpoint deleted when leaving scope"] then {
- gdb_suppress_tests
- }
+ "second instance watchpoint deleted when leaving scope"
# Continue until second set of b (first instance).
# 24320 is allowed as the final value for b as that's the value
# b would have on systems with 16bit integers.
#
# We could fix the test program to deal with this too.
- if [gdb_test "continue" \
+ gdb_test "continue" \
"Continuing.*\[Ww\]atchpoint.*b.*Old value = 10.*New value = \(3628800|24320\).*return.*" \
- "continue to first instance watchpoint, second time"] then {
- gdb_suppress_tests
- }
+ "continue to first instance watchpoint, second time"
# Continue again. We should have a watchpoint go out of scope now.
#
@@ -126,13 +116,10 @@ proc recurse_tests {} {
# this basically by watching for the frame pointer to change. When
# the frame pointer changes, the test expects to be back in main, but
# instead it is still in the epilogue of the callee.
- if [gdb_test "continue" \
+ gdb_test "continue" \
"Continuing.*\[Ww\]atchpoint.*deleted.*\(main \\(\\) \|21.*\}\).*" \
- "first instance watchpoint deleted when leaving scope"] then {
- gdb_suppress_tests
- }
+ "first instance watchpoint deleted when leaving scope"
}
- gdb_stop_suppressing_tests
}
# Preserve the old timeout, and set a new one that should be
diff --git a/gdb/testsuite/gdb.base/scope.exp b/gdb/testsuite/gdb.base/scope.exp
index 6f290e4..edf9811 100644
--- a/gdb/testsuite/gdb.base/scope.exp
+++ b/gdb/testsuite/gdb.base/scope.exp
@@ -48,107 +48,51 @@ proc test_at_main {} {
gdb_test "next" "$decimal.*foo \\(\\);" "next over init0() in main"
# Print scope0.c::filelocal, which is 1
-
- if [gdb_test "print filelocal" "\\\$$decimal = 1"] {
- gdb_suppress_tests
- }
-
-
- if [gdb_test "print 'scope0.c'::filelocal" "\\\$$decimal = 1" "print 'scope0.c'::filelocal at main" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal"] {
- gdb_suppress_tests
- }
-
+ gdb_test "print filelocal" "\\\$$decimal = 1"
+ gdb_test "print 'scope0.c'::filelocal" "\\\$$decimal = 1" "print 'scope0.c'::filelocal at main" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal"
# Print scope0.c::filelocal_bss, which is 101
-
- if [gdb_test "print filelocal_bss" "\\\$$decimal = 101"] {
- gdb_suppress_tests
- }
-
-
- if [gdb_test "print 'scope0.c'::filelocal_bss" "\\\$$decimal = 101" "print 'scope0.c'::filelocal_bss in test_at_main" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_bss"] {
- gdb_suppress_tests
- }
-
+ gdb_test "print filelocal_bss" "\\\$$decimal = 101"
+ gdb_test "print 'scope0.c'::filelocal_bss" "\\\$$decimal = 101" "print 'scope0.c'::filelocal_bss in test_at_main" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_bss"
# Print scope0.c::filelocal_ro, which is 201
# No clue why the rs6000 fails this test.
if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
- if [gdb_test "print filelocal_ro" "\\\$$decimal = 201" "print filelocal_ro in test_at_main" ] {
- gdb_suppress_tests
- }
-
+ gdb_test "print filelocal_ro" "\\\$$decimal = 201" "print filelocal_ro in test_at_main"
if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
- if [gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_ro"] {
- gdb_suppress_tests
- }
-
+ gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_ro"
# Print scope1.c::filelocal, which is 2
-
if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
- if [gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal"] {
- gdb_suppress_tests
- }
-
+ gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal"
# Print scope1.c::filelocal_bss, which is 102
-
if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
- if [gdb_test "print 'scope1.c'::filelocal_bss" "\\\$$decimal = 102" "print 'scope1.c'::filelocal_bss" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_bss"] {
- gdb_suppress_tests
- }
-
+ gdb_test "print 'scope1.c'::filelocal_bss" "\\\$$decimal = 102" "print 'scope1.c'::filelocal_bss" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_bss"
# Print scope1.c::filelocal_ro, which is 202
-
if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
- if [gdb_test "print 'scope1.c'::filelocal_ro" "\\\$$decimal = 202" "print 'scope1.c'::filelocal_ro" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_ro"] {
- gdb_suppress_tests
- }
-
+ gdb_test "print 'scope1.c'::filelocal_ro" "\\\$$decimal = 202" "print 'scope1.c'::filelocal_ro" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_ro"
# Print scope1.c::foo::funclocal, which is 3
-
- if [gdb_test "print foo::funclocal" "\\\$$decimal = 3"] {
- gdb_suppress_tests
- }
-
+ gdb_test "print foo::funclocal" "\\\$$decimal = 3"
if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
- if [gdb_test "print 'scope1.c'::foo::funclocal" "\\\$$decimal = 3" "print 'scope1.c'::foo::funclocal" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal"] {
- gdb_suppress_tests
- }
-
+ gdb_test "print 'scope1.c'::foo::funclocal" "\\\$$decimal = 3" "print 'scope1.c'::foo::funclocal" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal"
# Print scope1.c::foo::funclocal_ro, which is 203
-
- if [gdb_test "print foo::funclocal_ro" "\\\$$decimal = 203"] {
- gdb_suppress_tests
- }
-
+ gdb_test "print foo::funclocal_ro" "\\\$$decimal = 203"
if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
- if [gdb_test "print 'scope1.c'::foo::funclocal_ro" "\\\$$decimal = 203" "print 'scope1.c'::foo::funclocal_ro" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_ro"] {
- gdb_suppress_tests
- }
-
+ gdb_test "print 'scope1.c'::foo::funclocal_ro" "\\\$$decimal = 203" "print 'scope1.c'::foo::funclocal_ro" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_ro"
# Print scope1.c::bar::funclocal, which is 4
-
- if [gdb_test "print bar::funclocal" "\\\$$decimal = 4"] {
- gdb_suppress_tests
- }
-
+ gdb_test "print bar::funclocal" "\\\$$decimal = 4"
if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
- if [gdb_test "print 'scope1.c'::bar::funclocal" "\\\$$decimal = 4" "print 'scope1.c'::bar::funclocal" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal"] {
- gdb_suppress_tests
- }
- gdb_stop_suppressing_tests
-
+ gdb_test "print 'scope1.c'::bar::funclocal" "\\\$$decimal = 4" "print 'scope1.c'::bar::funclocal" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal"
}
proc test_at_foo {} {
@@ -158,42 +102,24 @@ proc test_at_foo {} {
global srcdir
global subdir
- if [gdb_test "next" ".*bar \\(\\);" "" ] {
- gdb_suppress_tests
- }
-
+ gdb_test "next" ".*bar \\(\\);"
# Print scope0.c::filelocal, which is 1
-
- if [gdb_test "print 'scope0.c'::filelocal" "\\\$$decimal = 1" "print 'scope0.c'::filelocal at foo" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal"] {
- gdb_suppress_tests
- }
-
+ gdb_test "print 'scope0.c'::filelocal" "\\\$$decimal = 1" "print 'scope0.c'::filelocal at foo" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal"
# Print scope0.c::filelocal_bss, which is 101
-
- if [gdb_test "print 'scope0.c'::filelocal_bss" "\\\$$decimal = 101" "print 'scope0.c'::filelocal_bss in test_at_foo" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_bss"] {
- gdb_suppress_tests
- }
-
+ gdb_test "print 'scope0.c'::filelocal_bss" "\\\$$decimal = 101" "print 'scope0.c'::filelocal_bss in test_at_foo" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_bss"
# Print scope0.c::filelocal_ro, which is 201
-
if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
- if [gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_ro"] {
- gdb_suppress_tests
- }
+ gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_ro"
- gdb_test "print filelocal" "\\\$$decimal = 2" "print filelocal at foo"
-
# Print scope1.c::filelocal, which is 2
+ gdb_test "print filelocal" "\\\$$decimal = 2" "print filelocal at foo"
if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
- if [gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal at foo" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal"] {
- gdb_suppress_tests
- }
-
+ gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal at foo" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal"
gdb_test "print filelocal_bss" "\\\$$decimal = 102" \
"print filelocal_bss at foo"
@@ -251,7 +177,6 @@ proc test_at_foo {} {
if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::bar::funclocal" "\\\$$decimal = 4" "print 'scope1.c'::bar::funclocal at foo" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal"
- gdb_stop_suppressing_tests
}
@@ -262,147 +187,67 @@ proc test_at_bar {} {
global srcdir
global subdir
- if [gdb_test "next" ".*" "" ] {
- gdb_suppress_tests
- }
-
+ gdb_test "next"
# Print scope0.c::filelocal, which is 1
+ gdb_test "print 'scope0.c'::filelocal" "\\\$$decimal = 1" "print 'scope0.c'::filelocal at bar" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal"
- if [gdb_test "print 'scope0.c'::filelocal" "\\\$$decimal = 1" "print 'scope0.c'::filelocal at bar" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal"] {
- gdb_suppress_tests
- }
-
-
- # Print scope0.c::filelocal_bss, which is 101
-
- if [gdb_test "print 'scope0.c'::filelocal_bss" "\\\$$decimal = 101" "print 'scope0.c'::filelocal_bss in test_at_bar" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_bss"] {
- gdb_suppress_tests
- }
-
-
- # Print scope0.c::filelocal_ro, which is 201
+ # Print scope0.c::filelocal_bss, which is 101
+ gdb_test "print 'scope0.c'::filelocal_bss" "\\\$$decimal = 101" "print 'scope0.c'::filelocal_bss in test_at_bar" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_bss"
+ # Print scope0.c::filelocal_ro, which is 201
if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
- if [gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro at bar" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_ro"] {
- gdb_suppress_tests
- }
-
+ gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro at bar" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_ro"
# Print scope1.c::filelocal, which is 2
-
- if [gdb_test "print filelocal" "\\\$$decimal = 2" "print filelocal at bar" ] {
- gdb_suppress_tests
- }
-
+ gdb_test "print filelocal" "\\\$$decimal = 2" "print filelocal at bar"
if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
- if [gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal"] {
- gdb_suppress_tests
- }
-
+ gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal"
# Print scope1.c::filelocal_bss, which is 102
-
- if [gdb_test "print filelocal_bss" "\\\$$decimal = 102" "print filelocal_bss at bar" ] {
- gdb_suppress_tests
- }
-
+ gdb_test "print filelocal_bss" "\\\$$decimal = 102" "print filelocal_bss at bar"
if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
- if [gdb_test "print 'scope1.c'::filelocal_bss" "\\\$$decimal = 102" "print 'scope1.c'::filelocal_bss at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_bss"] {
- gdb_suppress_tests
- }
-
+ gdb_test "print 'scope1.c'::filelocal_bss" "\\\$$decimal = 102" "print 'scope1.c'::filelocal_bss at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_bss"
# Print scope1.c::filelocal_ro, which is 202
-
- if [gdb_test "print filelocal_ro" "\\\$$decimal = 202" "print filelocal_ro in test_at_bar" ] {
- gdb_suppress_tests
- }
-
+ gdb_test "print filelocal_ro" "\\\$$decimal = 202" "print filelocal_ro in test_at_bar"
if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
- if [gdb_test "print 'scope1.c'::filelocal_ro" "\\\$$decimal = 202" "print 'scope1.c'::filelocal_ro at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_ro"] {
- gdb_suppress_tests
- }
-
+ gdb_test "print 'scope1.c'::filelocal_ro" "\\\$$decimal = 202" "print 'scope1.c'::filelocal_ro at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_ro"
# Print scope1.c::foo::funclocal, which is 3
-
- if [gdb_test "print foo::funclocal" "\\\$$decimal = 3" "print foo::funclocal at bar" ] {
- gdb_suppress_tests
- }
-
+ gdb_test "print foo::funclocal" "\\\$$decimal = 3" "print foo::funclocal at bar"
if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
- if [gdb_test "print 'scope1.c'::foo::funclocal" "\\\$$decimal = 3" "print 'scope1.c'::foo::funclocal at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal"] {
- gdb_suppress_tests
- }
-
+ gdb_test "print 'scope1.c'::foo::funclocal" "\\\$$decimal = 3" "print 'scope1.c'::foo::funclocal at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal"
# Print scope1.c::foo::funclocal_bss, which is 103
-
- if [gdb_test "print foo::funclocal_bss" "\\\$$decimal = 103" "print foo::funclocal_bss at bar" ] {
- gdb_suppress_tests
- }
-
+ gdb_test "print foo::funclocal_bss" "\\\$$decimal = 103" "print foo::funclocal_bss at bar"
if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
- if [gdb_test "print 'scope1.c'::foo::funclocal_bss" "\\\$$decimal = 103" "print 'scope1.c'::foo::funclocal_bss at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_bss"] {
- gdb_suppress_tests
- }
-
+ gdb_test "print 'scope1.c'::foo::funclocal_bss" "\\\$$decimal = 103" "print 'scope1.c'::foo::funclocal_bss at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_bss"
# Print scope1.c::foo::funclocal_ro, which is 203
-
- if [gdb_test "print foo::funclocal_ro" "\\\$$decimal = 203" "print foo::funclocal_ro at bar" ] {
- gdb_suppress_tests
- }
-
+ gdb_test "print foo::funclocal_ro" "\\\$$decimal = 203" "print foo::funclocal_ro at bar"
if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
- if [gdb_test "print 'scope1.c'::foo::funclocal_ro" "\\\$$decimal = 203" "print 'scope1.c'::foo::funclocal_ro at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_ro"] {
- gdb_suppress_tests
- }
-
+ gdb_test "print 'scope1.c'::foo::funclocal_ro" "\\\$$decimal = 203" "print 'scope1.c'::foo::funclocal_ro at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_ro"
# Print scope1.c::bar::funclocal, which is 4
-
- if [gdb_test "print funclocal" "\\\$$decimal = 4" "print funclocal at bar" ] {
- gdb_suppress_tests
- }
-
-
- if [gdb_test "print bar::funclocal" "\\\$$decimal = 4" "print bar::funclocal at bar" ] {
- gdb_suppress_tests
- }
-
+ gdb_test "print funclocal" "\\\$$decimal = 4" "print funclocal at bar"
+ gdb_test "print bar::funclocal" "\\\$$decimal = 4" "print bar::funclocal at bar"
if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
- if [gdb_test "print 'scope1.c'::bar::funclocal" "\\\$$decimal = 4" "print 'scope1.c'::bar::funclocal at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal"] {
- gdb_suppress_tests
- }
-
+ gdb_test "print 'scope1.c'::bar::funclocal" "\\\$$decimal = 4" "print 'scope1.c'::bar::funclocal at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal"
# Print scope1.c::bar::funclocal_bss, which is 104
-
- if [gdb_test "print funclocal_bss" "\\\$$decimal = 104" "print funclocal_bss at bar" ] {
- gdb_suppress_tests
- }
-
-
- if [gdb_test "print bar::funclocal_bss" "\\\$$decimal = 104" "print bar::funclocal_bss at bar" ] {
- gdb_suppress_tests
- }
-
+ gdb_test "print funclocal_bss" "\\\$$decimal = 104" "print funclocal_bss at bar"
+ gdb_test "print bar::funclocal_bss" "\\\$$decimal = 104" "print bar::funclocal_bss at bar"
if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
- if [gdb_test "print 'scope1.c'::bar::funclocal_bss" "\\\$$decimal = 104" "print 'scope1.c'::bar::funclocal_bss at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal_bss"] {
- gdb_suppress_tests
- }
- gdb_stop_suppressing_tests
-
+ gdb_test "print 'scope1.c'::bar::funclocal_bss" "\\\$$decimal = 104" "print 'scope1.c'::bar::funclocal_bss at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal_bss"
}
# This test has little to do with local scopes, but it is in scope.exp anyway.
@@ -418,20 +263,12 @@ proc test_at_autovars {} {
gdb_breakpoint marker1
- if [gdb_test "cont" "Break.* marker1 \\(\\) at .*:$decimal.*" "continue to marker1"] {
- gdb_suppress_tests
- }
-
- if [gdb_test "up" ".*autovars.*" "up from marker1 in scope.exp" ] {
- gdb_suppress_tests
- }
+ gdb_test "cont" "Break.* marker1 \\(\\) at .*:$decimal.*" "continue to marker1"
+ gdb_test "up" ".*autovars.*" "up from marker1 in scope.exp"
set count 0
while {$count < 100} {
- if [gdb_test "print i$count" ".* = $count" "" ] {
- gdb_suppress_tests
- }
-
+ gdb_test "print i$count" ".* = $count" ""
set count [expr $count+1]
}
clear_xfail "*-*-*"
@@ -451,12 +288,8 @@ proc test_at_localscopes {} {
gdb_breakpoint marker3
gdb_breakpoint marker4
- if [gdb_test "cont" "Break.* marker2 \\(\\) at .*:$decimal.*" "continue to marker2"] {
- gdb_suppress_tests
- }
- if [gdb_test "up" ".*localscopes.*" "up from marker2 in scopes.exp" ] {
- gdb_suppress_tests
- }
+ gdb_test "cont" "Break.* marker2 \\(\\) at .*:$decimal.*" "continue to marker2"
+ gdb_test "up" ".*localscopes.*" "up from marker2 in scopes.exp"
# Should be at first (outermost) scope. Check values.
@@ -467,11 +300,9 @@ proc test_at_localscopes {} {
gdb_test "print localval3" "No symbol \"localval3\" in current context." \
"print localval3, outer scope"
- if [gdb_test "cont" "Break.* marker3 \\(\\) at .*:$decimal.*" \
- "continue to marker3 in scope.exp"] then { gdb_suppress_tests }
- if [gdb_test "up" ".*localscopes.*" "up from marker3 in scope.exp"] {
- gdb_suppress_tests
- }
+ gdb_test "cont" "Break.* marker3 \\(\\) at .*:$decimal.*" \
+ "continue to marker3 in scope.exp"
+ gdb_test "up" ".*localscopes.*" "up from marker3 in scope.exp"
# Should be at next (first nested) scope. Check values.
@@ -484,17 +315,14 @@ proc test_at_localscopes {} {
# This test will only fail if the file was compiled by gcc, but
# there's no way to check that.
- if [gdb_test "cont" "Break.* marker4.*at .*:$decimal.*" \
- "continue to marker4 in scope.exp"] then { gdb_suppress_tests }
- if [gdb_test "up" ".*localscopes.*" "up from marker4 in scope.exp"] {
- gdb_suppress_tests
- }
+ gdb_test "cont" "Break.* marker4.*at .*:$decimal.*" \
+ "continue to marker4 in scope.exp"
+ gdb_test "up" ".*localscopes.*" "up from marker4 in scope.exp"
gdb_test "print localval" " = 30" "print localval, innermost scope"
gdb_test "print localval1" " = 11" "print localval1, innermost scope"
gdb_test "print localval2" " = 12" "print localval2, innermost scope"
gdb_test "print localval3" " = 13" "print localval3, innermost scope"
- gdb_stop_suppressing_tests
}
# Note, we don't pass a binfile to clean_restart because we need to
diff --git a/gdb/testsuite/gdb.base/sepdebug.exp b/gdb/testsuite/gdb.base/sepdebug.exp
index 4b99da7..be36cc9 100644
--- a/gdb/testsuite/gdb.base/sepdebug.exp
+++ b/gdb/testsuite/gdb.base/sepdebug.exp
@@ -489,22 +489,22 @@ proc test_next_with_recursion {} {
# Continue until we call factorial recursively with 5.
- if [gdb_test "continue" \
+ gdb_test "continue" \
"Continuing.*Break.* factorial .value=5. .*" \
- "continue to factorial(5)"] then { gdb_suppress_tests }
+ "continue to factorial(5)"
# Do a backtrace just to confirm how many levels deep we are.
- if [gdb_test "backtrace" \
+ gdb_test "backtrace" \
"#0\[ \t\]+ factorial .value=5..*" \
- "backtrace from factorial(5)"] then { gdb_suppress_tests }
+ "backtrace from factorial(5)"
# Now a "next" should position us at the recursive call, which
# we will be performing with 4.
- if [gdb_test "next" \
+ gdb_test "next" \
".* factorial .value - 1.;.*" \
- "next to recursive call"] then { gdb_suppress_tests }
+ "next to recursive call"
# Disable the breakpoint at the entry to factorial by deleting them all.
# The "next" should run until we return to the next line from this
@@ -536,14 +536,13 @@ proc test_next_with_recursion {} {
# OK, we should be back in the same stack frame we started from.
# Do a backtrace just to confirm.
- set result [gdb_test "backtrace" \
+ gdb_test "backtrace" \
"#0\[ \t\]+ factorial .value=120.*\r\n#1\[ \t\]+ \[0-9a-fx\]+ in factorial .value=6..*" \
- "backtrace from factorial(5.1)"]
- if { $result != 0 } { gdb_suppress_tests }
+ "backtrace from factorial(5.1)"
- if [target_info exists gdb,noresults] { gdb_suppress_tests }
- gdb_continue_to_end "recursive next test"
- gdb_stop_suppressing_tests
+ if { ![target_info exists gdb,noresults] } {
+ gdb_continue_to_end "recursive next test"
+ }
}
test_next_with_recursion
diff --git a/gdb/testsuite/gdb.base/structs.exp b/gdb/testsuite/gdb.base/structs.exp
index ec71e88..fcdde93 100644
--- a/gdb/testsuite/gdb.base/structs.exp
+++ b/gdb/testsuite/gdb.base/structs.exp
@@ -80,7 +80,7 @@ proc start_structs_test { types } {
# Advance to main
if { ![runto_main] } then {
- gdb_suppress_tests
+ return
}
# Get the debug format
diff --git a/gdb/testsuite/gdb.base/until.exp b/gdb/testsuite/gdb.base/until.exp
index 14425e7..446d712 100644
--- a/gdb/testsuite/gdb.base/until.exp
+++ b/gdb/testsuite/gdb.base/until.exp
@@ -44,7 +44,10 @@ gdb_test "until 80 then stop" \
"malformed until"
# Rerun up to factorial, outer invocation
-if { ![runto factorial] } then { gdb_suppress_tests; }
+if { ![runto factorial] } {
+ return
+}
+
delete_breakpoints
# At this point, 'until' should continue the inferior up to when all the
@@ -57,7 +60,10 @@ gdb_test "until $bp_location19" \
# Run to a function called by main
#
-if { ![runto marker2] } then { gdb_suppress_tests; }
+if { ![runto marker2] } {
+ return
+}
+
delete_breakpoints
# Now issue an until with another function, not called by the current
diff --git a/gdb/testsuite/gdb.cp/misc.exp b/gdb/testsuite/gdb.cp/misc.exp
index 1d43a71..aa83031 100644
--- a/gdb/testsuite/gdb.cp/misc.exp
+++ b/gdb/testsuite/gdb.cp/misc.exp
@@ -51,15 +51,11 @@ proc test_expr { args } {
}
set last_ent [expr [llength $args] - 1]
set testname [lindex $args $last_ent]
- if [gdb_test_no_output [lindex $args 0] "$testname (setup)"] {
- gdb_suppress_tests
- }
+ gdb_test_no_output [lindex $args 0] "$testname (setup)"
+
for {set x 1} {$x < $last_ent} {set x [expr $x + 2]} {
- if [gdb_test [lindex $args $x] [lindex $args [expr $x + 1]] "$testname ([lindex $args $x])"] {
- gdb_suppress_tests
- }
+ gdb_test [lindex $args $x] [lindex $args [expr $x + 1]] "$testname ([lindex $args $x])"
}
- gdb_stop_suppressing_tests
}
proc do_tests {} {
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 23792e0..3eebfa1 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -1029,13 +1029,7 @@ proc gdb_test_multiple { command message args } {
if { $foo < [expr $len - 1] } {
set str [string range "$string" 0 $foo]
if { [send_gdb "$str"] != "" } {
- global suppress_flag
-
- if { ! $suppress_flag } {
- perror "Couldn't send $command to GDB."
- }
- fail "$message"
- return $result
+ perror "Couldn't send $command to GDB."
}
# since we're checking if each line of the multi-line
# command are 'accepted' by GDB here,
@@ -1054,13 +1048,7 @@ proc gdb_test_multiple { command message args } {
}
if { "$string" != "" } {
if { [send_gdb "$string"] != "" } {
- global suppress_flag
-
- if { ! $suppress_flag } {
- perror "Couldn't send $command to GDB."
- }
- fail "$message"
- return $result
+ perror "Couldn't send $command to GDB."
}
}
}
@@ -1076,7 +1064,6 @@ proc gdb_test_multiple { command message args } {
if { $message != "" } {
fail "$message"
}
- gdb_suppress_entire_file "GDB died"
set result -1
}
}
@@ -1804,8 +1791,6 @@ proc default_gdb_exit {} {
global gdb_spawn_id inferior_spawn_id
global inotify_log_file
- gdb_stop_suppressing_tests
-
if ![info exists gdb_spawn_id] {
return
}
@@ -1978,8 +1963,6 @@ proc default_gdb_spawn { } {
global INTERNAL_GDBFLAGS GDBFLAGS
global gdb_spawn_id
- gdb_stop_suppressing_tests
-
# Set the default value, it may be overriden later by specific testfile.
#
# Use `set_board_info use_gdb_stub' for the board file to flag the inferior
@@ -4611,10 +4594,6 @@ proc gdb_compile_openmp {source dest type options} {
# For options for TYPE see gdb_stdin_log_write
proc send_gdb { string {type standard}} {
- global suppress_flag
- if { $suppress_flag } {
- return "suppressed"
- }
gdb_stdin_log_write $string $type
return [remote_send host "$string"]
}
@@ -4650,25 +4629,8 @@ proc gdb_expect { args } {
set tmt [get_largest_timeout]
}
- global suppress_flag
- global remote_suppress_flag
- if [info exists remote_suppress_flag] {
- set old_val $remote_suppress_flag
- }
- if [info exists suppress_flag] {
- if { $suppress_flag } {
- set remote_suppress_flag 1
- }
- }
set code [catch \
{uplevel remote_expect host $tmt $expcode} string]
- if [info exists old_val] {
- set remote_suppress_flag $old_val
- } else {
- if [info exists remote_suppress_flag] {
- unset remote_suppress_flag
- }
- }
if {$code == 1} {
global errorInfo errorCode
@@ -4694,13 +4656,9 @@ proc gdb_expect { args } {
proc gdb_expect_list {test sentinel list} {
global gdb_prompt
- global suppress_flag
set index 0
set ok 1
- if { $suppress_flag } {
- set ok 0
- unresolved "${test}"
- }
+
while { ${index} < [llength ${list}] } {
set pattern [lindex ${list} ${index}]
set index [expr ${index} + 1]
@@ -4761,58 +4719,6 @@ proc gdb_expect_list {test sentinel list} {
}
}
-#
-#
-proc gdb_suppress_entire_file { reason } {
- global suppress_flag
-
- warning "$reason\n"
- set suppress_flag -1
-}
-
-#
-# Set suppress_flag, which will cause all subsequent calls to send_gdb and
-# gdb_expect to fail immediately (until the next call to
-# gdb_stop_suppressing_tests).
-#
-proc gdb_suppress_tests { args } {
- global suppress_flag
-
- return; # fnf - disable pending review of results where
- # testsuite ran better without this
- incr suppress_flag
-
- if { $suppress_flag == 1 } {
- if { [llength $args] > 0 } {
- warning "[lindex $args 0]\n"
- } else {
- warning "Because of previous failure, all subsequent tests in this group will automatically fail.\n"
- }
- }
-}
-
-#
-# Clear suppress_flag.
-#
-proc gdb_stop_suppressing_tests { } {
- global suppress_flag
-
- if [info exists suppress_flag] {
- if { $suppress_flag > 0 } {
- set suppress_flag 0
- clone_output "Tests restarted.\n"
- }
- } else {
- set suppress_flag 0
- }
-}
-
-proc gdb_clear_suppressed { } {
- global suppress_flag
-
- set suppress_flag 0
-}
-
# Spawn the gdb process.
#
# This doesn't expect any output or do any other initialization,
@@ -5323,8 +5229,6 @@ proc default_gdb_init { test_file_name } {
set cleanfiles {}
- gdb_clear_suppressed
-
set gdb_test_file_name [file rootname [file tail $test_file_name]]
# Make sure that the wrapper is rebuilt
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index c65ac4f..d1c87dc 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -61,8 +61,6 @@ proc mi_uncatched_gdb_exit {} {
global mi_gdb_prompt
global MIFLAGS
- gdb_stop_suppressing_tests
-
if { [info procs sid_exit] != "" } {
sid_exit
}
@@ -232,7 +230,6 @@ proc default_mi_gdb_start { args } {
return [eval mi_gdb_start_separate_mi_tty $args]
}
- gdb_stop_suppressing_tests
set inferior_pty no-tty
# Set the default value, it may be overriden later by specific testfile.
@@ -390,11 +387,6 @@ proc mi_gdb_reinitialize_dir { subdir } {
global mi_gdb_prompt
global MIFLAGS
- global suppress_flag
- if { $suppress_flag } {
- return
- }
-
if [is_remote host] {
return ""
}
@@ -729,13 +721,7 @@ proc mi_gdb_test { args } {
if { $foo < [expr $len - 1] } {
set str [string range "$string" 0 $foo]
if { [send_gdb "$str"] != "" } {
- global suppress_flag
-
- if { ! $suppress_flag } {
- perror "Couldn't send $command to GDB."
- }
- fail "$message"
- return $result
+ perror "Couldn't send $command to GDB."
}
gdb_expect 2 {
-re "\[\r\n\]" { }
@@ -748,13 +734,7 @@ proc mi_gdb_test { args } {
}
if { "$string" != "" } {
if { [send_gdb "$string"] != "" } {
- global suppress_flag
-
- if { ! $suppress_flag } {
- perror "Couldn't send $command to GDB."
- }
- fail "$message"
- return $result
+ perror "Couldn't send $command to GDB."
}
}
}
@@ -780,7 +760,6 @@ proc mi_gdb_test { args } {
if { $message != "" } {
fail "$message"
}
- gdb_suppress_entire_file "GDB died"
return -1
}
-re "Ending remote debugging.*$mi_gdb_prompt\[ \]*$" {
@@ -940,10 +919,6 @@ proc mi_gdb_expect_cli_output {until message} {
# If USE_MI_COMMAND is false, they are effectively arguments passed
# to the test program. If the global USE_GDB_STUB is true, ARGS is not used.
proc mi_run_cmd_full {use_mi_command args} {
- global suppress_flag
- if { $suppress_flag } {
- return -1
- }
global mi_gdb_prompt use_gdb_stub
global thread_selected_re
global library_loaded_re
@@ -1077,7 +1052,7 @@ proc mi_clean_restart { args } {
#
# FUNC is the linespec of the place to stop (it inserts a breakpoint here).
# It returns:
-# -1 if test suppressed, failed, timedout
+# -1 if failed, timedout
# 0 if test passed
#
# Supported options:
@@ -1085,11 +1060,6 @@ proc mi_clean_restart { args } {
# -qualified -- pass --qualified to -break-insert
proc mi_runto_helper {func run_or_continue args} {
- global suppress_flag
- if { $suppress_flag } {
- return -1
- }
-
global mi_gdb_prompt expect_out
global hex decimal fullname_syntax
@@ -1359,11 +1329,6 @@ proc mi_expect_interrupt { test } {
# after the first prompt is printed.
proc mi_execute_to { cmd reason func args file line extra test } {
- global suppress_flag
- if { $suppress_flag } {
- return -1
- }
-
mi_send_resuming_command "$cmd" "$test"
set r [mi_expect_stop $reason $func $args $file $line $extra $test]
return $r
diff --git a/gdb/testsuite/lib/prompt.exp b/gdb/testsuite/lib/prompt.exp
index c2583a2..c13fe11 100644
--- a/gdb/testsuite/lib/prompt.exp
+++ b/gdb/testsuite/lib/prompt.exp
@@ -31,8 +31,6 @@ proc default_prompt_gdb_start { } {
global timeout
global gdb_spawn_id
- gdb_stop_suppressing_tests
-
verbose "Spawning $GDB $INTERNAL_GDBFLAGS $GDBFLAGS"
if [info exists gdb_spawn_id] {