similar to: FileCheck idiom difficulties

Displaying 20 results from an estimated 10000 matches similar to: "FileCheck idiom difficulties"

2020 Feb 03
2
[RFC][FileCheck] New option to negate check patterns
Thanks for the suggestions. I think the naming the whole line idea is okay, but it feels a bit clunky. Either we'd have to have a syntax that FileCheck would recognise without caring about the prefix (which seems to be against the ethos of FileCheck, and also makes it less flexible), or in the case I'm referring to, we'd have to have an extra line that does nothing other than define
2020 Jan 31
2
[RFC][FileCheck] New option to negate check patterns
​Hi all, > I feel it might be confusing to have a CHECK becomes effectively a CHECK-NOT, > especially if the RUN line is far from the CHECK line (which is often the case when > a single RUN line drives several groups of CHECK directives (e.g. code generation > tested for several functions for a specific feature, like PIC). You also loose control > on where the NOT should be:
2020 Jan 31
2
[RFC][FileCheck] New option to negate check patterns
Hi all, There have been a few cases recently where I've noticed two test cases in the same lit test that do the same thing except invert the CHECK, to show that something is NOT present. I'm talking about something like the following: # RUN: llvm-sometool --print-string | FileCheck %s --check-prefix=STRING # RUN: llvm-sometool --no-print-string | FileCheck %s --check-prefix=NO-STRING #
2020 Jul 14
2
Multiple documents in one test file
We have a similar option (-split-input-file) in `mlir-opt`: https://github.com/llvm/llvm-project/blob/master/mlir/test/Dialect/Affine/invalid.mlir With a single `RUN:` lit invocation the tool itself will loop over all the split sections in the file. This is convenient to test error cases where the tool would abort at the first error otherwise. I don't think we can easily achieve this with a
2019 Oct 23
3
FileCheck wishlist
Hi, I'm looking for some feedback on pain points people have with FileCheck in terms of missing features to help people interested in working on FileCheck to prioritize the work accordingly. I am personally interested in improving FileCheck on 2 issues whenever time permits it: * being able to test for consecutive lines in arbitrary order, i.e. something akin to CHECK-DAG blocks where
2020 Jun 15
2
FileCheck: using numeric variable defined on same line with caveats
Any kind of variable definition on a CHECK-NOT line would seem like it would be asking for trouble. Do we allow text variable definitions on a NOT? False fails are better than false matches. Given that it will fail on a line where you'd expect a match, or possibly for the line to be skipped, it's a matter of refining the match expression, which is something that you have to do sometimes
2020 Jun 15
2
FileCheck: using numeric variable defined on same line with caveats
Before addressing the CHECK-NOT case, I’m still unclear about the DAG case. What should the first DAG line match? The regex matching would first attempt to match “10 12” but the expression evaluation would fail; so the DAG candidate wouldn’t match; does this mean the DAG matching does not continue searching, and the test fails? Or would we restart the search…. where? With “0 12” (skipping only
2012 Aug 20
4
[LLVMdev] How to write a regression test case?
hi,all: i really want to how to write a regression test case,but i do not find out a entire document about it. By reading LLVM Testing Infrastructure Guide and FileCheck - Flexible pattern matching file verifier, i only have a idea,but it is not enough for me to write a test case.i need more detail about how to write a RUN:lines. thanks for you scan,wish your letter. best wishes, changcheng
2012 Aug 22
7
[LLVMdev] How to write a regression test case?
the example is more like what i need,it is so nice. but,i am indefinite if "RUN: FileCheck < %t.s %s" can pass,i understand that t.s was translate from t.ll,%s means read the local source,are they the same? On Wed, Aug 22, 2012 at 1:55 PM, Triple Yang <triple.yang at gmail.com> wrote: > I did an experiment just now with a test case like: > // RUN: clang %s -S -emit-llvm
2012 Aug 22
2
[LLVMdev] How to write a regression test case?
2012/8/21 Triple Yang <triple.yang at gmail.com>: > 2012/8/21 Changcheng Wang <changcheng at multicorewareinc.com>: >> Hi,Yang >> thanks for your entire answer,i will do it follow you. >> still another question puzzled me:i write a hello.c file like this: >> >> //RUN: llc -march=c < %s | FileCheck %s >> #include"stdio.h" >>
2020 Apr 03
6
[RFC] Improving FileCheck
I'd like to (re)start a discussion on a few gotchas in FileCheck that I've noticed working on various tests in llvm's suites. This begain in a review [1], but I'll try to summarize here so it gets the right audience before decisions are made on it (so to speak). 1: https://reviews.llvm.org/D77227 The main sticking point is the abundance of checks in FileCheck tests that appear to
2012 Aug 28
3
[LLVMdev] How to write a regression test case?
Wang, Attachment is a simple example, you may put it in test/CodeGen, and run with llvm-lit C90 It worked ok in my llvm 3.2 devel. Let know if you run into any trouble. Regards. 2012/8/27 Changcheng Wang <changcheng at multicorewareinc.com>: > hi,Yang: > if you can give me a examle,which check out a string(such as "abcd") > from a file(such as aaa.c) with fileCheck?
2012 Aug 21
0
[LLVMdev] How to write a regression test case?
2012/8/21 Changcheng Wang <changcheng at multicorewareinc.com>: > Hi,Yang > thanks for your entire answer,i will do it follow you. > still another question puzzled me:i write a hello.c file like this: > > //RUN: llc -march=c < %s | FileCheck %s > #include"stdio.h" > > int main() { > printf ("Helloworld.\n"); > return 0; > } >
2012 Aug 27
0
[LLVMdev] How to write a regression test case?
hi,Yang: if you can give me a examle,which check out a string(such as "abcd") from a file(such as aaa.c) with fileCheck? i tried to write it but failed. thanks for your help! best wished! changcheng On Wed, Aug 22, 2012 at 9:30 PM, Triple Yang <triple.yang at gmail.com> wrote: > I guess so. > FileCheck has powerful extensions than just matching some strings so that >
2020 Apr 17
4
[RFC] Improving FileCheck
On Mon, Apr 13, 2020 at 1:16 PM Jon Roelofs via llvm-dev < llvm-dev at lists.llvm.org> wrote: > As an update, after lots of fixes from a number of different people > (thanks everyone!), the current list of false-positives on `ninja > check-llvm` for the more stringent Gotcha A diagnostic is: > > LLVM :: Analysis/CostModel/X86/vselect-cost.ll > LLVM ::
2012 Aug 28
3
[LLVMdev] How to write a regression test case?
2012/8/28 Changcheng Wang <changcheng at multicorewareinc.com>: > hi,yang: > another question,i write a test like this: > /*****test start******/ > ; RUN: llc -march=c < %s | FileCheck %s > > ; ModuleID = 'hello.c' > target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64- >
2012 Aug 28
2
[LLVMdev] How to write a regression test case?
You are welcome. /* example.c */ // RUN: clang %s -S -O0 -emit-llvm -o %t.ll // RUN: llc %t.ll -O0 -march=x86 -o %t.s // RUN: FileCheck < %t.s %s // CHECK: fct unsigned int fct(unsigned int n) { if(n>0) return fct(n-1)*n; else return 1; } /* end example.c */ /* lit.local.cfg */ config.suffixes = ['.c', '.cpp', '.ll'] targets =
2012 Aug 29
2
[LLVMdev] How to write a regression test case?
hi,yang: sorry to trouble you another time,i used your example and it run well,but a problem came,it create severel temporary files i chaged the RUN: line but failed. i changed it like this,can you give me some suggestions? // RUN: clang %s -S -emit-llvm | llc -march=c | clang -S -emit-llvm | lli | FileCheck %s thanks, best wishes, changcheng On Wed, Aug 29, 2012 at 8:39 AM, Changcheng Wang
2012 Aug 28
0
[LLVMdev] How to write a regression test case?
hi,yang: thanks,i replaced "{helloworld}" with "helloworld" as you said,and the test run well on llvm version 3.0,but fail on llvm 162227,is it right? llvm version 162227 do not support it? your, changcheng On Tue, Aug 28, 2012 at 2:28 PM, Triple Yang <triple.yang at gmail.com> wrote: > 2012/8/28 Changcheng Wang <changcheng at multicorewareinc.com>: >>
2012 Aug 22
0
[LLVMdev] How to write a regression test case?
I did an experiment just now with a test case like: // RUN: clang %s -S -emit-llvm -o %t.ll // RUN: llc %t.ll -o %t.s // RUN: FileCheck < %t.s %s ... // CHECK: ... And it worked. It seems clang does not take stdin as its input, so "clang < %s" fails. Meanwhile, both "llc < %t.ll" and "llc %t.ll" work. 2012/8/22 Triple Yang <triple.yang at