[PATCH] D141007: [lit] Stop supporting triple substrings in UNSUPPORTED and XFAIL

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 17 11:41:10 PST 2023


probinson added a comment.

In D141007#4059777 <https://reviews.llvm.org/D141007#4059777>, @yln wrote:

> I had just one question: what kind of testing did we do / how did we discover all uses of the triple substring matches?

I wrote a patch to lit that would complain about undefined features. This was quite a bit of work as it mean changing `config.available_features` from a list to a dict, and then every place that used to do something like

  if some_condition:
    config.available_features.add('name')

became instead

  config.available_features['name'] = bool(some_condition)

and then BooleanExpression would complain if it found a (non-regex) feature name that wasn't in the dict.  Some of these were simply typos, which I fixed; some were made-up words that meant "false"; and the rest (some hundreds, I don't remember the exact count) were triple substrings. I converted these to use `target=` over the course of about 50-60 individual patches.

I plan to run that again, now that everything _should_ be converted, to catch the last few, and then commit this patch.

The wonderful thing is, when this patch goes in, there can be no silent problems.  Any remaining "mistakes" will actually cause test failures and be noticed. Anything that was `XFAIL: substring` will be treated as `XFAIL: false` and the test will fail. Anything that was `UNSUPPORTED: substring` will be treated as `UNSUPPORTED: false` and the test will run (and presumably fail).

> To reduce churn and the probability that this gets reverted, can we add a short explanation to the commit message that explains how patterns like `UNSUPPORTED: arm64` should be changed and maybe a link to the commit that did this for an existing example.

I can do that.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141007/new/

https://reviews.llvm.org/D141007



More information about the llvm-commits mailing list