[PATCH] D96662: [lit] Add --skip (inverse of --filter) and `--xfail`

David Zarzycki via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 17 04:23:31 PST 2021


davezarzycki added a comment.

In D96662#2568191 <https://reviews.llvm.org/D96662#2568191>, @davezarzycki wrote:

> In D96662#2568128 <https://reviews.llvm.org/D96662#2568128>, @jhenderson wrote:
>
>>>> In D96662#2565257 <https://reviews.llvm.org/D96662#2565257>, @davezarzycki wrote:
>>>>
>>>>> If I might critique myself, I'm not sure that regular expression semantics are best for `--xfail`. One really wants and should use a precise list of some kind. Any thoughts on what that might look like? I'd lean toward a semicolon separated list.
>>>>
>>>> A precise list would make sense. I'd use commas rather than semicolons, because semicolons are more likely to require shell escaping, I think (commas are less likely to).
>>>
>>> In my experience, quotes solve most "escaping" problems, so what is used as a separator mostly doesn't matter as long as the character isn't used for variable expansion. Using the shell's statement separator is a good choice because shell users/programmers naturally avoid files with that character embedded in the name.
>>
>> Actually, maybe we should just use multiple --xfail options, rather than a single one that takes a list. That way, the individual file names people use isn't relevant.
>
> We can do that, but that won't work for `LIT_XFAIL`, so one would be forced to use `LIT_OPTS` and now we've come full circle back to the shell escaping problem.

Of course, after I sent this, I thought of a better way to articulate this. The problem with shell escapes is nesting and getting expansions to happen at the right level. This is why I don't care for `LIT_OPTS` because that's already one layer of escaping, and if a lit command line option needs further escaping, that's really annoying (for people that know better) and a common source of errors (for people that don't know better, which is to say, most people). This typically manifests when one tries to reason about white space in file names, but other escaping problems can cause nesting challenges.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96662



More information about the llvm-commits mailing list