This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: FYI: fixlet for linux-dp.exp
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, gdb-patches at sourceware dot org
- Date: Thu, 26 Apr 2012 07:30:51 -0700
- Subject: Re: FYI: fixlet for linux-dp.exp
- References: <8762cndijg.fsf@fleche.redhat.com> <4F9955CD.5040106@redhat.com>
> Bigger items
> ============
> ...
> * Use a throw-away slave interpreter for running each test case.
>
> I think the trouble would be globals that _are_ supposed to be persistent
> across tests, like e.g., "portnum", or whatever other globals board
> files can come up with. We'd need some common way to make
> those "master interp" owned variables (through aliases or env vars?).
> Alternatively, we could save/restore globals, but there's no globals
> standard naming scheme in place to make that remotely sane.
In AdaCore's testsuite, we addressed this sort of problem by
assigning IDs to each slave run. For instance, I routinely run
our testsuite at -j24 on my quad-core laptop, and the main loop
creates a pool of 24 slave processes, and each have a numeric ID
going from 1 to 24. When one is done with a testcase, a new one
with the same ID is started again. For something like "portnum",
I'm guessing that it would be easy to calculate it instead of
treating as a persistent global.
It also happens that we have a way for the main loop to transmit
data from the main loop down to the slave (based on JSON), but
we do not allow the slave to change globals back in the main loop.
The only data that we read back are the testcase results.
--
Joel