> On Jun 18, 2020, at 14:32, Chris Lattner via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > 2) Instead of dumping the entire input by default, would it be reasonable to change the default “make check” to have FileCheck print the 10 lines before and after the mismatch? Most problems are close by the check failure. If you want to check extra fancy, dump the CHECK-LABEL region. >In my experience, the entire CHECK-LABEL region is still way too much (e.g. MIR tests print a giant block of function information in the prolog). There needs to be a stricter line count clamping of some kind -Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200618/21c3d56c/attachment.html>
> On Jun 18, 2020, at 11:36 AM, Matt Arsenault <arsenm2 at gmail.com> wrote: > > > >> On Jun 18, 2020, at 14:32, Chris Lattner via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: >> >> 2) Instead of dumping the entire input by default, would it be reasonable to change the default “make check” to have FileCheck print the 10 lines before and after the mismatch? Most problems are close by the check failure. If you want to check extra fancy, dump the CHECK-LABEL region. >> > > In my experience, the entire CHECK-LABEL region is still way too much (e.g. MIR tests print a giant block of function information in the prolog). There needs to be a stricter line count clamping of some kindSure, what I’m actually advocating here is a pile of heuristics that work well for humans: e.g. dump the label region if it is 20 lines or less. If it is large, then look at where the last match and the fuzzy next match are, and include that, .. etc. FileCheck has a lot of information that we’re not using and some elbow grease could make the default experience way nicer for humans. -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200618/b3956730/attachment.html>
On Thu, Jun 18, 2020 at 2:40 PM Chris Lattner <clattner at nondot.org> wrote:> > > On Jun 18, 2020, at 11:36 AM, Matt Arsenault <arsenm2 at gmail.com> wrote: > > > > On Jun 18, 2020, at 14:32, Chris Lattner via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > 2) Instead of dumping the entire input by default, would it be reasonable > to change the default “make check” to have FileCheck print the 10 lines > before and after the mismatch? Most problems are close by the check > failure. If you want to check extra fancy, dump the CHECK-LABEL region. > > > In my experience, the entire CHECK-LABEL region is still way too much > (e.g. MIR tests print a giant block of function information in the prolog). > There needs to be a stricter line count clamping of some kind > > > Sure, what I’m actually advocating here is a pile of heuristics that work > well for humans: e.g. dump the label region if it is 20 lines or less. If > it is large, then look at where the last match and the fuzzy next match > are, and include that, .. etc. FileCheck has a lot of information that > we’re not using and some elbow grease could make the default experience way > nicer for humans. >This kind of info is stored in the input-line annotations produced by -vv (when combined with -dump-input). I think it's just a matter of filtering lines based on those annotations. Joel> -Chris > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200618/3c52dead/attachment-0001.html>
On Thu, Jun 18, 2020 at 11:41 AM Chris Lattner via llvm-dev < llvm-dev at lists.llvm.org> wrote:> > > On Jun 18, 2020, at 11:36 AM, Matt Arsenault <arsenm2 at gmail.com> wrote: > > > > On Jun 18, 2020, at 14:32, Chris Lattner via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > 2) Instead of dumping the entire input by default, would it be reasonable > to change the default “make check” to have FileCheck print the 10 lines > before and after the mismatch? Most problems are close by the check > failure. If you want to check extra fancy, dump the CHECK-LABEL region. > > > In my experience, the entire CHECK-LABEL region is still way too much > (e.g. MIR tests print a giant block of function information in the prolog). > There needs to be a stricter line count clamping of some kind > > > Sure, what I’m actually advocating here is a pile of heuristics that work > well for humans: e.g. dump the label region if it is 20 lines or less. If > it is large, then look at where the last match and the fuzzy next match > are, and include that, .. etc. FileCheck has a lot of information that > we’re not using and some elbow grease could make the default experience way > nicer for humans. >+1 That's what came out of the discussion in the revision as well. Getting the LABEL region (or some limited context) would likely be the ideal behavior. I looked into this last week but I suspect it requires some refactoring first, I may have time to look again next week if no one beats me to it. I can see how having the failing CHECKs displayed after the input can be useful as well! -- Mehdi -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200619/f3522887/attachment.html>