[PATCH][RFC] Add 'CHECK-<N>' directive in FileCheck

Michael Liao michael.liao at intel.com
Mon May 13 16:04:13 PDT 2013


On Mon, 2013-05-13 at 15:51 -0700, Jakob Stoklund Olesen wrote:
> On Apr 29, 2013, at 12:06 PM, Michael Liao <michael.liao at intel.com> wrote:
> 
> > As the usage of 'grep' in regression tests is deprecated [1], the
> > attached patch proposes adding 'CHECK-<N>' to cover one usage of 'grep',
> > i.e. 'grep <pat> | count <N>' which check there are exactly <N>
> > occurrences of <pat> in the input string.
> 
> Hi Michael,
> 
> This doesn’t really make sense to me. A CHECK-<N> line in a FileCheck test case isn’t any better than 'grep | count N'.
> 
> We want test cases to be rewritten as FileCheck tests so they can be more specific about what they’re testing. I don’t think there is any value to converting a 'grep | count N’ test to FileCheck if it isn’t expanded to something meaningful at the same time.

I agree with you that, in general, 'grep | count N' is not a good test
at all. I originally only thought removing 'grep' as much as possible,
after rewriting some of them, I have the same feeling as you that 'grep
| count' or 'grep | not grep' is not a good test at all. Most of them
needs totally rewriting.

- Michael

> 
> /jakob
> 





More information about the llvm-commits mailing list