diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2003-05-08 19:23:29 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2003-05-08 19:23:29 +0000 |
commit | a25fbfec627d600ca7b8fc268842628f7b477ba8 (patch) | |
tree | 93810ee7e1b918c19ffb95844986c2c229aa908f /gdb | |
parent | 0c92afe8cde4361ee019f661e94e34b363ba24e9 (diff) | |
download | gdb-a25fbfec627d600ca7b8fc268842628f7b477ba8.zip gdb-a25fbfec627d600ca7b8fc268842628f7b477ba8.tar.gz gdb-a25fbfec627d600ca7b8fc268842628f7b477ba8.tar.bz2 |
2003-05-08 Jeff Johnston <jjohnstn@redhat.com>
* gdb.threads/schedlock.exp: Remove assumption that all threads
will run in a particular small time slice. Also ensure we break
in one of the child threads rather than the main thread.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.threads/schedlock.exp | 14 |
2 files changed, 15 insertions, 5 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index c53111d..22ac56a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2003-05-08 Jeff Johnston <jjohnstn@redhat.com> + + * gdb.threads/schedlock.exp: Remove assumption that all threads + will run in a particular small time slice. Also ensure we break + in one of the child threads rather than the main thread. + 2003-05-07 Jim Blandy <jimb@redhat.com> Add support for assembly source testing on the s390x. diff --git a/gdb/testsuite/gdb.threads/schedlock.exp b/gdb/testsuite/gdb.threads/schedlock.exp index 28298c6..4478580 100644 --- a/gdb/testsuite/gdb.threads/schedlock.exp +++ b/gdb/testsuite/gdb.threads/schedlock.exp @@ -112,8 +112,8 @@ proc my_continue { msg } { stop_process "stop all threads ($msg)" - # Make sure we're in one of the looping threads. - gdb_breakpoint [gdb_get_line_number "schedlock.exp: main loop"] + # Make sure we're in one of the non-main looping threads. + gdb_breakpoint [concat [gdb_get_line_number "schedlock.exp: main loop"] " if arg != 5"] gdb_continue_to_breakpoint "return to loop ($msg)" delete_breakpoints } @@ -230,12 +230,11 @@ if {$curthread == $newthread} { set start_args $cont_args set cont_args [get_args] +set num_other_threads 0 for {set i 0} {[expr $i < 6]} {set i [expr $i + 1]} { if {[lindex $start_args $i] == [lindex $cont_args $i]} { if {$i == $curthread} { fail "current thread stepped (didn't run)" - } else { - fail "other thread $i ran (didn't run) (1)" } } else { if {$i == $curthread} { @@ -245,10 +244,15 @@ for {set i 0} {[expr $i < 6]} {set i [expr $i + 1]} { fail "current thread stepped (wrong amount)" } } else { - pass "other thread $i ran (1)" + set num_other_threads [expr $num_other_threads + 1] } } } +if {$num_other_threads > 0} { + pass "other threads ran (1)" +} else { + fail "other threads ran (no other threads ran) (1)" +} # Test continue with scheduler locking gdb_test "set scheduler-locking on" "" |