From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id CB67D3858404 for ; Fri, 23 Jun 2023 11:35:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CB67D3858404 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 0FBEA21B14; Fri, 23 Jun 2023 11:35:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1687520158; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=q4d/g2ylDJMUaWjoxjw7ZS5xJ2wHOYqreToSZKtx1J0=; b=jblb9B2NwLnVtRR/5x3TRviqzH+nByaZ4JlG2lM41tk4oMsGPPtbtiF5f816McHXFEmABE 6z2ofLfShVeCOxGai4Eh+ZtzJeb6mA0J9mrre08xLZAAW250jAJ9TbDTEAhvzrgfd0B9G3 3V5+ainQxQL6nW5rSHv5WtbvyEzHXGg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1687520158; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=q4d/g2ylDJMUaWjoxjw7ZS5xJ2wHOYqreToSZKtx1J0=; b=Cz4j9L5BCQv1Wy+duhPad8IJ48SUBECZoVqfKIovvxG27i0FVS+VE1rCarF2dZZCDE30wJ Vb30IqI6NJcvvhDw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D9961134FB; Fri, 23 Jun 2023 11:35:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id u3hNM52DlWRCHgAAMHmgww (envelope-from ); Fri, 23 Jun 2023 11:35:57 +0000 Message-ID: Date: Fri, 23 Jun 2023 13:36:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v3] gdb/testsuite: Avoid infinite loop in gdb.reverse/step-reverse.exp Content-Language: en-US To: Thiago Jung Bauermann , gdb-patches@sourceware.org Cc: Andrew Burgess , Bruno Larsen References: <20230605232844.80533-1-thiago.bauermann@linaro.org> <4cce28ea-a883-7391-daa8-130f9bc553c1@redhat.com> <87o7l7glef.fsf@linaro.org> From: Tom de Vries In-Reply-To: <87o7l7glef.fsf@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 6/23/23 00:52, Thiago Jung Bauermann wrote: > > Bruno Larsen writes: > >> On 06/06/2023 01:28, Thiago Jung Bauermann wrote: >>> This testcase sometimes gets stuck in a loop for hours when running in our >>> CI. The problem is that due to an issue unrelated to reverse debugging the >>> inferior exits early, and because of the overly generic ".*" pattern the >>> testcase keeps sending the "next" command without noticing that the >>> inferior is gone. >>> >>> gdb_test_multiple has a pattern to detect that "The program is not being >>> run.", but since it is placed after the patterns from the caller it won't >>> be triggered. It also has a timeout pattern but because it is triggered >>> between successful matches, each time the test matches the '-re -wrap ".*"' >>> this counts as a successful match and the timeout is reset. >>> >>> Since the test binary is compiled with debug information, fix by changing >>> one of the generic patterns to match entering the main function and the >>> other one to match the source code line number that is shown by GDB right >>> after the "step" command. >>> >>> Also, as a precaution add a maximum number of times the "next" command will >>> be sent. >>> >>> Co-Authored-By: Tom de Vries >>> --- >> >> Thanks for fixing all the nits, looks good to me now. Reviewed-By: Bruno Larsen >> >> >> (Just making sure you know, the rb tag is not enough to push, you need an approval) > Hi, LGTM, thanks. Approved-By: Tom de Vries - Tom