diff options
author | Michael Snyder <msnyder@vmware.com> | 2001-05-25 01:29:01 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2001-05-25 01:29:01 +0000 |
commit | ac55707e4a23c79aaea24d86c515af136af8092d (patch) | |
tree | edd209f0ce116f01805d419982f7c4376dfb8844 /gdb | |
parent | fa3b51d224d7b32bace5c9059a4e6a4b39a177f6 (diff) | |
download | gdb-ac55707e4a23c79aaea24d86c515af136af8092d.zip gdb-ac55707e4a23c79aaea24d86c515af136af8092d.tar.gz gdb-ac55707e4a23c79aaea24d86c515af136af8092d.tar.bz2 |
2001-05-24 Michael Snyder <msnyder@redhat.com>
* gdb.threads/linux-dp.exp: Remove assumptions about thread ordering.
Don't require that the main thread and the manager thread are the
first in the list.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.threads/linux-dp.exp | 26 |
2 files changed, 29 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index dcc6eb6..133ffef 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2001-05-24 Michael Snyder <msnyder@redhat.com> + * gdb.threads/linux-dp.exp: Remove assumptions about thread ordering. + Don't require that the main thread and the manager thread are the + first in the list. + * gdb.threads/pthreads.exp (test_startup): Relax test for thread debugging. If test fails, issue an "unsupported" not a "fail". diff --git a/gdb/testsuite/gdb.threads/linux-dp.exp b/gdb/testsuite/gdb.threads/linux-dp.exp index f4b2af0..bdb3209 100644 --- a/gdb/testsuite/gdb.threads/linux-dp.exp +++ b/gdb/testsuite/gdb.threads/linux-dp.exp @@ -146,9 +146,15 @@ proc select_thread {thread} { ### Return true if the thread had a stack which was not only ### acceptable, but interesting. SEEN should be an array in which ### SEEN(N) exists iff we have found philosopher number N before. + +set main_seen 0 +set manager_seen 0 + proc check_philosopher_stack {thread seen_name} { global gdb_prompt upvar $seen_name seen + global main_seen + global manager_seen set name "philosopher is distinct: $thread" set interesting 0 @@ -170,6 +176,24 @@ proc check_philosopher_stack {thread seen_name} { ## Maybe the thread hasn't started yet. pass $name } + -re ".* in main \\(.*$gdb_prompt $" { + if {$main_seen == 1} { + fail "main is distinct: $thread" + } else { + set main_seen 1 + pass "main is distinct: $thread" + } + set interesting 1 + } + -re ".* in __pthread_manager \\(.*$gdb_prompt $" { + if {$manager_seen == 1} { + fail "manager thread is distinct: $thread" + } else { + set manager_seen 1 + pass "manager thread is distinct: $thread" + } + set interesting 1 + } -re " in \\?\\?.*\r\n$gdb_prompt $" { ## Sometimes we can't get a backtrace. I'm going to call ## this a pass, since we do verify that at least one @@ -191,7 +215,7 @@ proc check_philosopher_stack {thread seen_name} { set any_interesting 0 array set seen {} -for {set i 3} {$i <= 7} {incr i} { +for {set i 1} {$i <= 7} {incr i} { if [check_philosopher_stack $i seen] { set any_interesting 1 } |