From a8d52276eef1d657f8bb0a72341e780e9f279855 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Wed, 2 Jun 2010 20:03:16 +0000 Subject: [PATCH] 2010-06-02 Michael Snyder * gdb.cp/class2.exp: Use gdb_test_no_output. * gdb.cp/classes.exp: Ditto. * gdb.cp/extern-c.exp: Ditto. * gdb.cp/inherit.exp: Ditto. * gdb.cp/maint.exp: Ditto. * gdb.cp/mb-inline.exp: Ditto. * gdb.cp/mb-templates.exp: Ditto. * gdb.cp/method2.exp: Ditto. * gdb.cp/misc.exp: Ditto. * gdb.cp/ovldbreak.exp: Ditto. * gdb.cp/punctuator.exp: Ditto. * gdb.cp/templates.exp: Ditto. * gdb.cp/virtbase.exp: Ditto. --- gdb/testsuite/ChangeLog | 14 ++++++++++++++ gdb/testsuite/gdb.cp/class2.exp | 4 ++-- gdb/testsuite/gdb.cp/classes.exp | 4 ++-- gdb/testsuite/gdb.cp/extern-c.exp | 2 +- gdb/testsuite/gdb.cp/inherit.exp | 4 ++-- gdb/testsuite/gdb.cp/maint.exp | 2 +- gdb/testsuite/gdb.cp/mb-inline.exp | 2 +- gdb/testsuite/gdb.cp/mb-templates.exp | 8 ++++---- gdb/testsuite/gdb.cp/method2.exp | 2 +- gdb/testsuite/gdb.cp/misc.exp | 2 +- gdb/testsuite/gdb.cp/ovldbreak.exp | 6 +++--- gdb/testsuite/gdb.cp/punctuator.exp | 14 +++++++------- gdb/testsuite/gdb.cp/templates.exp | 2 +- gdb/testsuite/gdb.cp/virtbase.exp | 2 +- 14 files changed, 41 insertions(+), 27 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 5b0a76d7560..096361ed3d3 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,19 @@ 2010-06-02 Michael Snyder + * gdb.cp/class2.exp: Use gdb_test_no_output. + * gdb.cp/classes.exp: Ditto. + * gdb.cp/extern-c.exp: Ditto. + * gdb.cp/inherit.exp: Ditto. + * gdb.cp/maint.exp: Ditto. + * gdb.cp/mb-inline.exp: Ditto. + * gdb.cp/mb-templates.exp: Ditto. + * gdb.cp/method2.exp: Ditto. + * gdb.cp/misc.exp: Ditto. + * gdb.cp/ovldbreak.exp: Ditto. + * gdb.cp/punctuator.exp: Ditto. + * gdb.cp/templates.exp: Ditto. + * gdb.cp/virtbase.exp: Ditto. + * gdb.threads/attach-stopped.exp: Replace uses of send_gdb / gdb_expect. * gdb.threads/attachstop-mt.exp: diff --git a/gdb/testsuite/gdb.cp/class2.exp b/gdb/testsuite/gdb.cp/class2.exp index 96e5df3cb9d..f7ebbf35775 100644 --- a/gdb/testsuite/gdb.cp/class2.exp +++ b/gdb/testsuite/gdb.cp/class2.exp @@ -42,7 +42,7 @@ gdb_load ${binfile} # Start with "set print object off". -gdb_test "set print object off" "" +gdb_test_no_output "set print object off" if ![runto_main] then { perror "couldn't run to main" @@ -118,7 +118,7 @@ gdb_test "p e" "= \{\}" "print object with no data fields" # Printing NULL pointers with "set print object on" -gdb_test "set print object on" "" +gdb_test_no_output "set print object on" gdb_test "p acp" "= \\(C \\*\\) ${hex}" gdb_test "p acp->c1" "\\(A \\*\\) 0x0" gdb_test "p acp->c2" "\\(A \\*\\) ${hex}f" diff --git a/gdb/testsuite/gdb.cp/classes.exp b/gdb/testsuite/gdb.cp/classes.exp index d004011da4d..7591adaa350 100644 --- a/gdb/testsuite/gdb.cp/classes.exp +++ b/gdb/testsuite/gdb.cp/classes.exp @@ -528,7 +528,7 @@ proc test_static_members {} { gdb_test "print &Bar::st" "\\$\[0-9\]+ = \\(int ?\\*\\) $hex" gdb_test "print *\$" "\\$\[0-9\]+ = 200" - gdb_test "set print static-members off" "" + gdb_test_no_output "set print static-members off" gdb_test "print csi" \ "{x = 10, y = 20}" \ "print csi without static members" @@ -536,7 +536,7 @@ proc test_static_members {} { "{x = 30, y = 40}" \ "print cnsi without static members" - gdb_test "set print static-members on" "" + gdb_test_no_output "set print static-members on" gdb_test "print csi" \ "{x = 10, y = 20, static null = {x = 0, y = 0, static null = }}" \ "print csi with static members" diff --git a/gdb/testsuite/gdb.cp/extern-c.exp b/gdb/testsuite/gdb.cp/extern-c.exp index 275ef2d976c..7416f54a661 100644 --- a/gdb/testsuite/gdb.cp/extern-c.exp +++ b/gdb/testsuite/gdb.cp/extern-c.exp @@ -40,7 +40,7 @@ if { [gdb_breakpoint "c_func"] == 1 } { } gdb_continue_to_breakpoint "c_func" ".*c_func.*" -gdb_test "set \$counter = 0" "" "initialize counter" +gdb_test_no_output "set \$counter = 0" "initialize counter" gdb_test "rbreak c_funcs" \ "Breakpoint.* at .*c_funcs_1.*Breakpoint.* at .*c_funcs_2.*" diff --git a/gdb/testsuite/gdb.cp/inherit.exp b/gdb/testsuite/gdb.cp/inherit.exp index 183aa0056de..6c3bbbd4fd4 100644 --- a/gdb/testsuite/gdb.cp/inherit.exp +++ b/gdb/testsuite/gdb.cp/inherit.exp @@ -728,8 +728,8 @@ proc do_tests { } { gdb_reinitialize_dir $srcdir/$subdir gdb_load $binfile - gdb_test "set language c++" "" - gdb_test "set width 0" "" + gdb_test_no_output "set language c++" + gdb_test_no_output "set width 0" if { ![runto_main] } then { perror "couldn't run to main" diff --git a/gdb/testsuite/gdb.cp/maint.exp b/gdb/testsuite/gdb.cp/maint.exp index 153bf734555..ea7111d2522 100644 --- a/gdb/testsuite/gdb.cp/maint.exp +++ b/gdb/testsuite/gdb.cp/maint.exp @@ -62,7 +62,7 @@ proc test_first_component {} { # The function in question might complain; make sure that we see # all complaints. - gdb_test "set complaints 1000" "" + gdb_test_no_output "set complaints 1000" test_single_component "foo" test_single_component "operator<<" diff --git a/gdb/testsuite/gdb.cp/mb-inline.exp b/gdb/testsuite/gdb.cp/mb-inline.exp index 292d6ac4e79..aa36f9586b5 100644 --- a/gdb/testsuite/gdb.cp/mb-inline.exp +++ b/gdb/testsuite/gdb.cp/mb-inline.exp @@ -86,7 +86,7 @@ gdb_test "continue" \ # that at least in simple cases, the enable/disable # state of locations survive "run". # Early bug would disable 1.1 and enable 1.2 when program is run. -gdb_test "disable 1.2" "" "disabling location: disable" +gdb_test_no_output "disable 1.2" "disabling location: disable" gdb_run_cmd gdb_expect { diff --git a/gdb/testsuite/gdb.cp/mb-templates.exp b/gdb/testsuite/gdb.cp/mb-templates.exp index a88d2bcaed1..6185f925c23 100644 --- a/gdb/testsuite/gdb.cp/mb-templates.exp +++ b/gdb/testsuite/gdb.cp/mb-templates.exp @@ -83,7 +83,7 @@ gdb_test "break $srcfile:$bp_location" \ "Breakpoint.*at.* file .*$srcfile, line.*\\(2 locations\\).*" \ "separate condition: set breakpoint" -gdb_test "condition 1 i==1" "" \ +gdb_test_no_output "condition 1 i==1" \ "separate condition: set condition" gdb_run_cmd @@ -106,7 +106,7 @@ gdb_test "continue" \ # Try disabling a single location. We also test # that at least in simple cases, the enable/disable # state of locations surive "run". -gdb_test "disable 1.1" "" "disabling location: disable" +gdb_test_no_output "disable 1.1" "disabling location: disable" gdb_run_cmd gdb_expect { @@ -122,10 +122,10 @@ gdb_expect { } # Try disabling entire breakpoint -gdb_test "enable 1.1" "" "disabling location: enable" +gdb_test_no_output "enable 1.1" "disabling location: enable" -gdb_test "disable 1" "" "disable breakpoint: disable" +gdb_test_no_output "disable 1" "disable breakpoint: disable" gdb_run_cmd gdb_expect { diff --git a/gdb/testsuite/gdb.cp/method2.exp b/gdb/testsuite/gdb.cp/method2.exp index c5814cef437..9f34a15e4be 100644 --- a/gdb/testsuite/gdb.cp/method2.exp +++ b/gdb/testsuite/gdb.cp/method2.exp @@ -62,7 +62,7 @@ proc test_break { lang } { # We want in this test to double-check the contents of the multiple-choice # menu that's printed when a breakpoint location is ambiguous. So we need # to set multiple-symbols to "ask" first. -gdb_test "set multiple-symbols ask" "" +gdb_test_no_output "set multiple-symbols ask" test_break "c" test_break "c++" diff --git a/gdb/testsuite/gdb.cp/misc.exp b/gdb/testsuite/gdb.cp/misc.exp index cf22a48f8a2..14310201c7c 100644 --- a/gdb/testsuite/gdb.cp/misc.exp +++ b/gdb/testsuite/gdb.cp/misc.exp @@ -58,7 +58,7 @@ 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)"] { + if [gdb_test_no_output [lindex $args 0] "$testname (setup)"] { gdb_suppress_tests; } for {set x 1} {$x < $last_ent} {set x [expr $x + 2]} { diff --git a/gdb/testsuite/gdb.cp/ovldbreak.exp b/gdb/testsuite/gdb.cp/ovldbreak.exp index 13585dd10d3..ae870e16e46 100644 --- a/gdb/testsuite/gdb.cp/ovldbreak.exp +++ b/gdb/testsuite/gdb.cp/ovldbreak.exp @@ -146,7 +146,7 @@ append menu_overload1arg "> $" # Set multiple-symbols to "ask", to allow us to test the use # of the multiple-choice menu when breaking on an overloaded method. -gdb_test "set multiple-symbols ask" "" +gdb_test_no_output "set multiple-symbols ask" # Set breakpoints on foo::overload1arg, one by one. @@ -367,13 +367,13 @@ continue_to_bp_overloaded 1 14 "double" "arg=200" # Test breaking on an overloaded function when multiple-symbols # is set to "cancel" -gdb_test "set multiple-symbols cancel" "" +gdb_test_no_output "set multiple-symbols cancel" gdb_test "break foo::foofunc" \ "canceled.*" # Test breaking on an overloaded function when multiple-symbols # is set to "all" -gdb_test "set multiple-symbols all" "" +gdb_test_no_output "set multiple-symbols all" gdb_test "break foo::foofunc" \ "Breakpoint \[0-9\]+ at ${hex}: file .*ovldbreak\\.cc, line \[0-9\]+\\.\r\nBreakpoint \[0-9\]+ at ${hex}: file .*ovldbreak\\.cc, line \[0-9\]+\\.\r\nwarning: Multiple breakpoints were set\\.\r\nUse the \"delete\" command to delete unwanted breakpoints\\." diff --git a/gdb/testsuite/gdb.cp/punctuator.exp b/gdb/testsuite/gdb.cp/punctuator.exp index 7c32a1f531d..f592a5d72ea 100644 --- a/gdb/testsuite/gdb.cp/punctuator.exp +++ b/gdb/testsuite/gdb.cp/punctuator.exp @@ -26,7 +26,7 @@ if { [skip_cplus_tests] } { continue } gdb_exit gdb_start -gdb_test "set lang c++" "" +gdb_test_no_output "set lang c++" gdb_test "print (0x5a5a bitand 0xaaaa) == (0x5a5a & 0xaaaa)" " = true" gdb_test "print (0x5a5a bitor 0xaaaa) == (0x5a5a | 0xaaaa)" " = true" gdb_test "print (0x5a5a xor 0xaaaa) == (0x5a5a ^ 0xaaaa)" " = true" @@ -35,17 +35,17 @@ gdb_test "print (0x5a5a or 0xaaaa) == (0x5a5a || 0xaaaa)" " = true" gdb_test "print (not not 0xaaaa) == (!!0xaaaa)" " = true" gdb_test "print (compl 0xaaaa) == (~0xaaaa)" " = true" -gdb_test "set \$u = 0x5a5a" "" -gdb_test "set \$v = 0x5a5a" "" +gdb_test_no_output "set \$u = 0x5a5a" "set \$u 1" +gdb_test_no_output "set \$v = 0x5a5a" "set \$v 1" gdb_test "print (\$u not_eq 0xaaaa) == (\$v != 0xaaaa)" "= true" gdb_test "print (\$u and_eq 0xaaaa) == (\$v &= 0xaaaa)" "= true" -gdb_test "set \$u = 0x5a5a" "" -gdb_test "set \$v = 0x5a5a" "" +gdb_test_no_output "set \$u = 0x5a5a" "set \$u 2" +gdb_test_no_output "set \$v = 0x5a5a" "set \$v 2" gdb_test "print (\$u or_eq 0xaaaa) == (\$v |= 0xaaaa)" "= true" -gdb_test "set \$u = 0x5a5a" "" -gdb_test "set \$v = 0x5a5a" "" +gdb_test_no_output "set \$u = 0x5a5a" "set \$u 3" +gdb_test_no_output "set \$v = 0x5a5a" "set \$v 3" gdb_test "print (\$u xor_eq 0xaaaa) == (\$v ^= 0xaaaa)" "= true" gdb_exit diff --git a/gdb/testsuite/gdb.cp/templates.exp b/gdb/testsuite/gdb.cp/templates.exp index b8af47fe9c8..33cccc17cb5 100644 --- a/gdb/testsuite/gdb.cp/templates.exp +++ b/gdb/testsuite/gdb.cp/templates.exp @@ -213,7 +213,7 @@ proc do_tests {} { # Change multiple-symbols to "ask" in order to get the multiple-choice # menu when breaking on overloaded methods. - gdb_test "set multiple-symbols ask" "" + gdb_test_no_output "set multiple-symbols ask" runto_main diff --git a/gdb/testsuite/gdb.cp/virtbase.exp b/gdb/testsuite/gdb.cp/virtbase.exp index 3631db5394c..1f845a79f84 100644 --- a/gdb/testsuite/gdb.cp/virtbase.exp +++ b/gdb/testsuite/gdb.cp/virtbase.exp @@ -58,5 +58,5 @@ gdb_test "print *(D *) e" " = { = {v = 11}, _vptr.D = $hex}" # A regression test reported to Red Hat bugzilla, see: # https://bugzilla.redhat.com/show_bug.cgi?id=560741 -gdb_test "set print object on" "" +gdb_test_no_output "set print object on" gdb_test "print/x b->mA" " = 0xaaaaaaaa" -- 2.30.2