diff options
author | Tom de Vries <tdevries@suse.de> | 2019-10-31 23:03:25 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2019-10-31 23:03:25 +0100 |
commit | d1e36019c1f5cc5de8b99dd86cacfbf418fc1c5b (patch) | |
tree | 49b43cdef154e5fc3e5e06dc6fe6849950ab723e /gdb/testsuite/gdb.trace | |
parent | 8d6efaa20d9b44cc016ae0f55aeceabcfe7d4e68 (diff) | |
download | gdb-d1e36019c1f5cc5de8b99dd86cacfbf418fc1c5b.zip gdb-d1e36019c1f5cc5de8b99dd86cacfbf418fc1c5b.tar.gz gdb-d1e36019c1f5cc5de8b99dd86cacfbf418fc1c5b.tar.bz2 |
[gdb/testsuite] Remove superfluous 3rd argument from gdb_test call (2)
There's a pattern:
...
gdb_test <command> <pattern> <command>
...
that can be written shorter as:
...
gdb_test <command> <pattern>
...
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 <tdevries@suse.de>
* 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
Diffstat (limited to 'gdb/testsuite/gdb.trace')
-rw-r--r-- | gdb/testsuite/gdb.trace/ax.exp | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/gdb/testsuite/gdb.trace/ax.exp b/gdb/testsuite/gdb.trace/ax.exp index f05689f..f0ff1f1 100644 --- a/gdb/testsuite/gdb.trace/ax.exp +++ b/gdb/testsuite/gdb.trace/ax.exp @@ -40,99 +40,99 @@ gdb_load $binfile runto_main gdb_reinitialize_dir $srcdir/$subdir -gdb_test "maint agent 12" ".*const8 12.*pop.*end.*" "maint agent 12" +gdb_test "maint agent 12" ".*const8 12.*pop.*end.*" -gdb_test "maint agent gdb_char_test" "" "maint agent gdb_char_test" +gdb_test "maint agent gdb_char_test" "" -gdb_test "maint agent gdb_arr_test\[12\]" "" "maint agent gdb_arr_test\[12\]" +gdb_test "maint agent gdb_arr_test\[12\]" "" -gdb_test "maint agent gdb_arr_test\[gdb_short_test\]" "" "maint agent gdb_arr_test\[gdb_short_test\]" +gdb_test "maint agent gdb_arr_test\[gdb_short_test\]" "" -gdb_test "maint agent gdb_struct1_test" "" "maint agent gdb_struct1_test" +gdb_test "maint agent gdb_struct1_test" "" -gdb_test "maint agent gdb_struct1_test.s" "" "maint agent gdb_struct1_test.s" +gdb_test "maint agent gdb_struct1_test.s" "" -gdb_test "maint agent gdb_struct1_test.arr\[gdb_struct1_test.c\]" "" "maint agent gdb_struct1_test.arr\[gdb_struct1_test.c\]" +gdb_test "maint agent gdb_struct1_test.arr\[gdb_struct1_test.c\]" "" -gdb_test "maint agent gdb_structp_test" "" "maint agent gdb_structp_test" +gdb_test "maint agent gdb_structp_test" "" -gdb_test "maint agent gdb_structp_test->l" "" "maint agent gdb_structp_test->l" +gdb_test "maint agent gdb_structp_test->l" "" -gdb_test "maint agent gdb_structp_test->bfield" "" "maint agent gdb_structp_test->bfield" +gdb_test "maint agent gdb_structp_test->bfield" "" -gdb_test "maint agent gdb_long_test + gdb_short_test" "" "maint agent gdb_long_test + gdb_short_test" +gdb_test "maint agent gdb_long_test + gdb_short_test" "" -gdb_test "maint agent gdb_long_test - gdb_short_test" "" "maint agent gdb_long_test - gdb_short_test" +gdb_test "maint agent gdb_long_test - gdb_short_test" "" -gdb_test "maint agent gdb_long_test * gdb_short_test" "" "maint agent gdb_long_test * gdb_short_test" +gdb_test "maint agent gdb_long_test * gdb_short_test" "" -gdb_test "maint agent gdb_long_test / gdb_short_test" "" "maint agent gdb_long_test / gdb_short_test" +gdb_test "maint agent gdb_long_test / gdb_short_test" "" -gdb_test "maint agent gdb_structp_test + 1" "" "maint agent gdb_structp_test + 1" +gdb_test "maint agent gdb_structp_test + 1" "" -gdb_test "maint agent gdb_long_test == gdb_short_test" "" "maint agent gdb_long_test == gdb_short_test" +gdb_test "maint agent gdb_long_test == gdb_short_test" "" -gdb_test "maint agent gdb_long_test != gdb_short_test" "" "maint agent gdb_long_test != gdb_short_test" +gdb_test "maint agent gdb_long_test != gdb_short_test" "" -gdb_test "maint agent gdb_long_test < gdb_short_test" "" "maint agent gdb_long_test < gdb_short_test" +gdb_test "maint agent gdb_long_test < gdb_short_test" "" -gdb_test "maint agent gdb_long_test <= gdb_short_test" "" "maint agent gdb_long_test <= gdb_short_test" +gdb_test "maint agent gdb_long_test <= gdb_short_test" "" -gdb_test "maint agent gdb_long_test > gdb_short_test" "" "maint agent gdb_long_test > gdb_short_test" +gdb_test "maint agent gdb_long_test > gdb_short_test" "" -gdb_test "maint agent gdb_long_test >= gdb_short_test" "" "maint agent gdb_long_test >= gdb_short_test" +gdb_test "maint agent gdb_long_test >= gdb_short_test" "" -gdb_test "maint agent &gdb_long_test == &gdb_short_test" "" "maint agent &gdb_long_test == &gdb_short_test" +gdb_test "maint agent &gdb_long_test == &gdb_short_test" "" -gdb_test "maint agent &gdb_long_test < &gdb_short_test" "" "maint agent &gdb_long_test < &gdb_short_test" +gdb_test "maint agent &gdb_long_test < &gdb_short_test" "" -gdb_test "maint agent (unsigned char)1L" ".*ext 8.*" "maint agent (unsigned char)1L" +gdb_test "maint agent (unsigned char)1L" ".*ext 8.*" # Now test eval version of agent expressions. -gdb_test "maint agent-eval 12" ".*const8 12.*end.*" "maint agent-eval 12" +gdb_test "maint agent-eval 12" ".*const8 12.*end.*" -gdb_test "maint agent-eval gdb_char_test" "" "maint agent-eval gdb_char_test" +gdb_test "maint agent-eval gdb_char_test" "" -gdb_test "maint agent-eval gdb_arr_test\[12\]" "" "maint agent-eval gdb_arr_test\[12\]" +gdb_test "maint agent-eval gdb_arr_test\[12\]" "" -gdb_test "maint agent-eval gdb_arr_test\[gdb_short_test\]" "" "maint agent-eval gdb_arr_test\[gdb_short_test\]" +gdb_test "maint agent-eval gdb_arr_test\[gdb_short_test\]" "" -gdb_test "maint agent-eval gdb_struct1_test" "" "maint agent-eval gdb_struct1_test" +gdb_test "maint agent-eval gdb_struct1_test" "" -gdb_test "maint agent-eval gdb_struct1_test.s" "" "maint agent-eval gdb_struct1_test.s" +gdb_test "maint agent-eval gdb_struct1_test.s" "" -gdb_test "maint agent-eval gdb_struct1_test.arr\[gdb_struct1_test.c\]" "" "maint agent-eval gdb_struct1_test.arr\[gdb_struct1_test.c\]" +gdb_test "maint agent-eval gdb_struct1_test.arr\[gdb_struct1_test.c\]" "" -gdb_test "maint agent-eval gdb_structp_test" "" "maint agent-eval gdb_structp_test" +gdb_test "maint agent-eval gdb_structp_test" "" -gdb_test "maint agent-eval gdb_structp_test->l" "" "maint agent-eval gdb_structp_test->l" +gdb_test "maint agent-eval gdb_structp_test->l" "" -gdb_test "maint agent-eval gdb_structp_test->bfield" "" "maint agent-eval gdb_structp_test->bfield" +gdb_test "maint agent-eval gdb_structp_test->bfield" "" -gdb_test "maint agent-eval gdb_long_test + gdb_short_test" "" "maint agent-eval gdb_long_test + gdb_short_test" +gdb_test "maint agent-eval gdb_long_test + gdb_short_test" "" -gdb_test "maint agent-eval gdb_long_test - gdb_short_test" "" "maint agent-eval gdb_long_test - gdb_short_test" +gdb_test "maint agent-eval gdb_long_test - gdb_short_test" "" -gdb_test "maint agent-eval gdb_long_test * gdb_short_test" "" "maint agent-eval gdb_long_test * gdb_short_test" +gdb_test "maint agent-eval gdb_long_test * gdb_short_test" "" -gdb_test "maint agent-eval gdb_long_test / gdb_short_test" "" "maint agent-eval gdb_long_test / gdb_short_test" +gdb_test "maint agent-eval gdb_long_test / gdb_short_test" "" -gdb_test "maint agent-eval gdb_structp_test + 1" "" "maint agent-eval gdb_structp_test + 1" +gdb_test "maint agent-eval gdb_structp_test + 1" "" -gdb_test "maint agent-eval gdb_long_test == gdb_short_test" "" "maint agent-eval gdb_long_test == gdb_short_test" +gdb_test "maint agent-eval gdb_long_test == gdb_short_test" "" -gdb_test "maint agent-eval gdb_long_test != gdb_short_test" "" "maint agent-eval gdb_long_test != gdb_short_test" +gdb_test "maint agent-eval gdb_long_test != gdb_short_test" "" -gdb_test "maint agent-eval gdb_long_test < gdb_short_test" "" "maint agent-eval gdb_long_test < gdb_short_test" +gdb_test "maint agent-eval gdb_long_test < gdb_short_test" "" -gdb_test "maint agent-eval gdb_long_test <= gdb_short_test" "" "maint agent-eval gdb_long_test <= gdb_short_test" +gdb_test "maint agent-eval gdb_long_test <= gdb_short_test" "" -gdb_test "maint agent-eval gdb_long_test > gdb_short_test" "" "maint agent-eval gdb_long_test > gdb_short_test" +gdb_test "maint agent-eval gdb_long_test > gdb_short_test" "" -gdb_test "maint agent-eval gdb_long_test >= gdb_short_test" "" "maint agent-eval gdb_long_test >= gdb_short_test" +gdb_test "maint agent-eval gdb_long_test >= gdb_short_test" "" -gdb_test "maint agent-eval &gdb_long_test == &gdb_short_test" ".*equal.*end.*" "maint agent-eval &gdb_long_test == &gdb_short_test" +gdb_test "maint agent-eval &gdb_long_test == &gdb_short_test" ".*equal.*end.*" -gdb_test "maint agent-eval &gdb_long_test < &gdb_short_test" "" "maint agent-eval &gdb_long_test < &gdb_short_test" +gdb_test "maint agent-eval &gdb_long_test < &gdb_short_test" "" |