From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Ghg4IYY22F9feAAAWB0awg (envelope-from ) for ; Mon, 14 Dec 2020 23:07:34 -0500 Received: by simark.ca (Postfix, from userid 112) id 7AA7A1F0AA; Mon, 14 Dec 2020 23:07:34 -0500 (EST) 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 B84CD1E590 for ; Mon, 14 Dec 2020 23:07:33 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 31096385800D; Tue, 15 Dec 2020 04:07:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 31096385800D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1608005253; bh=25zneamKHJgs23vTLMfjnCWR61iRliu20PY/SG//gHI=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=IpwCSrwot9zfSsFDzq40S+5gr/dkgy4ud0OykTAMj3yW4YKsODYH7MZiWT9KCplG0 8Qms0ycFMyd/VF0Qm/G0hu/1/1qam2GdBEvY7NNSMCorHA+oMesfzTXCzBcQoOA/a8 cuBB0XaHwzIGKSEJhmcEgajGVrInuuRpKudzoKKs= Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id 03CB3385800D for ; Tue, 15 Dec 2020 04:07:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 03CB3385800D X-ASG-Debug-ID: 1608005249-0c856e6cd547e360001-fS2M51 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id MrD9xrhbHKoqeLzg (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 14 Dec 2020 23:07:29 -0500 (EST) X-Barracuda-Envelope-From: simon.marchi@polymtl.ca X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from simark.localdomain (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) by smtp.ebox.ca (Postfix) with ESMTP id B81D0441D64; Mon, 14 Dec 2020 23:07:29 -0500 (EST) X-Barracuda-RBL-IP: 192.222.157.6 X-Barracuda-Effective-Source-IP: 192-222-157-6.qc.cable.ebox.net[192.222.157.6] X-Barracuda-Apparent-Source-IP: 192.222.157.6 To: gdb-patches@sourceware.org Subject: [PATCH] gdb/testsuite: add details to failures in gdb_test_multiple Date: Mon, 14 Dec 2020 23:07:29 -0500 X-ASG-Orig-Subj: [PATCH] gdb/testsuite: add details to failures in gdb_test_multiple Message-Id: <20201215040729.30580-1-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1608005249 X-Barracuda-Encrypted: DHE-RSA-AES256-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: 2631 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=8.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.86533 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 Cc: Simon Marchi Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" From: Simon Marchi Some fails in gdb_test_multiple already include a description of why the failure happened in parenthesis. Add such a description to more cases, this will hopefully help a little bit when tracking failures (at least it helped me). As a reminder: the trailing parenthesis is ignored when comparing test names, so it's a good way to provide some insight in on the failure. gdb/testsuite/ChangeLog: * lib/gdb.exp (gdb_test_multiple): Add descriptions to failures. Change-Id: I6d7c9ed4450b388fbc2729f302abffba766b7ba6 --- gdb/testsuite/lib/gdb.exp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 94bdf1ac856f..a47355b39799 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -1098,12 +1098,12 @@ proc gdb_test_multiple { command message args } { } -re "Undefined\[a-z\]* command:.*$prompt_regexp" { perror "Undefined command \"$command\"." - fail "$message" + fail "$message (undefined command)" set result 1 } -re "Ambiguous command.*$prompt_regexp" { perror "\"$command\" is not a unique command name." - fail "$message" + fail "$message (ambiguous command)" set result 1 } -re "$inferior_exited_re with code \[0-9\]+.*$prompt_regexp" { @@ -1135,14 +1135,14 @@ proc gdb_test_multiple { command message args } { } -re "\r\n$prompt_regexp" { if ![string match "" $message] then { - fail "$message" + fail "$message (got prompt)" } set result 1 } -re "$pagination_prompt" { send_gdb "\n" perror "Window too small." - fail "$message" + fail "$message (got pagination)" set result -1 } -re "\\((y or n|y or \\\[n\\\]|\\\[y\\\] or n)\\) " { @@ -1164,7 +1164,7 @@ proc gdb_test_multiple { command message args } { set wait_status [wait -i $gdb_spawn_id] verbose -log "GDB process exited with wait status $wait_status" if { $message != "" } { - fail "$message" + fail "$message (GDB process no longer exists)" } return -1 } @@ -1184,13 +1184,13 @@ proc gdb_test_multiple { command message args } { eof { perror "Process no longer exists" if { $message != "" } { - fail "$message" + fail "$message (process no longer exists)" } return -1 } full_buffer { perror "internal buffer is full." - fail "$message" + fail "$message (internal buffer is full)" set result -1 } timeout { -- 2.29.2