From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id yNrjFEhrfmMC0BsAWB0awg (envelope-from ) for ; Wed, 23 Nov 2022 13:49:44 -0500 Received: by simark.ca (Postfix, from userid 112) id 52BB21E124; Wed, 23 Nov 2022 13:49:44 -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=wIJHB8Vu; 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=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.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 0D9401E0CB for ; Wed, 23 Nov 2022 13:49:44 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B18CC38518BA for ; Wed, 23 Nov 2022 18:49:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B18CC38518BA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669229383; bh=l/H0mYlrw8sAtg9ES6CHwSjWxsDCK3+rDLzI46SJbuY=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=wIJHB8VuBwQ5MD0xwpKvAag8v8vXpfZxCZ12hXp8A7XBBRq4ntF9iyXrs+iRe6Mdh PIH5fQp1ovKl4Qef3WImPL9iSalHyrSun/iiYWLhXwXuneciZbW08VFGTRl7NIHrOJ 2O+Ay+RfiAjFaHbrOMa9a10ERiXQOEY4v3bzDbDs= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 52DE838518AA for ; Wed, 23 Nov 2022 18:48:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 52DE838518AA 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 2ANImpH6001021 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Nov 2022 13:48:56 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 2ANImpH6001021 Received: from simark.localdomain (unknown [217.28.27.60]) (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 ESMTPSA id CC1851E12D; Wed, 23 Nov 2022 13:42:06 -0500 (EST) To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 12/14] gdb/testsuite/gdb.base/break.exp: split test_no_break_on_catchpoint Date: Wed, 23 Nov 2022 13:39:57 -0500 Message-Id: <20221123183959.2476477-13-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221123183959.2476477-1-simon.marchi@polymtl.ca> References: <20221123183959.2476477-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Wed, 23 Nov 2022 18:48:51 +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" Change-Id: Ifa7070943f1de22c2839fedf5f346d6591bb5a76 --- gdb/testsuite/gdb.base/break.exp | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp index a5ef521a4b0a..4a2f130ff290 100644 --- a/gdb/testsuite/gdb.base/break.exp +++ b/gdb/testsuite/gdb.base/break.exp @@ -478,21 +478,27 @@ gdb_test "info break" "Num Type.*Disp Enb Address.*What.*\[\r\n\] # Verify that catchpoints for fork, vfork and exec don't trigger # inappropriately. (There are no calls to those system functions # in this test program.) -# -if ![runto_main] then { - return -} -gdb_test "catch fork" "Catchpoint \[0-9\]+ \\(fork\\)" \ - "set catch fork, never expected to trigger" +proc_with_prefix test_no_break_on_catchpoint {} { + clean_restart break + + if ![runto_main] then { + return + } + + gdb_test "catch fork" "Catchpoint \[0-9\]+ \\(fork\\)" \ + "set catch fork, never expected to trigger" -gdb_test "catch vfork" "Catchpoint \[0-9\]+ \\(vfork\\)" \ - "set catch vfork, never expected to trigger" + gdb_test "catch vfork" "Catchpoint \[0-9\]+ \\(vfork\\)" \ + "set catch vfork, never expected to trigger" -gdb_test "catch exec" "Catchpoint \[0-9\]+ \\(exec\\)" \ - "set catch exec, never expected to trigger" + gdb_test "catch exec" "Catchpoint \[0-9\]+ \\(exec\\)" \ + "set catch exec, never expected to trigger" + + gdb_continue_to_end +} -gdb_continue_to_end +test_no_break_on_catchpoint # Verify that GDB responds gracefully when asked to set a breakpoint # on a nonexistent source line. -- 2.38.1