... Maybe I was a bit hasty and should double-check some details on the
most extreme examples of "not really testing anything on other targets".
The testcases cancel_incr_wraparound.c and barrier_generation_overflow.c
go through enough barriers to just overflow the generation numbers'
allocated bitfields. They then ensure a thread handles a task on the
first iteration it is indeed overflowed.
Running these on other targets checks running a task after a large
number of barriers have completed -- not really exercising anything
special in the code.
At least for the `barrier_generation_overflow.c` test I could have it
test the handling of barrier generation overflow on other targets by
predicating a `dg-additional-options` directive with a much larger
number of iterations on a target that is not `linux_futex_waitv`.
That would require keeping this this effective target in the testsuite.
Is your preference to run the same test on all targets (with the
knowledge that it's not testing anything particularly significant on
other targets, but the testcase should still work)?
Alternatively would your preference be to have the testcase test
generation overflow properly and include the relevant effective target?
Cheers,
Matthew
On 11/5/26 14:24, Matthew Malcomson wrote:
External email: Use caution opening links or attachments
Sounds good -- I'll go do that ;-)
On 11/5/26 14:13, Thomas Schwinge wrote:
External email: Use caution opening links or attachments
Hi Matthew, Jakub, Tobias!
On 2026-10-30T10:29:00+0000, Matthew Malcomson <[email protected]>
wrote:
On 10/29/26 21:45, Thomas Schwinge wrote:
I happened to be testing this patch series on an "old" system, which
has
[...] libgomp built without 'linux/futex_waitv'.
However, for testing, I had:
[...] effective-target 'linux_futex_waitv' claimed to be
supported, unconditionally.
I notice *all* test cases PASSing that are conditionalized to it (as in
'dg-do run { target linux_futex_waitv }') -- that is, PASSing despite
libgomp built without 'linux/futex_waitv'. That doesn't sound like
what's expected? Does it mean that these test cases aren't in fact
testing any specifics of 'linux/futex_waitv', but are generic? In that
case, we wouldn't need the effective-target 'linux_futex_waitv'
conditional at all?
The test cases should pass on all targets, but they're crafted to
trigger specific edge-cases in the new barriers and felt a little
pointless to run anywhere else.
Per my understanding of GCC test suite conventions, we usually restrict
test cases (via specific '[...].exp' files, via effective-target
conditionals, via in-test case conditionals) only in cases where there's
things being tested that really are specific to select configurations
(architectures, etc.). Otherwise, we leave test cases generally enabled,
in the understanding that they'll serve as regression test cases also for
configurations other than the ones they were originally contributed for.
Your new test cases fall into this category.
E.g. things like testing the "holding" feature that two of the
futex_waitv barriers have (so can have only one barrier per parallel
region), or testing overflow of the "cancel generation" packed into a
bitfield in an integer doesn't spill over into the plain generation
right after it.
So all test cases should pass on all targets -- but they are only
expecting to test anything worthwhile on the futex_waitv target.
That said -- since they do check standard functionality I could see an
argument for changing most of them if that's what people would prefer.
My proposal thus is to remove the test suite effective-target
'linux_futex_waitv' conditional, that is, enable all these test case
unconditionally.
As a byproduct (that's *not* my main motivation here!), this also avoids
the "linux_futex_waitv effective target adjustment for libgomp testsuite"
issue (for installed testing).
Grüße
Thomas