Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: Re: [PATCH] gdb/testsuite: add details to failures in gdb_test_multiple
Date: Tue, 15 Dec 2020 00:37:11 -0500	[thread overview]
Message-ID: <dd2f2287-1f7e-1898-88a2-29e70b137027@polymtl.ca> (raw)
In-Reply-To: <20201215040729.30580-1-simon.marchi@polymtl.ca>

On 2020-12-14 11:07 p.m., Simon Marchi via Gdb-patches wrote:
> From: Simon Marchi <simon.marchi@efficios.com>
> 
> 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

      reply	other threads:[~2020-12-15  5:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-15  4:07 Simon Marchi via Gdb-patches
2020-12-15  5:37 ` Simon Marchi via Gdb-patches [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dd2f2287-1f7e-1898-88a2-29e70b137027@polymtl.ca \
    --to=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.com \
    --cc=simon.marchi@polymtl.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox