Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: [PATCH] Force to update thread list in queue-signal.exp
Date: Thu, 25 Sep 2014 11:40:00 -0000	[thread overview]
Message-ID: <1411644946-11697-1-git-send-email-yao@codesourcery.com> (raw)

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


             reply	other threads:[~2014-09-25 11:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-25 11:40 Yao Qi [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1411644946-11697-1-git-send-email-yao@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox