[00/27] Many small testsuite cleanups

Message ID 20230125224614.1006886-1-tom@tromey.com
Headers
Series Many small testsuite cleanups |

Message

Tom Tromey Jan. 25, 2023, 10:45 p.m. UTC
  I noticed a few things in the test suite that looked off, so I wrote
some patches to clean it up.  Each patch should be reasonably
self-explanatory.

I started this because I was vaguely considering changing code like
this:

    if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug}]} {
	return -1
    }

to some kind of require-like thing.  The idea here is that there are a
number of things that "shouldn't fail" -- gdb_compile,
prepare_for_testing, clean_restart, runto, runto_main -- each with
their own error return convention, where existing tests take failure
to mean immediately stop.

Instead of this, we could have a namespace that knows the conventions
for each supported proc and then works a bit like require, so:

    critical prepare_for_testing ...

This could then be a central spot to issue an unsupported (or untested
if we go that way).

Tested on x86-64 Fedora 36.

Tom
  

Comments

Pedro Alves Jan. 26, 2023, 5:37 p.m. UTC | #1
On 2023-01-25 10:45 p.m., Tom Tromey wrote:
> I noticed a few things in the test suite that looked off, so I wrote
> some patches to clean it up.  Each patch should be reasonably
> self-explanatory.
> 

I read the whole thing, and the only thing that jumped out at me was
the gdb_file_cmd vs gdb_load issue I pointed out in another email.

Everything else looked OK.

Thanks for doing this.