On 7/10/24 13:42, Rainer Orth wrote:
N.b. one alternative would be to remove this effective target and try to
move all tests which currently use this into directories which run their
tests between calls to `asan_finish` and `asan_init`. This seems like
it might ensure a clearer division of "asan tests must be run in X
directories" and avoid problems similar to the one here in the future.
I'm suggesting this change as it appears the easiest to make and I
didn't think the above too bad a risk to take -- especially if the name
of the test is clear.
moving the tests would be clearer IMO, otherwise we have two separate
mechanisms for the same issue. Especially since we're talking about 7
tests only. The only complication would be the aarch64 test where
there's currently no asan subdir.
I'm in the middle of doing this.
Just wanted to mention the other complications (in case that changes
what looks like the best option) -- the compilation options that tests
get run under change (because they're being run by a different test
runner), and also there's no `asan` subdir for gnat.dg (the ada test).
I'm thinking that the change in options is not that bad (will eventually
filter out the options that are not valid for the test, will likely run
with slightly less variations than before), but still worth mentioning.
In doing this I also inverted the meaning of this check. Rather than
the function indicating whether we *do not* support something and
tests using `dg-skip-if` to avoid running a test if this returns true,
this function indicates whether we *do* support something and tests
use `dg-require-effective-target` to run a test if it returns true.
Testing done by checking that each of the affected testcases changes
from UNSUPPORTED to PASS when run individually without any install
directory available.
Please remember to state on which target you've run the tests.
Good point ;-)
I ran the SVE test on AArch64, the ada test on x86 (because that's where
I could install a host gnat compiler easily to build ada), and all the
others on both these targets.