From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Ge0yNHSltWPaRg8AWB0awg (envelope-from ) for ; Wed, 04 Jan 2023 11:12:36 -0500 Received: by simark.ca (Postfix, from userid 112) id C8D6E1E222; Wed, 4 Jan 2023 11:12:36 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=ZhfdfUZg; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_HI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 7F09F1E110 for ; Wed, 4 Jan 2023 11:12:36 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 221573858C2D for ; Wed, 4 Jan 2023 16:12:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 221573858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1672848756; bh=STCS2Qxhti2lTjzS6bSgD/TUqMMfckBgeYowuy9nJ/Y=; h=Date:Subject:To:Cc:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=ZhfdfUZgVFioOrPqquz8VedBCO+c/CPUZsfN0NyiUYEtfDXyzTkW6moIcWgH5PYCy SH83VPsF4eD7QjOJy9XE39HTLq4Mmjv1qjhMGW/HUmRCn1fdDkUTBo8SGN4zt3CxKx PlV+qAAaKrZd4E+IU39T35E8E1I1muOPnFNAnsWU= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 3448C3858D35 for ; Wed, 4 Jan 2023 16:12:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3448C3858D35 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 304GB6LP020838 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 4 Jan 2023 11:11:11 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 304GB6LP020838 Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 73CBD1E110; Wed, 4 Jan 2023 11:11:06 -0500 (EST) Message-ID: <9b050608-4bb6-dbc3-69f6-ebc9ad2cc303@polymtl.ca> Date: Wed, 4 Jan 2023 11:11:05 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH] gdb: use gdb_test_multiple in gdb_breakpoint Content-Language: en-US To: Lancelot SIX Cc: gdb-patches@sourceware.org References: <20230103192216.108444-1-simon.marchi@polymtl.ca> <20230104091559.rqo2774ba566j5sg@ubuntu.lan> In-Reply-To: <20230104091559.rqo2774ba566j5sg@ubuntu.lan> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Wed, 4 Jan 2023 16:11:06 +0000 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 1/4/23 04:15, Lancelot SIX wrote: > Hi Simon, > > On Tue, Jan 03, 2023 at 02:22:16PM -0500, Simon Marchi via Gdb-patches wrote: >> When running the testsuite in a non-optimized build on a slow machine, I >> sometimes get: >> >> UNTESTED: gdb.gdb/selftest.exp: Cannot set breakpoint at captured_main, skipping testcase. >> >> do_self_tests, in lib/selftest-support.exp, uses `with_timeout_factor >> 10`, to account for the fact that reading the debug info of the gdb >> binary (especially in a non-optimized GDB) can take time. But then it >> ends up calling gdb_breakpoint, which uses gdb_expect with a hard-coded >> timeout of 30 seconds. >> >> Fix this by making gdb_breakpoint use gdb_test_multiple, which is a >> desired change anyway for this kind of simple command / expected >> output case. >> >> Change-Id: I9b06ce991cc584810d8cc231b2b4893980b8be75 >> --- >> gdb/testsuite/lib/gdb.exp | 32 +------------------------------- >> 1 file changed, 1 insertion(+), 31 deletions(-) >> >> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp >> index 135ace68d5ed..5a0cd46d8998 100644 >> --- a/gdb/testsuite/lib/gdb.exp >> +++ b/gdb/testsuite/lib/gdb.exp >> @@ -641,9 +641,8 @@ proc gdb_breakpoint { linespec args } { >> >> set test_name "gdb_breakpoint: set breakpoint at $linespec" > > Should you use $test_name as second arg of the call to gdb_test_multiple > you introduce? This way the error cases handled by gdb_test_multiple > will the desired test name. > > Also, I guess that to make is slightly more consistent with other usages > of gdb_test_multiple, $gdb_test_name should be used instead of > $test_name in the untouched actions. Oh, right, I missed that. I folded the test name in the gdb_test_multiple call (removed the test_name var) and used $gdb_test_name in the fail call. I updated the patch locally. Should I add your Reviewed-By after those changes? Simon