[PATCH] D30380: Teach lit to expand glob expressions

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 28 13:52:03 PST 2017


zturner added a comment.

In https://reviews.llvm.org/D30380#688952, @mehdi_amini wrote:

> In https://reviews.llvm.org/D30380#688941, @MatzeB wrote:
>
> > In https://reviews.llvm.org/D30380#688937, @zturner wrote:
> >
> > > In https://reviews.llvm.org/D30380#688936, @zturner wrote:
> > >
> > > > I don't think it's necessarily fair to classify these tests as poorly designed.  dynamic tools, by design, often need to do things with the file system and the tests need to verify this behavior.
> > >
> >
>
>
> That's a reason to look at the filesystem, that's not a reason that explain why a test does not know in advance which file will be generated or need to be looked at. Can you clarify this?


One example is when the input to a tool is an executable file name, where on Windows you have to suffix it with `.exe`.  You can see this in my earlier comment `dump_coverage.test(3)`.  It writes `llvm-FuzzerDerefTest*` which catches the filename either with or without a `.exe` suffix.

Other examples include where a test program can take many inputs, and you put all your input files in a single directory.  Sure you could write out each one, but this is higher maintenance and much uglier to look at when reading the test.  Every time you add or remove an input, you need to go remember to update the test.


https://reviews.llvm.org/D30380





More information about the llvm-commits mailing list