From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id PD24EZhL2F+RegAAWB0awg (envelope-from ) for ; Tue, 15 Dec 2020 00:37:28 -0500 Received: by simark.ca (Postfix, from userid 112) id 3BD9A1F0AA; Tue, 15 Dec 2020 00:37:28 -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 854C81E965 for ; Tue, 15 Dec 2020 00:37:27 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 05EB4385800D; Tue, 15 Dec 2020 05:37:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 05EB4385800D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1608010647; bh=/pa8au4bm+68F6oaSDxmfW64Den8roDxKx9+NcBu9gM=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=GCSBNbMd42ahsAFB333sYXhqSUqvWv4I1mzRCR+PUmuSjIa0sQS8ahKDq6fQ6enog mF6E55hsmil1/3E0ZLyd7lf15NaQoCxdy3lcvgEiPjjtBFZWpP51XBxl5sqQEc1YXx JHty8GlgaKO8akvVG+XEdoS2XLKvJ21/jahZGCLg= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id E62A2385800D for ; Tue, 15 Dec 2020 05:37:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E62A2385800D Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 0BF5bBKh031123 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Dec 2020 00:37:16 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 0BF5bBKh031123 Received: from [10.0.0.213] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 9E2681E965; Tue, 15 Dec 2020 00:37:11 -0500 (EST) Subject: Re: [PATCH] gdb/testsuite: add details to failures in gdb_test_multiple To: gdb-patches@sourceware.org References: <20201215040729.30580-1-simon.marchi@polymtl.ca> Message-ID: Date: Tue, 15 Dec 2020 00:37:11 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.3 MIME-Version: 1.0 In-Reply-To: <20201215040729.30580-1-simon.marchi@polymtl.ca> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Tue, 15 Dec 2020 05:37:11 +0000 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" On 2020-12-14 11:07 p.m., Simon Marchi via Gdb-patches wrote: > 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)" Err this doesn't work for kfails and xfails. It changes XFAIL: gdb.base/annotate-symlink.exp: continue (PRMS 24915) into XFAIL: gdb.base/annotate-symlink.exp: continue (got prompt) (PRMS 24915) Only the trailing parenthesis gets ignored in the test name, so this won't work. Not sure how to fix that. Simon