From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18438 invoked by alias); 4 Apr 2017 01:49:11 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 17560 invoked by uid 89); 4 Apr 2017 01:49:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-23.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy=HX-PHP-Originating-Script:rcube.php X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 04 Apr 2017 01:49:01 +0000 Received: by simark.ca (Postfix, from userid 33) id 78CDC1E805; Mon, 3 Apr 2017 21:49:01 -0400 (EDT) To: Yao Qi Subject: Re: [PATCH] Fix racy test in gdb.threads/thread-specific-bp.exp X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 04 Apr 2017 01:49:00 -0000 From: Simon Marchi Cc: gdb-patches@sourceware.org In-Reply-To: <1491253593-4116-1-git-send-email-yao.qi@linaro.org> References: <1491253593-4116-1-git-send-email-yao.qi@linaro.org> Message-ID: <27d2906cc62411453861a5868a38bff8@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.4 X-IsSubscribed: yes X-SW-Source: 2017-04/txt/msg00007.txt.bz2 On 2017-04-03 17:06, Yao Qi wrote: > diff --git a/gdb/testsuite/gdb.threads/thread-specific-bp.exp > b/gdb/testsuite/gdb.threads/thread-specific-bp.exp > index bdf12f8..a652e9c 100644 > --- a/gdb/testsuite/gdb.threads/thread-specific-bp.exp > +++ b/gdb/testsuite/gdb.threads/thread-specific-bp.exp > @@ -87,9 +87,12 @@ proc check_thread_specific_breakpoint {mode} { > } else { > set cmd "continue" > } > - gdb_test "$cmd" \ > - "Breakpoint .* end .* at .*" \ > - "continue to end" > + set test "continue to end" > + gdb_test_multiple "$cmd" $test { > + -re "Breakpoint .* end .* at .*(\[^\r\n\]*)\r\n$gdb_prompt " { I am not sure I understand what this is supposed to match. First are the parenthesis useful, since we're not using any capture group? Then, .* followed with [^\r\n]* doesn't seem useful, since the .* can just match anything the [^\r\n]* doesn't match. What about just this? set test "continue to end" gdb_test_multiple "$cmd" $test { -re "hit Breakpoint $decimal, end \\(\\) at.*$gdb_prompt " { pass $test } } Simon