From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=efficios.com 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) From: Simon Marchi 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-Spam-Status: No, score=-3498.2 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_NONE,KAM_DMARC_STATUS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_SOFTFAIL,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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