public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mike Stump <mikestump@comcast.net>
To: Yuri Gribov <tetra2005@gmail.com>
Cc: Thomas Preudhomme <thomas.preudhomme@foss.arm.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Ignore random output from Asan tests in dg-cmp-results
Date: Mon, 10 Jul 2017 21:21:00 -0000	[thread overview]
Message-ID: <DD100EA0-EE66-4DB6-B0D8-5FFF0EA37342@comcast.net> (raw)
In-Reply-To: <CAJOtW+7pbTRiHx1isHU=A4XkURh_ta-22JVUgrSSMYCABh86RA@mail.gmail.com>

On Jul 10, 2017, at 2:44 AM, Yuri Gribov <tetra2005@gmail.com> wrote:
> 
> On Mon, Jul 10, 2017 at 10:32 AM, Thomas Preudhomme
> <thomas.preudhomme@foss.arm.com> wrote:
>> Hi Yuri,
>> 
>> On 09/07/17 20:06, Yuri Gribov wrote:
>>> 
>>> Hi,
>>> 
>>> Currently dg-cmp-results fails to compare fails in Asan tests because
>>> their output includes failing process id:
>>> NA->FAIL: c-c++-common/asan/bitfield-1.c   -O0  output pattern test,
>>> is ==18161==ERROR
>>> FAIL->NA: c-c++-common/asan/bitfield-1.c   -O0  output pattern test,
>>> is ==26667==ERROR
>>> 
>>> This patch fixes this. I also did some fairly standard refactoring to
>>> improve stability and get rid of code dup.
>> 
>> 
>> I'm not familiar with asan but why not fix asan tests to not print the pid
>> instead?
> 
> The error message is printed by Asan runtime, not by tests themselves.
> Asan maintainers are typically unwilling to change output format of
> their messages as there may already be users who rely on it (e.g.
> using specific regexes in their scripts, etc.).

They don't have to change it.  There is a driver for asan tests in lib/asan-dg.exp that I believe has the code in it that causes this, and where the fix likely would be.

Indeed, in trunk, I see:

  fail "$testname output pattern test"

so, this looks like a local change in your tree.  Where does do the failing tests come from?  Change the failure line to fail "is_this_it", and see if the output is then deterministic; if so, you've identified the line.  Next, show us what is in your tree for that line; and we can tell you how it is wrong.

In this case, it feels like:

r205799 | rsandifo | 2013-12-09 00:04:57 -0800 (Mon, 09 Dec 2013) | 4 lines

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


fixes the issue, but, for that to be the case, you'd have to have some really old unmaintained branch, or a bad copy of the file were the updates weren't also taken.  I've checked the results list, and certainly:

  https://gcc.gnu.org/ml/gcc-testresults/2017-07/msg00858.html

has the bad line, so  clearly something causes it.  [ searching ]

jit.exp has:

            fail "${executable-name} output pattern test, is ${output}, should match $texttmp"

bad, bad, bad line.  Try fixing this to just be:

            fail "${executable-name} output pattern test"

Not sure why fixes from 2013 never made it into that file.  If so, also update the pass line.

But, this raises the next interesting question.  Is this is jit test?  If not, jit is supposed to _undo_ all of it's changes to the environment.  I think it is leaking this routine into future unrelated test cases?  The jit people would have to chime in.  In the full log, if you run with -v, do you see:

  jit-run-executable:

just above the test case?  If so, and this isn't a jit test case, will confirm leakage.  If you run just the single .exp file this comes from, you can also tell if this is just leakage.  By running the single .exp file, (not jit.exp), if the output is then stable, then it is jit.exp likely leaking.

When I run with -j35, I don't see the ", " version of the test case name:

testsuite/gcc18/gcc.log:PASS: gcc.dg/pr67786.c output pattern test

in a check-gcc, but others do see the ", " version of the same test case:

FAIL: gcc.dg/pr67786.c output pattern test, is , should match 15

from https://gcc.gnu.org/ml/gcc-testresults/2017-07/msg00858.html.  One can run one in isolation like this:

$ make RUNTESTFLAGS='dg.exp=pr67786.c' check-gcc

$ grep 'output pattern' testsuite/gcc/gcc.log
PASS: gcc.dg/pr67786.c output pattern test

Someone with such a system will have to drill down into why.  Bill Seurer seems able to reliably see the problem as well, so you're not alone.  He is running dejagnu 1.5, I'm running 1.5.3, not sure if it is dejagnu related.  What version are you running?  You could try 1.5.3 and see if that fixes it.

My builds are without jit enabled.  Are you building with jit on?  What do you see for pr67786 in the full testsuite run?  When you run as above?

  reply	other threads:[~2017-07-10 21:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-09 19:06 Yuri Gribov
2017-07-10  9:32 ` Thomas Preudhomme
2017-07-10  9:44   ` Yuri Gribov
2017-07-10 21:21     ` Mike Stump [this message]
2017-07-10 21:53       ` Mike Stump
2017-07-11  6:51         ` Yuri Gribov
2017-07-10 12:13 ` Thomas Preudhomme
2017-07-10 12:32   ` Yuri Gribov
2017-07-10 18:27 ` Mike Stump

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DD100EA0-EE66-4DB6-B0D8-5FFF0EA37342@comcast.net \
    --to=mikestump@comcast.net \
    --cc=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tetra2005@gmail.com \
    --cc=thomas.preudhomme@foss.arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).