From patchwork Thu Oct 9 00:21:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 3153 Received: (qmail 15564 invoked by alias); 9 Oct 2014 00:26:12 -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 15554 invoked by uid 89); 9 Oct 2014 00:26:12 -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, 09 Oct 2014 00:26:11 +0000 Received: from svr-orw-fem-06.mgc.mentorg.com ([147.34.97.120]) by relay1.mentorg.com with esmtp id 1Xc1YU-0001v4-2m from Yao_Qi@mentor.com ; Wed, 08 Oct 2014 17:26:06 -0700 Received: from GreenOnly (147.34.91.1) by SVR-ORW-FEM-06.mgc.mentorg.com (147.34.97.120) with Microsoft SMTP Server id 14.3.181.6; Wed, 8 Oct 2014 17:26:05 -0700 From: Yao Qi To: Pedro Alves CC: Subject: Re: [PATCH] Force to update thread list in queue-signal.exp References: <1411644946-11697-1-git-send-email-yao@codesourcery.com> <87bnpougtx.fsf@codesourcery.com> <5434032E.9070504@redhat.com> Date: Thu, 9 Oct 2014 08:21:57 +0800 In-Reply-To: <5434032E.9070504@redhat.com> (Pedro Alves's message of "Tue, 7 Oct 2014 16:13:50 +0100") Message-ID: <877g0at7mi.fsf@codesourcery.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes Pedro Alves writes: >>> * gdb.threads/queue-signal.exp: Execute command "info threads". > > This part should no longer be necessary: > > https://sourceware.org/ml/gdb-patches/2014-09/msg00734.html Thanks for the pointer. I didn't follow this patch series because ThunderBird hides it under other unrelated thread. Looks other tests don't have to pull thread list explicitly, IIUC, so we can remove them. How about the patch below? diff --git a/gdb/testsuite/gdb.threads/attach-into-signal.exp b/gdb/testsuite/gdb.threads/attach-into-signal.exp index d77380b..277a9d0 100644 --- a/gdb/testsuite/gdb.threads/attach-into-signal.exp +++ b/gdb/testsuite/gdb.threads/attach-into-signal.exp @@ -102,15 +102,6 @@ proc corefunc { threadtype executable } { # that by peeking at the thread's siginfo. # SIGALRM is 14, SIGSTOP is 19. - # With remote targets, we need to pull the - # thread list explicitly before GDB even knows - # about thread 2. - set test2 "pull thread list" - gdb_test_multiple "info threads" $test2 { - -re "\r\n$gdb_prompt $" { - } - } - set test2 "thread apply 2 print \$_siginfo.si_signo" gdb_test_multiple $test2 $test2 { -re " = 14\r\n$gdb_prompt $" { diff --git a/gdb/testsuite/gdb.threads/linux-dp.exp b/gdb/testsuite/gdb.threads/linux-dp.exp index 8fa8288..f4099fe 100644 --- a/gdb/testsuite/gdb.threads/linux-dp.exp +++ b/gdb/testsuite/gdb.threads/linux-dp.exp @@ -104,14 +104,7 @@ for {set i 0} {$i < 5} {incr i} { -re "$gdb_prompt $" { } } - if { $threads_created == 0 } { - # Not all targets announce new threads as they are created. - # For example, the GDB - # remote protocol target only finds out about threads when - # they actually report some event like a breakpoint hit, - # or when the user types 'info threads'. - unsupported "create philosopher: $i" - } elseif { $threads_created == 1 } { + if { $threads_created == 1 } { if { $expect_manager < 0 } { set expect_manager 0 } diff --git a/gdb/testsuite/gdb.threads/thread-find.exp b/gdb/testsuite/gdb.threads/thread-find.exp index 25f2856..3e82989 100644 --- a/gdb/testsuite/gdb.threads/thread-find.exp +++ b/gdb/testsuite/gdb.threads/thread-find.exp @@ -29,10 +29,6 @@ runto_main gdb_breakpoint [gdb_get_line_number "linuxthreads.exp: info threads 2"] gdb_continue_to_breakpoint "main thread's sleep" -# Make sure thread list is up-to-date (in case remote targets have not yet -# reported thread creation events) -gdb_test "info threads" - # Create thread names. gdb_test "thread apply 1 thread name threadname_1" \ "Thread 1 .*" \