public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: Re: [PATCH] gdb/testsuite: remove perror calls when failing to run
Date: Mon, 05 Dec 2022 13:59:44 -0700	[thread overview]
Message-ID: <87h6y9k1mn.fsf@tromey.com> (raw)
In-Reply-To: <20221129213931.108445-1-simon.marchi@efficios.com> (Simon Marchi via Gdb-patches's message of "Tue, 29 Nov 2022 16:39:31 -0500")

>>>>> "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.

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.

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.

Tom

  reply	other threads:[~2022-12-05 20:59 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 [this message]
2022-12-05 21:38   ` [PP?] " Simon Marchi

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=87h6y9k1mn.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.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).