From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id oDcAGTNvuGMnHxEAWB0awg (envelope-from ) for ; Fri, 06 Jan 2023 13:57:55 -0500 Received: by simark.ca (Postfix, from userid 112) id 5A9F11E222; Fri, 6 Jan 2023 13:57:55 -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=ItOehUWJ; 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,RCVD_IN_DNSWL_HI, URIBL_BLOCKED autolearn=ham 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 128E11E112 for ; Fri, 6 Jan 2023 13:57:55 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AB16F3858408 for ; Fri, 6 Jan 2023 18:57:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AB16F3858408 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673031473; bh=YgJXnI35g9u2RcI5nwacV0uIJI+PUWI0CHqvQm36XvQ=; 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=ItOehUWJfbR9/0D5IMoPn9CqxAMjD2bfwGqeocjv26EcgvZEaaLFyyWULE/X8B6TE ZYpnQ72GNwot2G1qNwIu7Hu8DtenK/iPC3beCS/hIax2NHydKPmXjuk+01lP8z43Eu Y3ISRiXY2VMVFVjEOL0kFbTZ+5v3b92IzWtzwUEk= Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id 1775E3858D33 for ; Fri, 6 Jan 2023 18:57:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1775E3858D33 X-ASG-Debug-ID: 1673031450-0c856e762a4b70a0001-fS2M51 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id tw8AWYw1PjDL9ldS (version=TLSv1 cipher=AES128-SHA bits=128 verify=NO); Fri, 06 Jan 2023 13:57:30 -0500 (EST) X-Barracuda-Envelope-From: simon.marchi@efficios.com X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from epycamd.internal.efficios.com (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) by smtp.ebox.ca (Postfix) with ESMTP id 97A7E441D64; Fri, 6 Jan 2023 13:57:30 -0500 (EST) X-Barracuda-RBL-IP: 192.222.180.24 X-Barracuda-Effective-Source-IP: 192-222-180-24.qc.cable.ebox.net[192.222.180.24] X-Barracuda-Apparent-Source-IP: 192.222.180.24 To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 1/9] gdb/testsuite/dap: use gdb_assert in gdb.dap/basic-dap.exp Date: Fri, 6 Jan 2023 13:57:21 -0500 X-ASG-Orig-Subj: [PATCH 1/9] gdb/testsuite/dap: use gdb_assert in gdb.dap/basic-dap.exp Message-Id: <20230106185729.42372-2-simon.marchi@efficios.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230106185729.42372-1-simon.marchi@efficios.com> References: <20230106185729.42372-1-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1673031450 X-Barracuda-Encrypted: AES128-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at ebox.ca X-Barracuda-Scan-Msg-Size: 2055 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=5.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.103363 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 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" Use gdb_assert instead of manual pass/fail. Change-Id: I71fbc4e37a0a1ef4783056c7424e932651fa397f --- gdb/testsuite/gdb.dap/basic-dap.exp | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/gdb/testsuite/gdb.dap/basic-dap.exp b/gdb/testsuite/gdb.dap/basic-dap.exp index d3acf0c22c8..c60989d2a6f 100644 --- a/gdb/testsuite/gdb.dap/basic-dap.exp +++ b/gdb/testsuite/gdb.dap/basic-dap.exp @@ -75,12 +75,7 @@ set obj [dap_check_request_and_response "reset breakpoint by line number" \ [format {o source [o path [%s]] breakpoints [a [o line [i %d]]]} \ [list s $srcfile] $line]] set new_line_bpno [dap_get_breakpoint_number $obj] - -if {$new_line_bpno == $line_bpno} { - pass "re-setting kept same breakpoint number" -} else { - fail "re-setting kept same breakpoint number" -} +gdb_assert {$new_line_bpno == $line_bpno} "re-setting kept same breakpoint number" # This uses "&address_breakpoint_here" as the address -- this is a # hack because we know how this is implemented under the hood. @@ -131,21 +126,13 @@ dap_match_values "global value in main" [lindex $obj 0] \ set obj [dap_request_and_response "evaluate non-existing variable" \ evaluate {o expression [s nosuchvariable]}] set d [namespace eval ton::2dict [lindex $obj 0]] -if {[dict get $d success] == "false"} { - pass "result of invalid request" -} else { - fail "result of invalid request" -} +gdb_assert { [dict get $d success] == "false" } "result of invalid request" set obj [dap_check_request_and_response "disassemble one instruction" \ disassemble \ [format {o memoryReference [s %s] instructionCount [i 1]} \ $insn_pc]] set d [namespace eval ton::2dict [lindex $obj 0]] -if {[dict exists $d body instructions]} { - pass "instructions in disassemble output" -} else { - fail "instructions in disassemble output" -} +gdb_assert { [dict exists $d body instructions] } "instructions in disassemble output" dap_shutdown -- 2.38.1