Richard Sandiford <rdsandif...@googlemail.com> writes:
> I sent a patch to upstream dejagnu so that things like:
>
> FAIL: c-c++-common/asan/global-overflow-1.c  -Os  output pattern test, is 
> ==4731
> ==ERROR: AddressSanitizer failed to allocate 0xdfff0001000 (15392894357504) 
> byte
> s at address 0x02008fff7000 (12)
> ==4731==ReserveShadowMemoryRange failed while trying to map 0xdfff0001000 
> bytes.
>  Perhaps you're using ulimit -v
> , should match READ of size 1 at 0x[0-9a-f]+ thread T0.*(
> |
> )    #0 0x[0-9a-f]+ (in _*main ([^
> ]*global-overflow-1.c:20|[^
> ]*:0)|[(])[^
> ]*(
> |
> ).*0x[0-9a-f]+ is located 0 bytes to the right of global variable.*YYY[^
> ]* of size 10[^
> ]*(
> |
> )
>
> become:
>
> FAIL: c-c++-common/asan/global-overflow-1.c  -Os  output pattern test
>
> The actual and expected output are printed to the log instead:
>
>     http://lists.gnu.org/archive/html/dejagnu/2013-12/msg00000.html
>
> This patch does the same for the gtest stuff.  Tested on x86_64-linux-gnu
> {,-m32} with a ulimit in place.  OK to install?

Sorry, changelog is:

gcc/testsuite/
        * lib/asan-dg.exp (asan-gtest): Remove actual and expected output
        from the pass/fail line and add it to the log instead.

> Index: gcc/testsuite/lib/asan-dg.exp
> ===================================================================
> --- gcc/testsuite/lib/asan-dg.exp     (revision 205654)
> +++ gcc/testsuite/lib/asan-dg.exp     (working copy)
> @@ -288,9 +288,10 @@
>                   if { "$status" == "fail" } {
>                       pass "$testname execution test"
>                       if { ![regexp $regexpr ${output}] } {
> -                         fail "$testname output pattern test, should match 
> $regexpr"
> +                         fail "$testname output pattern test"
> +                         send_log "Output was:\n${output}\nShould 
> match:\n$regexpr\n"
>                       } else {
> -                         pass "$testname output pattern test, $regexpr"
> +                         pass "$testname output pattern test"
>                       }
>                   } elseif { "$status" == "pass" } {
>                       fail "$testname execution test"

Reply via email to