public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Thomas Schwinge <thomas@codesourcery.com>
Cc: Tom de Vries <tdevries@suse.de>,
	gcc@gcc.gnu.org,  Segher Boessenkool <segher@kernel.crashing.org>
Subject: Re: DejaGnu: flags via 'RUNTESTFLAGS' overriding those specified in test cases
Date: Wed, 28 Sep 2022 15:12:23 +0100	[thread overview]
Message-ID: <CAH6eHdRUFA75ubWSCsG-Z5CM5WCEVhyweXc2WziB84qQ5hBtOg@mail.gmail.com> (raw)
In-Reply-To: <871qrvlibb.fsf@euler.schwinge.homeip.net>

On Wed, 28 Sept 2022 at 14:50, Thomas Schwinge <thomas@codesourcery.com> wrote:
>
> Hi!
>
> On 2022-02-04T13:09:29+0100, Tom de Vries via Gcc <gcc@gcc.gnu.org> wrote:
> > On 2/4/22 08:21, Thomas Schwinge wrote:
> >> On 2022-02-03T13:35:55+0000, "vries at gcc dot gnu.org via Gcc-bugs" <gcc-bugs@gcc.gnu.org> wrote:
> >>> while iterating over dimensions { -mptx=3.1 , -mptx=6.3 } x { GOMP_NVPTX_JIT=-O0, <default> }.
> >>
> >> Do you use separate (nvptx-none offload target only?) builds for
> >> different '-mptx' variants (likewise: '-misa'), or have you hacked up the
> >> multilib configuration?
> >
> > Neither, I'm using --target_board=unix/foffload= for that.
>
> OK, so that's for libgomp nvptx offloading testing.
>
> What about nvptx target testing:
> 'gcc/testsuite/gcc.target/nvptx/nvptx.exp'.
>
> We have a DejaGnu board file, say 'BOARD', invoking the nvptx-tools
> 'nvptx-none-run' launcher
> (<https://github.com/MentorEmbedded/nvptx-tools/>):
>
>     $ make check RUNTESTFLAGS='--target_board=BOARD'
>
> That generally works as expected.
>
> But now suppose that 'BOARD' needs '-mptx=3.1', because old CUDA, for
> example.  Running the obvious '--target_board=BOARD/-mptx=3.1' FAILs in a
> number of 'gcc.target/nvptx/nvptx.exp' test cases, for example:
>
>     FAIL: gcc.target/nvptx/alias-1.c (test for excess errors)
>     Excess errors:
>     [...]/gcc.target/nvptx/alias-1.c:13:6: error: alias definitions not supported in this configuration
>
> That's because we then invoke GCC as follows:
>
>     [GCC] [...]/gcc.target/nvptx/alias-1.c [...] -malias -mptx=6.3 [...] -mptx=3.1 -o ./alias-1.exe
>
> Here, '-malias -mptx=6.3' are due to 'dg-add-options ptx_alias' in the
> test case, but our '-mptx=3.1' overrides that, thus FAIL.  I think these
> would work if the '-mptx=3.1' came first?

Which version of Dejagnu are you using? There was a fix in 6.1 or 6.2
to change the order that the RUNTESTFLAGS and dg-options get added to
the command line.

It's a pain to make the testsuite work consistently for both old and
new versions. I would be very happy if we just said you need a modern
version of Dejagnu, and relied on the semantics in the newer versions.

  reply	other threads:[~2022-09-28 14:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-104364-4@http.gcc.gnu.org/bugzilla/>
     [not found] ` <bug-104364-4-ILKfZXTaRC@http.gcc.gnu.org/bugzilla/>
2022-02-04  7:21   ` nvptx multilib setup (was: [Bug target/104364] [12 Regression] OpenMP/nvptx regressions after "[nvptx] Add some support for .local atomics") Thomas Schwinge
2022-02-04 12:09     ` Tom de Vries
2022-05-13 14:20       ` nvptx multilib setup Thomas Schwinge
2022-09-28 13:50       ` DejaGnu: flags via 'RUNTESTFLAGS' overriding those specified in test cases Thomas Schwinge
2022-09-28 14:12         ` Jonathan Wakely [this message]
2022-09-28 15:39           ` Segher Boessenkool
2022-09-29  8:18             ` Thomas Schwinge

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=CAH6eHdRUFA75ubWSCsG-Z5CM5WCEVhyweXc2WziB84qQ5hBtOg@mail.gmail.com \
    --to=jwakely.gcc@gmail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=segher@kernel.crashing.org \
    --cc=tdevries@suse.de \
    --cc=thomas@codesourcery.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).