Test headers should have "only-<platform>", like "ignore-<platform>" #33581
Labels
A-testsuite
Area: The testsuite used to check the correctness of rustc
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
The test system as it stands is very unsuitable for multiple architectures. For example, anything with an asm macro that is expected to error cannot be adapted to support other architectures, since you could have different asm macros for each target_arch, but the test system checks for an error in each implementation.
The only way to work around this is to make a separate test file and ignore irrelevant architectures, however if any arch-specific test would have to ignore literally everything else, which is not only ugly but also will cause failures for any new architectures in the future.
This is especially obvious in tests like compile-fail/asm-in-bad-modifier.rs, where any unsupported architecture will fail the test since it compiles successfully.
I think a fundamental rework of the test directives (i.e.
//~ ERROR
) would have to be a significant undertaking, but adding a//only-x86_64
(only probably isn't the best keyword, since you might want//only-x86_64 //only-x86
) would make things a lot easier. An x86-only test has "//ignore-android", but that will still cause failures on non-Android ARM platforms, right? The current system is very fragile and needs some change.The text was updated successfully, but these errors were encountered: