[llvm-dev] Changing behavior of lit.py's -v flag
Jay Foad via llvm-dev
llvm-dev at lists.llvm.org
Wed Jan 8 02:06:31 PST 2020
In the mean time, how about changing "ninja check" to run lit with -vv
instead of -v by default?
https://reviews.llvm.org/D72389
This gives me output like:
******************** TEST 'LLVM :: CodeGen/AMDGPU/fneg-combines.ll'
FAILED ********************
Script:
--
: 'RUN: at line 1'; /home/jayfoad2/llvm-debug/bin/llc -march=amdgcn
-mcpu=hawaii -start-after=sink -mattr=+flat-for-global
-verify-machineinstrs <
/home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/fneg-combines.ll
| /home/jayfoad2/llvm-debug/bin/FileCheck -enable-var-scope
-check-prefix=GCN -check-prefix=GCN-SAFE -check-prefix=SI
-check-prefix=FUNC
/home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/fneg-combines.ll
: 'RUN: at line 2'; /home/jayfoad2/llvm-debug/bin/llc
-enable-no-signed-zeros-fp-math -march=amdgcn -mcpu=hawaii
-mattr=+flat-for-global -start-after=sink -verify-machineinstrs <
/home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/fneg-combines.ll
| /home/jayfoad2/llvm-debug/bin/FileCheck -enable-var-scope
-check-prefix=GCN -check-prefix=GCN-NSZ -check-prefix=SI
-check-prefix=FUNC
/home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/fneg-combines.ll
: 'RUN: at line 4'; /home/jayfoad2/llvm-debug/bin/llc -march=amdgcn
-mcpu=fiji -start-after=sink --verify-machineinstrs <
/home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/fneg-combines.ll
| /home/jayfoad2/llvm-debug/bin/FileCheck -enable-var-scope
-check-prefix=GCN -check-prefix=GCN-SAFE -check-prefix=VI
-check-prefix=FUNC
/home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/fneg-combines.ll
: 'RUN: at line 5'; /home/jayfoad2/llvm-debug/bin/llc
-enable-no-signed-zeros-fp-math -march=amdgcn -mcpu=fiji
-start-after=sink -verify-machineinstrs <
/home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/fneg-combines.ll
| /home/jayfoad2/llvm-debug/bin/FileCheck -enable-var-scope
-check-prefix=GCN -check-prefix=GCN-NSZ -check-prefix=VI
-check-prefix=FUNC
/home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/fneg-combines.ll
--
Exit Code: 1
Command Output (stderr):
--
+ : 'RUN: at line 1'
+ /home/jayfoad2/llvm-debug/bin/FileCheck -enable-var-scope
-check-prefix=GCN -check-prefix=GCN-SAFE -check-prefix=SI
-check-prefix=FUNC
/home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/fneg-combines.ll
+ /home/jayfoad2/llvm-debug/bin/llc -march=amdgcn -mcpu=hawaii
-start-after=sink -mattr=+flat-for-global -verify-machineinstrs
/home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/fneg-combines.ll:1330:13:
error: GCN-SAFE: expected string not found in input
; GCN-SAFE: v_fma_f32 [[FMA:v[0-9]+]]
^
<stdin>:3835:2: note: scanning from here
v_xor_b32_e32 v3, 0x80000000, v3
^
<stdin>:3876:14: note: possible intended match here
.globl v_fneg_fmad_f32 ; -- Begin function v_fneg_fmad_f32
^
--
... from which I can deduce that the first RUN line failed. I still
find it a bit verbose. I'd prefer if it printed the "Script:" but only
up to the first line that failed, so that I could easily copy'n'paste
the last RUN line it printed to reproduce the failure (assuming it was
independent of the previous RUN lines).
Jay.
On Thu, 19 Sep 2019 at 03:38, Don Hinton via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
>
>
>
> On Mon, Sep 16, 2019 at 10:01 AM David Greene via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>>
>> Tim Northover via llvm-dev <llvm-dev at lists.llvm.org> writes:
>>
>> > Hi Varun,
>> >
>> > I'm definitely in favour of making -v more useful like this.
>> >
>> > On Thu, 12 Sep 2019 at 19:31, Varun Gandhi via llvm-dev
>> > <llvm-dev at lists.llvm.org> wrote:
>> >> Option 2 (less deviation from status quo):
>> >> -v: Adopts behavior of -vvv from Option 1. :)
>> >> -vv: Same as today. :)
>> >
>> > I think I prefer this one. There's a significant minority of tests
>> > where a the single failing line isn't enough to work out what's
>> > actually happened, if the FileCheck is a separate RUN for example.
>> > Under this scheme no-one even needs to know -vv exists (which is good,
>> > because I've been working with LLVM for many years and didn't until
>> > this thread).
>>
>> +1.
>
>
> +1 as well.
>
> Perhaps just alias -v to -vv. The -v option is pretty much worthless.
>
> Making -v behave like -vv would be huge win for anyone trying to debug a failure on a bot you don't own, and wouldn't require bot owners to change anything.
>
> I'll be happy to review the patch, or write it myself if that helps.
>
> thanks...
> don
>
>>
>>
>> -David
>> _______________________________________________
>> LLVM Developers mailing list
>> llvm-dev at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
More information about the llvm-dev
mailing list