public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [RFC 0/5] Add new "critical" command to test suite
@ 2023-04-15 15:13 Tom Tromey
  2023-04-15 15:13 ` [RFC 1/5] Bug fix in prepare_for_testing Tom Tromey
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Tom Tromey @ 2023-04-15 15:13 UTC (permalink / raw)
  To: gdb-patches

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-04-15 23:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-15 15:13 [RFC 0/5] Add new "critical" command to test suite Tom Tromey
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

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