From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 2PztD3GrTWESNAAAWB0awg (envelope-from ) for ; Fri, 24 Sep 2021 06:41:53 -0400 Received: by simark.ca (Postfix, from userid 112) id 3C3191EE25; Fri, 24 Sep 2021 06:41:53 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=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 58FC51EDDB for ; Fri, 24 Sep 2021 06:41:52 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A200D3858423 for ; Fri, 24 Sep 2021 10:41:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A200D3858423 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1632480111; bh=ivxxUlnziRkccZjMsVX2RjJjZGv7HEWgCKzytOIsEMA=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=A54pkT+7QTbtAvx47rr1kVOgdHF1O7A1zwLQrjwVWe1WTiqsVRdCdyXjzAo+b4UjT W+o/AQYXzi4cNvPuOS9cJbVPR1/a4Wv/SRgUrtXbz8hEtzI6paJHEycpohqchmo9W3 dv2E0L3IguMMGWKFaeDhdKvyhbX5a5JM6lGw36mI= Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id BCF693858423 for ; Fri, 24 Sep 2021 10:41:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BCF693858423 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 044CF223E0 for ; Fri, 24 Sep 2021 10:41:08 +0000 (UTC) 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 E6F2013E14 for ; Fri, 24 Sep 2021 10:41:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +9VZN0OrTWE2WAAAMHmgww (envelope-from ) for ; Fri, 24 Sep 2021 10:41:07 +0000 Date: Fri, 24 Sep 2021 12:41:06 +0200 To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix DUPLICATEs gdb.dwarf2/dw2-is-stmt.exp Message-ID: <20210924104104.GA1555@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) 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: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi, Fix these DUPLICATEs by using with_test_prefix: ... DUPLICATE: gdb.dwarf2/dw2-is-stmt.exp: ensure we saw a valid line pattern, 1 DUPLICATE: gdb.dwarf2/dw2-is-stmt.exp: ensure we saw a valid line pattern, 2 ... Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix DUPLICATEs gdb.dwarf2/dw2-is-stmt.exp --- gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp | 100 +++++++++++++++++-------------- 1 file changed, 54 insertions(+), 46 deletions(-) diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp index bb0afe1c282..a226b6d7323 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp @@ -188,59 +188,67 @@ runto_main # be a single instruction between line_label_1 and line_label_2, but # we allow for up to 25 (just a random number). -set i 0 -set pc [get_hexadecimal_valueof "\$pc" "NO-PC" \ - "get pc before stepi loop at line_label_1"] -while { $pc < $ll2 } { - incr i - set line_changed -1 - gdb_test_multiple "stepi" "stepi until line_label_2, $i" { - -re "main, set var to 99.*$gdb_prompt" { - set line_changed 0 - } - -re "main, set var to 0.*$gdb_prompt " { - set line_changed 1 - } - } - gdb_assert { $line_changed != -1 } \ - "ensure we saw a valid line pattern, $i" +with_test_prefix "stepi until line_label_2" { + set i 0 set pc [get_hexadecimal_valueof "\$pc" "NO-PC" \ - "get pc inside stepi loop from line_label_1, $i"] - if { $ll2 == $pc } { - gdb_assert { $line_changed } \ - "line must change at line_label_2" - } else { - gdb_assert { !$line_changed } \ - "line should not change until line_label_2, $i" + "get pc before stepi loop at line_label_1"] + while { $pc < $ll2 } { + incr i + with_test_prefix $i { + set line_changed -1 + gdb_test_multiple "stepi" "stepi until line_label_2" { + -re "main, set var to 99.*$gdb_prompt" { + set line_changed 0 + } + -re "main, set var to 0.*$gdb_prompt " { + set line_changed 1 + } + } + gdb_assert { $line_changed != -1 } \ + "ensure we saw a valid line pattern" + set pc [get_hexadecimal_valueof "\$pc" "NO-PC" \ + "get pc inside stepi loop from line_label_1"] + if { $ll2 == $pc } { + gdb_assert { $line_changed } \ + "line must change at line_label_2" + } else { + gdb_assert { !$line_changed } \ + "line should not change until line_label_2" + } + } } } # Now single instruction step forward until GDB reports a new source # line, at which point we should be at line_label_5. -set i 0 -set pc [get_hexadecimal_valueof "\$pc" "NO-PC" \ - "get pc before stepi loop at line_label_2"] -while { $pc < $ll5 } { - incr i - set line_changed -1 - gdb_test_multiple "stepi" "stepi until line_label_5, $i" { - -re "main, set var to 0.*$gdb_prompt" { - set line_changed 0 - } - -re "main end.*$gdb_prompt " { - set line_changed 1 - } - } - gdb_assert { $line_changed != -1 } \ - "ensure we saw a valid line pattern, $i" +with_test_prefix "stepi until line_label_5" { + set i 0 set pc [get_hexadecimal_valueof "\$pc" "NO-PC" \ - "get pc inside stepi loop from line_label_2, $i"] - if { $ll5 == $pc } { - gdb_assert { $line_changed } \ - "line must change at line_label_5" - } else { - gdb_assert { !$line_changed } \ - "line should not change until line_label_5, $i" + "get pc before stepi loop at line_label_2"] + while { $pc < $ll5 } { + incr i + with_test_prefix $i { + set line_changed -1 + gdb_test_multiple "stepi" "stepi until line_label_5" { + -re "main, set var to 0.*$gdb_prompt" { + set line_changed 0 + } + -re "main end.*$gdb_prompt " { + set line_changed 1 + } + } + gdb_assert { $line_changed != -1 } \ + "ensure we saw a valid line pattern" + set pc [get_hexadecimal_valueof "\$pc" "NO-PC" \ + "get pc inside stepi loop from line_label_2"] + if { $ll5 == $pc } { + gdb_assert { $line_changed } \ + "line must change at line_label_5" + } else { + gdb_assert { !$line_changed } \ + "line should not change until line_label_5" + } + } } }