public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tom@tromey.com>,
	Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: Re: [PP?] Re: [PATCH] gdb/testsuite: remove perror calls when failing to run
Date: Mon, 5 Dec 2022 16:38:13 -0500	[thread overview]
Message-ID: <dc4ff198-b626-732a-83db-ceb72b0a4a54@simark.ca> (raw)
In-Reply-To: <87h6y9k1mn.fsf@tromey.com>

On 12/5/22 15:59, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
> Simon> The problem is that arrayptr.exp calls perror when failing to run to
> Simon> main, then returns.  perror makes it so that the next test (as in
> Simon> pass/fail) will be recorded as UNRESOLVED.  However, here, the next test
> Simon> (as in pass/fail) is in the next test (as in .exp).  Hence the spurious
> Simon> UNRESOLVED in assign_1.exp.
> 
> Simon> These perror when failing to run to X are not really useful, especially
> Simon> since runto records a FAIL on error, by default.  Remove all the
> Simon> perrors on runto failure I could find.
> 
> Thanks for doing this.  I didn't read the patch, but the idea seems
> sensible to me.

Thanks, I pushed it.

> From the dejagnu description of perror, I wonder if the gdb test suite
> should ever call it:
> 
>     Declares a severe error in the testing framework itself.

I don't reallt understand the point of perror.  If we find a severe
error, why keep running the tests (marking them as UNRESOLVED).  Just
throw an error / abort.

> Simon> I thought of adding a check ran between test (in gdb_finish
> Simon> probably) where we would emit a warning if errcnt > 0, meaning a test
> Simon> quit and left a perror "active".  However, reading that variable would
> Simon> poke into the DejaGNU internals, not sure it's a good idea.
> 
> Perhaps dejagnu itself should be doing this.

Indeed, that would make sense.  I have enough things on my plate though,
I won't pursue this :).

Simon

      reply	other threads:[~2022-12-05 21:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29 21:39 Simon Marchi
2022-12-05 20:59 ` Tom Tromey
2022-12-05 21:38   ` Simon Marchi [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=dc4ff198-b626-732a-83db-ceb72b0a4a54@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.com \
    --cc=tom@tromey.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).