This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Force to update thread list in queue-signal.exp

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
(gdb) FAIL: gdb.threads/queue-signal.exp: determine thread functions

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

2014-09-25  Yao Qi  <>

	* 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]