From patchwork Thu Sep 25 11:35:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 2967 Received: (qmail 1242 invoked by alias); 25 Sep 2014 11:40:22 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 1232 invoked by uid 89); 25 Sep 2014 11:40:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 25 Sep 2014 11:40:20 +0000 Received: from svr-orw-fem-04.mgc.mentorg.com ([147.34.97.41]) by relay1.mentorg.com with esmtp id 1XX7PF-00067s-C3 from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Thu, 25 Sep 2014 04:40:17 -0700 Received: from qiyao.dyndns.org.com (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.3.181.6; Thu, 25 Sep 2014 04:40:16 -0700 From: Yao Qi To: Subject: [PATCH] Force to update thread list in queue-signal.exp Date: Thu, 25 Sep 2014 19:35:46 +0800 Message-ID: <1411644946-11697-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes 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 * 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