diff options
author | Tom de Vries <tdevries@suse.de> | 2020-05-18 16:33:37 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2020-05-18 16:33:37 +0200 |
commit | 1d72769534bde2c366f670763105f714e0124d01 (patch) | |
tree | 6d70c99c31946a66cce260b93eae435c4a77aaf2 /gdb | |
parent | 3edf7b9f2c79be0bffcc05d7a8b4364924255282 (diff) | |
download | gdb-1d72769534bde2c366f670763105f714e0124d01.zip gdb-1d72769534bde2c366f670763105f714e0124d01.tar.gz gdb-1d72769534bde2c366f670763105f714e0124d01.tar.bz2 |
[gdb/testsuite] Use with_test_prefix in gdb.base/gdb-caching-proc.exp
When running test-case gdb.base/gdb-caching-proc.exp all passes are unique,
but fails might not be.
Fix this by using with_test_prefix.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2020-05-18 Tom de Vries <tdevries@suse.de>
* gdb.base/gdb-caching-proc.exp: Use with_test_prefix.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/gdb-caching-proc.exp | 42 |
2 files changed, 28 insertions, 18 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 2a3e72c..74d8b84 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2020-05-18 Tom de Vries <tdevries@suse.de> + + * gdb.base/gdb-caching-proc.exp: Use with_test_prefix. + 2020-05-17 Pedro Alves <palves@redhat.com> PR gdb/25741 diff --git a/gdb/testsuite/gdb.base/gdb-caching-proc.exp b/gdb/testsuite/gdb.base/gdb-caching-proc.exp index 3810347..f1dd834 100644 --- a/gdb/testsuite/gdb.base/gdb-caching-proc.exp +++ b/gdb/testsuite/gdb.base/gdb-caching-proc.exp @@ -28,7 +28,9 @@ proc test_proc { name } { set resultlist [list] - set first [gdb_do_cache_wrap $real_name] + with_test_prefix intial { + set first [gdb_do_cache_wrap $real_name] + } lappend resultlist $first # Ten repetitions was enough to trigger target_supports_scheduler_locking, @@ -37,7 +39,9 @@ proc test_proc { name } { set racy 0 for {set i 0} {$i < $repeat} {incr i} { - set rerun [gdb_do_cache_wrap $real_name] + with_test_prefix $i { + set rerun [gdb_do_cache_wrap $real_name] + } lappend resultlist $rerun if { $rerun != $first } { set racy 1 @@ -45,9 +49,9 @@ proc test_proc { name } { } if { $racy == 0 } { - pass "$name consistency" + pass "consistency" } else { - fail "$name consistency" + fail "consistency" verbose -log "$name: $resultlist" } } @@ -77,20 +81,22 @@ proc test_file { file } { } foreach procname $procnames { - switch $procname { - "is_address_zero_readable" { set setup_gdb 1 } - "target_is_gdbserver" { set setup_gdb 1 } - default {set setup_gdb 0 } - } - - if { $setup_gdb } { - clean_restart $obj - } - - test_proc $procname - - if { $setup_gdb } { - gdb_exit + with_test_prefix $procname { + switch $procname { + "is_address_zero_readable" { set setup_gdb 1 } + "target_is_gdbserver" { set setup_gdb 1 } + default {set setup_gdb 0 } + } + + if { $setup_gdb } { + clean_restart $obj + } + + test_proc $procname + + if { $setup_gdb } { + gdb_exit + } } } } |