Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Force to update thread list in queue-signal.exp
@ 2014-09-25 11:40 Yao Qi
  2014-10-07 13:57 ` Yao Qi
  0 siblings, 1 reply; 6+ messages in thread
From: Yao Qi @ 2014-09-25 11:40 UTC (permalink / raw)
  To: gdb-patches

Hi,
I see the following fail on arm-linux-gnueabi testing,

thread 2^M
Thread ID 2 not known.^M
^^^^^^^^^^^^^^^^^^^^^^
(gdb) PASS: gdb.threads/queue-signal.exp: thread 2
bt^M
(gdb) FAIL: gdb.threads/queue-signal.exp: determine thread functions
gdb/testsuite:

The output "Thread ID 2 not known" doesn't cause a fail because no
pattern to match the output, but the message "Thread ID 2 not known" is
still unexpected.  This patch is to force to issue command "info threads"
in order to update thread list.  On the other hand, this patch is also
to match the output of "thread 2" to make the failure, if any, more
obvious.

2014-09-25  Yao Qi  <yao@codesourcery.com>

	* gdb.threads/queue-signal.exp: Execute command "info threads".
	Match the output of "thread 2".
---
 gdb/testsuite/gdb.threads/queue-signal.exp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.threads/queue-signal.exp b/gdb/testsuite/gdb.threads/queue-signal.exp
index 207073d..ae50c2e 100644
--- a/gdb/testsuite/gdb.threads/queue-signal.exp
+++ b/gdb/testsuite/gdb.threads/queue-signal.exp
@@ -34,10 +34,14 @@ gdb_test "handle SIGABRT stop print pass"
 gdb_breakpoint "all_threads_running"
 gdb_continue_to_breakpoint "all_threads_running"
 
+# Make sure thread list is up-to-date (in case remote targets have not
+# yet reported thread creation events).
+gdb_test "info threads"
+
 # Find out which of threads 2,3 are for sigusr1,2.
 set sigusr1_thread 0
 set sigusr2_thread 0
-gdb_test "thread 2"
+gdb_test "thread 2" "Switching to .*"
 gdb_test_multiple "bt" "determine thread functions" {
     -re "sigusr1.*$gdb_prompt $" {
 	set sigusr1_thread 2
-- 
1.9.3


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-10-11  0:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-25 11:40 [PATCH] Force to update thread list in queue-signal.exp Yao Qi
2014-10-07 13:57 ` Yao Qi
2014-10-07 15:13   ` Pedro Alves
2014-10-09  0:26     ` Yao Qi
2014-10-10  9:18       ` Pedro Alves
2014-10-11  0:47         ` Yao Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox