From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68246 invoked by alias); 2 Nov 2015 01:34:23 -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 68236 invoked by uid 89); 2 Nov 2015 01:34:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: xyzzy.0x04.net Received: from xyzzy.0x04.net (HELO xyzzy.0x04.net) (109.74.193.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 02 Nov 2015 01:34:19 +0000 Received: from hogfather.0x04.net (89-65-84-110.dynamic.chello.pl [89.65.84.110]) by xyzzy.0x04.net (Postfix) with ESMTPS id 935E5400FA; Mon, 2 Nov 2015 02:34:34 +0100 (CET) Received: from [192.168.1.104] (89-76-92-82.dynamic.chello.pl [89.76.92.82]) by hogfather.0x04.net (Postfix) with ESMTPSA id CD7275800AC; Mon, 2 Nov 2015 02:34:16 +0100 (CET) Subject: Re: [PATCH v2 01/13] gdb/linux-record: Add testcases for a few syscalls. To: Pedro Alves , qiyaoltc@gmail.com References: <5628E5D6.5020706@0x04.net> <1445521166-14492-1-git-send-email-koriakin@0x04.net> <5632035E.30809@redhat.com> <56327421.6090203@0x04.net> <5633486B.40502@redhat.com> Cc: gdb-patches@sourceware.org From: =?UTF-8?Q?Marcin_Ko=c5=9bcielnicki?= Message-ID: <5636BD98.2090401@0x04.net> Date: Mon, 02 Nov 2015 01:34:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <5633486B.40502@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2015-11/txt/msg00009.txt.bz2 On 30/10/15 11:37, Pedro Alves wrote: > On 10/29/2015 07:31 PM, Marcin Kościelnicki wrote: >>>> + >>>> +gdb_test "break marker1" \ >>>> + "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \ >>>> + "set breakpoint at marker1" >>>> + >>>> +gdb_test "break marker2" \ >>>> + "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \ >>>> + "set breakpoint at marker2" >>>> + >>>> +gdb_continue_to_breakpoint "marker1" ".*$srcfile:.*" >>>> + >>>> +gdb_continue_to_breakpoint "marker2" ".*$srcfile:.*" >>> >>> Most (all?) these tests run to marker1 and then immediately to >>> marker2. Can't they just continue to marker2 directly? >>> >> >> Huh. I've done that and, funnily enough, the waitpid testcase magically >> started to pass. > > Eh. > >> For the record, I've reported the bug here: >> https://sourceware.org/bugzilla/show_bug.cgi?id=19187 > > Thanks. > >> I guess there won't be a KFAIL after all. >> > > OK. > > I'll take a look at the new version. > > Thanks, > Pedro Alves > Well, this is embarassing... Turns out gdb_continue_to_breakpoint doesn't care all that much about the name of the breakpoint passed in as the first parameter, it just happily continues to the next breakpoint, whatever it happens to be. So the testcases as commited never actually make it to marker2, and they all trivially pass (state when reaching marker1 is, after all, exactly identical to reaching marker2 and then correctly reversing to marker1). I should've known that stepping over fork suddenly starting to work was too good to be true. So... can I get that push access now and fix my mess, or do I no longer qualify as having submitted a good patch due to the above? :)