public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Hans-Peter Nilsson <hp@axis.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 04/12] sim/testsuite/cris/c: Use -sim3 but only for newlib targets
Date: Wed, 16 Feb 2022 02:34:31 -0500	[thread overview]
Message-ID: <YgypB7Wc2wR7skK2@vapier> (raw)
In-Reply-To: <20220216060745.ADD9A2040B@pchp3.se.axis.com>

[-- Attachment #1: Type: text/plain, Size: 4859 bytes --]

On 16 Feb 2022 07:07, Hans-Peter Nilsson wrote:
> Date: Wed, 16 Feb 2022 00:25:07 -0500 Mike Frysinger <vapier@gentoo.org>
> > On 15 Feb 2022 00:02, Hans-Peter Nilsson via Gdb-patches wrote:
> > > Commit a39487c6685f "sim: cris: use -sim with C tests for cris-elf
> > > targets" caused " -sim" to be appended to CFLAGS_FOR_TARGET for
> > > cris*-*-elf, where testing had until then relied on
> > > "RUNTESTFLAGS=--target_board=cris-sim" being passed when running "make
> > > check-sim", adding the right options.  While "-sim" happens to work,
> > > the baseboard-file cris-sim.exp uses "-sim3" so for consistency use
> > > that instead.
> > > 
> > > Then commit b42f20d2ac72 "sim: testsuite: drop most specific istarget
> > > checks" caused " -sim" to be appended for *all* targets, which just
> > > doesn't work.  For example, for crisv32-linux-gnu, that's not a
> > > recognized option and will cause a dejagnu error and further testing
> > > in c.exp will be aborted.
> > > 
> > > While cris-sim.exp appends "-static" for *-linux-gnu, further changes
> > > in the test-suite have caused "linux"-specific tests to break, so that
> > > part will be tended to separately.
> > > 
> > > But, save and restore CFLAGS_FOR_TARGET around the modification and
> > > use where needed, to not have the CRIS-specific modification affect a
> > > continuing test-run (possibly for other targets).
> > 
> > i'm trying to get away from needing dejagnu boards at all.  it brings nothing
> > to the table when it comes to testing the sim itself.
> 
> I know you're of that opinion, but I'll say this once again (it
> was decades ago last time): you're wrong.  This leads you to
> discarding half of dejagnu and working *against* it rather than
> *with it*.

i think you're overstating what it has to offer to the sim.  it can be useful
for people to define targets to run programs against (e.g. defining different
sim or hardware or remote systems), but none of that matters here.  we have
full control over the sim runtime and do not care about any of the other
aspects like running against real hardware.

> >  ideally we should have
> > a single sim binary that supports all targets simultaneously, and it's only
> > runtime options (or dynamic probing) that selects between them.  that's why
> > #progos was introduced -- so tests could declare which env they're targeting
> > and the test framework can run the simulator with the right settings.
> > 
> > one can now do:
> > $ ./configure --enable-targets=all
> > $ make check-sim
> > 
> > and every architecture will be built & tested.  no need for multiple build
> > dirs for diff targets or sep runs with diff runtestflags.
> 
> Right, I figured that's your preferred setup.  You can certainly
> make dejagnu baseboards work in this scenario: just call *each*
> of the one one that fits when testing *each* simulator, and
> clear the slate in-between.

this requires people to get their baseboards into dejagnu, and for a dejagnu
release to be made, and for these settings to be kept in sync.  releases are
way too slow on the dejagnu front.

people also tend to write their baseboards for their own setup they're using
which doesn't generalize.

`make check` should work out of the box for all targets & sim functionality
for everyone.  if they have to fumble about with runtestflags or any other
dejagnu settings, then the testsuite is doing it wrong.

if gas & ld ever get multitarget support, we'd have an even easier time with
all the xxx_FOR_TARGET_xxx settings.

again, i'm speaking only about the sim here.  something like gcc going through
dejagnu baseboards for the sim or real hardware makes sense.

> > at some point i also want to delete all the custom compile+run logic in the
> > testsuite/cris/ tree.  that's why i spent so much time pulling code out and
> > into the common one.
> 
> The baby went with the bath-water here.  (Or IOW, if you pull
> out *all* of the test-suites the testsuite will be really
> simple!)

the "baby" is the tests.  i'm not talking about deleting the tests.  there is
no reason cris should be parsing or compiling or linking or running any tests
on its own.  the functionality it wants is by no means unique to cris.

> > i even have a poc locally that deletes the dejagnu framework entirely and
> > switches to Automake test harness, but i haven't quite figured out how to
> > cleanly handle the all_machs multiplex logic in Automake.  i eventually
> > pulled out individual cleanups and merged them so at least `make check`
> > works in a multi-target build, and isn't nearly as slow as it was.
> 
> Ouch.  I haven't found the "automake test harness" to be of use
> for serious testing.

i'm not a fan of a framework that can't fathom a system with more than 1 cpu.
-mike

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-02-16  7:34 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-14 22:58 [PATCH 00/12] A little TLC for the simulators (in particular CRIS) Hans-Peter Nilsson
2022-02-14 22:59 ` [PATCH 01/12] sim cris: Correct PRIu32 to PRIx32 Hans-Peter Nilsson
2022-02-16  4:43   ` Mike Frysinger
2022-02-14 23:02 ` [PATCH 03/12] sim/testsuite: Set global_cc_os also when no compiler is found Hans-Peter Nilsson
2022-02-16  4:42   ` Mike Frysinger
2022-02-14 23:02 ` [PATCH 04/12] sim/testsuite/cris/c: Use -sim3 but only for newlib targets Hans-Peter Nilsson
2022-02-15 17:43   ` Dimitar Dimitrov
2022-02-15 22:49     ` Hans-Peter Nilsson
2022-02-16  5:25   ` Mike Frysinger
2022-02-16  6:07     ` Hans-Peter Nilsson
2022-02-16  7:34       ` Mike Frysinger [this message]
2022-02-16  5:39   ` Mike Frysinger
2022-02-16  6:09     ` Hans-Peter Nilsson
2022-02-16  7:17       ` Mike Frysinger
2022-02-16 15:27         ` Hans-Peter Nilsson
2022-02-14 23:03 ` [PATCH 06/12] sim/testsuite: Support "requires: simoption <--name-of-option>" Hans-Peter Nilsson
2022-02-16  4:49   ` Mike Frysinger
2022-02-16  6:24     ` Hans-Peter Nilsson
2022-02-16  7:09       ` Mike Frysinger
2022-02-16 15:25         ` Hans-Peter Nilsson
2022-02-14 23:05 ` [PATCH 08/12] sim cris: Unbreak --disable-sim-hardware builds Hans-Peter Nilsson
2022-02-16  4:51   ` Mike Frysinger
2022-02-16  5:54     ` Hans-Peter Nilsson
2022-02-16  6:48       ` Hans-Peter Nilsson
2022-02-16  7:15       ` Mike Frysinger
2022-02-14 23:05 ` [PATCH 09/12] sim: Fix use of out-of-tree assembler and linker when testing Hans-Peter Nilsson
2022-02-16  5:03   ` Mike Frysinger
2022-02-14 23:06 ` [PATCH 10/12] sim: Add sim_dump_memory for debugging Hans-Peter Nilsson
2022-02-16  5:02   ` Mike Frysinger
2022-02-16  6:10     ` Hans-Peter Nilsson
2022-02-16  6:41     ` Hans-Peter Nilsson
2022-02-17  2:05     ` Hans-Peter Nilsson
2022-02-17  5:30       ` Mike Frysinger
2022-02-14 23:07 ` [PATCH 11/12] sim/testsuite/cris: Remove faulty use of basename in C tests Hans-Peter Nilsson
2022-02-16  4:57   ` Mike Frysinger
2022-02-16  6:44     ` Hans-Peter Nilsson

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=YgypB7Wc2wR7skK2@vapier \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    --cc=hp@axis.com \
    /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).