[PATCH] D82203: [FileCheck] Implement -dump-input-context and -dump-input-filter

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 28 10:16:08 PDT 2020


jdenny added a comment.

In D82203#2118764 <https://reviews.llvm.org/D82203#2118764>, @lattner wrote:

> High level question - do we need additional command line flags here?  Why not build this into the default actions that FileCheck takes?


By default, we'd have `-dump-input-filter=error` and `-dump-input-context=5`.  That will hopefully address the concern that the current default (without this patch) is too verbose for many people.

>   These detailed flags are unlikely to be used by people in practice, and this expands the surface area of FileCheck that needs to be maintained - it also expands the testing surface of FileCheck itself.

I'm already using the patch under review while writing tests for other work, and the defaults I mentioned above are sometimes just right but other times are not nearly verbose enough.  I frequently need more context to understand what has gone wrong in a test, so I find myself adjusting these options via `FILECHECK_OPTS`.  I hope CI configurations will set `FILECHECK_OPTS=-dump-input-filter=all -vv` (maybe `-color` too) so that no one will ever miss context they need to debug a failure.

A major lesson I've learned from this discussion is that different LLVM developers have significantly different needs here, depending on what they're testing and probably depending on personal preferences.  Tolerable defaults plus configurability seems key to addressing the various use cases.

By the way, I'm working on splitting up this patch to make it easier to review.  Maybe it won't seem as complex after that.


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

https://reviews.llvm.org/D82203





More information about the llvm-commits mailing list