From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 98382 invoked by alias); 10 Apr 2018 16:22:49 -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 98372 invoked by uid 89); 10 Apr 2018 16:22:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=cancelled, detach, junior 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; Tue, 10 Apr 2018 16:22:47 +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 6EAB7406804A for ; Tue, 10 Apr 2018 16:22:45 +0000 (UTC) Received: from localhost (unused-10-15-17-196.yyz.redhat.com [10.15.17.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id 50757215CDAF; Tue, 10 Apr 2018 16:22:45 +0000 (UTC) From: Sergio Durigan Junior To: Pedro Alves Cc: GDB Patches , Jan Kratochvil Subject: Re: [PATCH v4] Enable 'set print inferior-events' and improve detach/fork/kill/exit messages References: <20180124194714.26222-1-sergiodj@redhat.com> <20180405184648.3055-1-sergiodj@redhat.com> <4477e049-87f5-5615-533e-c9bde580f935@redhat.com> <876054l45b.fsf@redhat.com> <2c411b92-72e1-bf60-37c9-7d39bc5761de@redhat.com> Date: Tue, 10 Apr 2018 16:22:00 -0000 In-Reply-To: <2c411b92-72e1-bf60-37c9-7d39bc5761de@redhat.com> (Pedro Alves's message of "Fri, 6 Apr 2018 17:41:06 +0100") Message-ID: <87vaczf2ui.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2018-04/txt/msg00188.txt.bz2 On Friday, April 06 2018, Pedro Alves wrote: > 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? Thanks for the message. I guess I was confusing things, then. I updated all regexps to expect the "[Inferior ... detached]" message after the "Detaching ...", because that's what GDB will print. But in this specific case, as you noticed, it's not necessary. I reverted the testcase back to its original form, and am running a loop to make sure there's no racy test, but I think it should be enough to just it as is. >> 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". I did this, and found no racy issues. I'll run another full regression test on BuildBot, and resubmit the patch. Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/