From d1e36019c1f5cc5de8b99dd86cacfbf418fc1c5b Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Thu, 31 Oct 2019 23:03:25 +0100 Subject: [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call (2) There's a pattern: ... gdb_test ... that can be written shorter as: ... gdb_test ... Detect this pattern in proc gdb_test: ... global gdb_prompt upvar timeout timeout if [llength $args]>2 then { set message [lindex $args 2] + if { $message == [lindex $args 0] && [llength $args] == 3 } { + error "HERE" + } } else { set message [lindex $args 0] } ... and fix all occurrences in some gdb testsuite subdirs. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2019-10-31 Tom de Vries * gdb.arch/amd64-disp-step-avx.exp: Drop superfluous 3rd argument to gdb_test. * gdb.arch/amd64-disp-step.exp: Same. * gdb.asm/asm-source.exp: Same. * gdb.btrace/buffer-size.exp: Same. * gdb.btrace/cpu.exp: Same. * gdb.btrace/enable.exp: Same. * gdb.dwarf2/count.exp: Same. * gdb.dwarf2/dw2-ranges-func.exp: Same. * gdb.dwarf2/dw2-ranges-psym.exp: Same. * gdb.fortran/vla-datatypes.exp: Same. * gdb.fortran/vla-history.exp: Same. * gdb.fortran/vla-ptype.exp: Same. * gdb.fortran/vla-value.exp: Same. * gdb.fortran/whatis_type.exp: Same. * gdb.guile/guile.exp: Same. * gdb.multi/tids.exp: Same. * gdb.python/py-finish-breakpoint.exp: Same. * gdb.python/py-framefilter.exp: Same. * gdb.python/py-pp-registration.exp: Same. * gdb.python/py-xmethods.exp: Same. * gdb.python/python.exp: Same. * gdb.server/connect-with-no-symbol-file.exp: Same. * gdb.server/no-thread-db.exp: Same. * gdb.server/run-without-local-binary.exp: Same. * gdb.stabs/weird.exp: Same. * gdb.threads/attach-many-short-lived-threads.exp: Same. * gdb.threads/thread-find.exp: Same. * gdb.threads/tls-shared.exp: Same. * gdb.threads/tls.exp: Same. * gdb.threads/wp-replication.exp: Same. * gdb.trace/ax.exp: Same. * lib/gdb.exp (gdb_test_exact, help_test_raw): Same. Change-Id: I2fa544c68f8c0099a77e03ff04ddc010eb2b6c7c --- gdb/testsuite/gdb.btrace/cpu.exp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'gdb/testsuite/gdb.btrace/cpu.exp') diff --git a/gdb/testsuite/gdb.btrace/cpu.exp b/gdb/testsuite/gdb.btrace/cpu.exp index 28f8c68..93ed0c6 100644 --- a/gdb/testsuite/gdb.btrace/cpu.exp +++ b/gdb/testsuite/gdb.btrace/cpu.exp @@ -42,11 +42,9 @@ proc test_junk { arg junk current } { gdb_test "show record btrace cpu" "btrace cpu is 'auto'\." "default cpu" gdb_test "set record" \ - "\"set record\" must be followed by an appropriate subcommand.*" \ - "set record" + "\"set record\" must be followed by an appropriate subcommand.*" gdb_test "set record btrace" \ - "\"set record btrace\" must be followed by an appropriate subcommand.*" \ - "set record btrace" + "\"set record btrace\" must be followed by an appropriate subcommand.*" test_bad "" "auto" test_good "intel: 0/0" -- cgit v1.1