[RFC,0/5] Add new "critical" command to test suite

Message ID 20230415151336.4104455-1-tom@tromey.com
Headers
Series Add new "critical" command to test suite |

Message

Tom Tromey April 15, 2023, 3:13 p.m. UTC
  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