[llvm-dev] RFC: "REQUIRES: no*" considered harmful
llvm-dev at lists.llvm.org
Thu May 9 11:37:25 PDT 2019
Dear test fans,
Recently a couple of cases came to light, where a test had the line
with the obvious expectation that it would be disabled, but only for
the Windows platform. Sadly, this is not true; the "no" prefix means
nothing to Lit. I've already fixed one test, within Lit's own test
suite, and I've done a bunch of grepping to see what else is lurking.
The various config scripts define feature keywords with "no" or "not_"
or "non-" prefixes in only a handful of cases. And really these extra
keywords are unnecessary, because we can disable a test using the positive
form with UNSUPPORTED:. And, I claim (with the obvious evidence of two
tests that fell into this trap) that having negative keywords for some
cases can mislead people and end up having entirely the wrong effect.
I propose to eliminate the negative forms of the feature keywords and
modify all the affected tests to use UNSUPPORTED instead. Well actually
I'd modify the affected tests first, but you get the idea.
There are 7 feature keywords that start with "no" or "not_" or "non-"
that I can find, and it's trivial to have only positive versions
(and in fact the last 4 already have positive versions):
non-ms-sdk (clang only)
non-ps4-sdk (clang only)
not_COFF (llvm only)
Very few in-tree tests are affected, and I'm happy to do that part.
I'm finding 9 tests in clang, 6 tests in LLVM, and 1 test in LLDB
that match the regex 'REQUIRES:.* no'. (The LLDB test is the other
victim of "nowindows" that I've found.)
If you believe this is a BAD idea, please speak up and explain why.
In the meantime I'll start putting together a patch set for this.
More information about the llvm-dev