[PATCH] D30371: [libfuzzer] use find to feed xargs

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 25 11:59:23 PST 2017


zturner added a comment.

In https://reviews.llvm.org/D30371#686713, @mehdi_amini wrote:

> In https://reviews.llvm.org/D30371#686712, @zturner wrote:
>
> > Given that this problem keeps happening and is not likely to go away any time soon, I wonder if the best solution is to build some special syntax into lit that can expand globs.  lit already has plenty of cases where it does text replacements, for example if you write `%t` in a run line, or `{{.*}}` in a match line.
>
>
> Nit: `{{.*}}` is a FileCheck expansion, not a lit one (unless I misunderstood what you mean).
>
> > Could we add some sort of replacement sequence that can be used in run lines which expands a glob expression?  One idea for a possible syntax might be `%[expression]`, where `expression` can itself be another substituion sequence.  This would allow you to write line 3 above as:
> > 
> >   RUN: sancov -covered-functions %[LLVMFuzzer-NullDerefTest*] %[%t_workdir/*.sancov] | FileCheck %s --check-prefix=SANCOV
>
> I'm not sure I understand the first expansion, but I'm fine with the second one!


I was looking at the left side of the test (i.e. before the change).  It writes `LLVMFuzzer-NullDerefTest*`, I'm not sure why the left side has a `*` and the right side doesn't though.  Seems like an oversight in this patch (I don't know this code well, just that the left and right don't seem equivalent due to the loss of the `*` on the right hand side.  So the equivalent expansion for the left hand side would be `%[LLVMFuzzer-NullDerefTest*]`


https://reviews.llvm.org/D30371





More information about the llvm-commits mailing list