public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Subject: [RFC 0/5] Add new "critical" command to test suite
Date: Sat, 15 Apr 2023 09:13:31 -0600	[thread overview]
Message-ID: <20230415151336.4104455-1-tom@tromey.com> (raw)

This introduces a new "critical" command to the test suite.  The idea
here is to replace typical uses of "if ... { return }" with a simpler
notation.  Centralizing this also lets us decide -- like "require" --
whether to use untested or unsupported.

This command has a bit of a conceptual overlap with "require".  I tend
to think of "require" as expressing static properties of the test,
whereas "critical" is used to early abort if certain runtime
operations fail; but this isn't enforced.

Anyway, unlike require, "critical" can handle multiple arguments and a
variety of return value conventions.  It is implemented as a Tcl
namespace ensemble for this reason.

In this series, I converted gdb.rust to the new scheme, just to show
how it works.  I'm sending it as an RFC for discussion.  If it seems
ok, I thought I'd write some scripts to mass convert the rest of the
test suite.

Tom



             reply	other threads:[~2023-04-15 15:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-15 15:13 Tom Tromey [this message]
2023-04-15 15:13 ` [RFC 1/5] Bug fix in prepare_for_testing Tom Tromey
2023-04-15 15:13 ` [RFC 2/5] Introduce the "critical" testsuite command Tom Tromey
2023-04-15 23:35   ` Kevin Buettner
2023-04-15 15:13 ` [RFC 3/5] Use "critical ensure_gdb_index" in gdb.rust Tom Tromey
2023-04-15 15:13 ` [RFC 4/5] Use "critical prepare_for_testing" " Tom Tromey
2023-04-15 15:13 ` [RFC 5/5] Use "critical runto" " Tom Tromey

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=20230415151336.4104455-1-tom@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    /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).