From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23340 invoked by alias); 6 Apr 2018 16:41: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 23325 invoked by uid 89); 6 Apr 2018 16:41:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Apr 2018 16:41:09 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 20F7A402291E for ; Fri, 6 Apr 2018 16:41:08 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 779AD2166BC7; Fri, 6 Apr 2018 16:41:07 +0000 (UTC) Subject: Re: [PATCH v4] Enable 'set print inferior-events' and improve detach/fork/kill/exit messages To: Sergio Durigan Junior References: <20180124194714.26222-1-sergiodj@redhat.com> <20180405184648.3055-1-sergiodj@redhat.com> <4477e049-87f5-5615-533e-c9bde580f935@redhat.com> <876054l45b.fsf@redhat.com> Cc: GDB Patches , Jan Kratochvil From: Pedro Alves Message-ID: <2c411b92-72e1-bf60-37c9-7d39bc5761de@redhat.com> Date: Fri, 06 Apr 2018 16:41:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <876054l45b.fsf@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-04/txt/msg00096.txt.bz2 On 04/06/2018 04:56 PM, Sergio Durigan Junior wrote: >> I'm not sure I understand the need for this. If you left this >> gdb_test_multiple exactly as it was before your patch, wouldn't it all >> work the same? > > As I said in the other message, the problem here is that > ${inf_output_re} can happen between the two messages. For example: > > Detaching from program: .../gdb/testsuite/outputs/gdb.threads/process-dies-while-detaching/process-dies-while-detaching-1-detach, process 7440 > exited, status=0 > [Inferior 1 (process 7440) detached] > > In this case, leave gdb_test_multiple as it was before doesn't catch > this case, which leads to a racy failure. I'm not sure I get it -- why does it need to catch it? The original gdb_test_multiple matches the first line: "Detaching from program: .../gdb/testsuite/outputs/gdb.threads/process-dies-while-detaching/process-dies-while-detaching-1-detach, process 7440" and stops here, there's no $gdb_prompt anchor. And then, the loop below should consume both the inferior output and the gdb prompt. My question is then, why do you need to expect the "[Inferior 1 (process 7440) detached]" part in this test at all? > However, I noticed that my > patch also doesn't fix the failure (I thought it did, but then I saw it > happening again on the BuildBot). That's another reason why I > "cancelled" this version of the patch. Also please try these racy issues with "make check-read1". Thanks, Pedro Alves