From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 0FERCcVnoWE6QAAAWB0awg (envelope-from ) for ; Fri, 26 Nov 2021 18:03:33 -0500 Received: by simark.ca (Postfix, from userid 112) id 2322A1F0CE; Fri, 26 Nov 2021 18:03:33 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 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 8629F1EDF0 for ; Fri, 26 Nov 2021 18:03:32 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E7F373857C60 for ; Fri, 26 Nov 2021 23:03:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E7F373857C60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1637967811; bh=aPfEFdgxMiThOPSYYZ5Um6AKg+d1coXddLshQudsn9U=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=ATm7b6K3LrZjCNNLB8hRlHmCv3R8qVjDTXM1KhmK9LC3bXx2G5re1pljI2KDW4FBD ScX7bH7Q7GMT7Y1O/uZoKI89pfVHMYBVcbsklD4aWS8F71eqZ9gNAtTAc/o5vnhQX3 5x/cJ3xfNrmW2H7Wy4Qtb10fQZ3VIktVJ/0mTvno= Received: from lndn.lancelotsix.com (lndn.lancelotsix.com [51.195.220.111]) by sourceware.org (Postfix) with ESMTPS id 520933858414 for ; Fri, 26 Nov 2021 23:01:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 520933858414 Received: from Plymouth.lan (unknown [IPv6:2a02:390:9086:0:a47d:3441:84f3:f4bc]) by lndn.lancelotsix.com (Postfix) with ESMTPSA id F27378573F; Fri, 26 Nov 2021 23:00:58 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH 04/12] gdb/testsuite: Remove duplicates from gdb.mi/mi-catch-load.exp Date: Fri, 26 Nov 2021 23:00:30 +0000 Message-Id: <20211126230038.103225-5-lsix@lancelotsix.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211126230038.103225-1-lsix@lancelotsix.com> References: <20211126230038.103225-1-lsix@lancelotsix.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.11 (lndn.lancelotsix.com [0.0.0.0]); Fri, 26 Nov 2021 23:00:59 +0000 (UTC) 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: Lancelot SIX via Gdb-patches Reply-To: Lancelot SIX Cc: Lancelot SIX Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" When I run the testsuite, I have: Running .../gdb/testsuite/gdb.mi/mi-catch-load.exp ... DUPLICATE: gdb.mi/mi-catch-load.exp: breakpoint at main DUPLICATE: gdb.mi/mi-catch-load.exp: mi runto main Fix by grouping the various phases in with_test_prefix blocks. Tested on x86_64-linux --- gdb/testsuite/gdb.mi/mi-catch-load.exp | 77 ++++++++++++++------------ 1 file changed, 41 insertions(+), 36 deletions(-) diff --git a/gdb/testsuite/gdb.mi/mi-catch-load.exp b/gdb/testsuite/gdb.mi/mi-catch-load.exp index cbd3967f47a..431db68c5c6 100644 --- a/gdb/testsuite/gdb.mi/mi-catch-load.exp +++ b/gdb/testsuite/gdb.mi/mi-catch-load.exp @@ -40,48 +40,53 @@ if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcfile2}" ${binfile2} {debug}] ! return -1 } -mi_clean_restart $binfile -mi_runto_main - # test -catch-load -mi_gdb_test "111-gdb-set auto-solib-add on" "111\\^done" "catch-load: auto-solib-add on" -mi_gdb_test "222-catch-load -t mi-catch-load-so.so*" \ - "222\\^done,bkpt=\{number=\"2\",type=\"catchpoint\",disp=\"del\",enabled=\"y\",what=\"load of library matching mi-catch-load-so\.so\\*\",catch-type=\"load\",thread-groups=\\\[\"i1\"\\\],times=\"0\"\}" \ - "catch-load: catch load" -mi_send_resuming_command "exec-continue" "catch-load: continue" +with_test_prefix "test -catch-load" { + mi_clean_restart $binfile + mi_runto_main -gdb_expect { - -re "\\*stopped.*reason=\"solib-event\".*added=.*\r\n.*\r\n$mi_gdb_prompt$" { - pass "catch-load: solib-event stop" - } - -re ".*$mi_gdb_prompt$" { - setup_kfail mi/15945 *-*-*mingw* - fail "catch-load: solib-event stop" - } - timeout { - fail "(timeout) catch-load: solib-event stop" + mi_gdb_test "111-gdb-set auto-solib-add on" "111\\^done" \ + "catch-load: auto-solib-add on" + mi_gdb_test "222-catch-load -t mi-catch-load-so.so*" \ + "222\\^done,bkpt=\{number=\"2\",type=\"catchpoint\",disp=\"del\",enabled=\"y\",what=\"load of library matching mi-catch-load-so\.so\\*\",catch-type=\"load\",thread-groups=\\\[\"i1\"\\\],times=\"0\"\}" \ + "catch-load: catch load" + mi_send_resuming_command "exec-continue" "catch-load: continue" + + gdb_expect { + -re "\\*stopped.*reason=\"solib-event\".*added=.*\r\n.*\r\n$mi_gdb_prompt$" { + pass "catch-load: solib-event stop" + } + -re ".*$mi_gdb_prompt$" { + setup_kfail mi/15945 *-*-*mingw* + fail "catch-load: solib-event stop" + } + timeout { + fail "(timeout) catch-load: solib-event stop" + } } } -mi_clean_restart $binfile -mi_runto_main - # test -catch-unload -mi_gdb_test "111-gdb-set auto-solib-add on" "111\\^done" "catch-unload: auto-solib-add on" -mi_gdb_test "222-catch-unload -t mi-catch-load-so.so*" \ - "222\\^done,bkpt=\{number=\"2\",type=\"catchpoint\",disp=\"del\",enabled=\"y\",what=\"unload of library matching mi-catch-load-so\.so\\*\",catch-type=\"unload\",thread-groups=\\\[\"i1\"\\\],times=\"0\"\}" \ - "catch-unload: catch unload" -mi_send_resuming_command "exec-continue" "catch-unload: continue" +with_test_prefix "test -catch-unload" { + mi_clean_restart $binfile + mi_runto_main -gdb_expect { - -re "\\*stopped.*reason=\"solib-event\".*removed=.*\r\n.*\r\n$mi_gdb_prompt$" { - pass "catch-unload: solib-event stop" - } - -re ".*$mi_gdb_prompt$" { - setup_kfail mi/15945 *-*-*mingw* - fail "catch-unload: solib-event stop" - } - timeout { - fail "(timeout) catch-unload: solib-event stop" + mi_gdb_test "111-gdb-set auto-solib-add on" "111\\^done" "catch-unload: auto-solib-add on" + mi_gdb_test "222-catch-unload -t mi-catch-load-so.so*" \ + "222\\^done,bkpt=\{number=\"2\",type=\"catchpoint\",disp=\"del\",enabled=\"y\",what=\"unload of library matching mi-catch-load-so\.so\\*\",catch-type=\"unload\",thread-groups=\\\[\"i1\"\\\],times=\"0\"\}" \ + "catch-unload: catch unload" + mi_send_resuming_command "exec-continue" "catch-unload: continue" + + gdb_expect { + -re "\\*stopped.*reason=\"solib-event\".*removed=.*\r\n.*\r\n$mi_gdb_prompt$" { + pass "catch-unload: solib-event stop" + } + -re ".*$mi_gdb_prompt$" { + setup_kfail mi/15945 *-*-*mingw* + fail "catch-unload: solib-event stop" + } + timeout { + fail "(timeout) catch-unload: solib-event stop" + } } } -- 2.33.1