public inbox for jit@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Malcolm <dmalcolm@redhat.com>
To: Alex Coplan <alex.coplan@arm.com>,
	jit@gcc.gnu.org, gcc-patches@gcc.gnu.org
Cc: nd@arm.com
Subject: Re: [PATCH] jit: Fix random truncation of testsuite output
Date: Mon, 20 Jul 2020 10:44:05 -0400	[thread overview]
Message-ID: <e7c7d39f8fada704f0c9184738ba7efc145d420e.camel@redhat.com> (raw)
In-Reply-To: <20200720111036.jnvu6qu3z4sbj2ns@arm.com>

On Mon, 2020-07-20 at 12:10 +0100, Alex Coplan wrote:
> Hello,
> 
> This patch fixes a bug in jit.exp which causes the DejaGnu output of
> the
> libgccjit testsuite to be nondeterministically truncated. This bug
> was
> copied from DejaGnu's own implementation of the host_execute
> function.
> See the upstream bug report [0] where the maintainers point out that
> the
> regex patterns in host_execute should (but don't currently)
> explicitly
> match newlines to avoid relying on DejaGnu not reading more than one
> line of the output (which is not guaranteed).
> 
> To reproduce the bug, run:
> 
> $ make check-jit RUNTESTFLAGS="jit.exp=test-arith-overflow.c"
> $ grep -v iteration testsuite/jit/jit.sum
> 
> and you should see some lines that have been truncated (I see the
> word
> iteration partially or fully truncated). Alternatively, simply run
> the
> testsuite twice (saving a copy of testsuite/jit/jit.sum from the
> first
> run) and diff the two jit.sum files to observe the random truncations
> to
> the output.
> 
> This patch should make it easier to test jit patches in the future,
> since it makes it possible to reliably compare the output of two
> jit.sum
> files (as with the other tests in GCC).
> 
> Testing:
>  * Ran the testsuite before and after the patch, observing that the
> only
>    differences in jit.sum were in test-threads.c (nondeterministic
> test)
>    and where the truncated output from the first run was no longer
>    truncated.
>  * Ran the testsuite twice after the patch, observing that the only
>    differences in jit.sum between the two runs were in test-
> threads.c.
> 
> OK for master?
> 
> Thanks,
> Alex
> 
> ---
> 
> 2020-07-20  Alex Coplan  <alex.coplan@arm.com>
> 
> gcc/testsuite/ChangeLog:
> 
> 	* jit.dg/jit.exp (fixed_host_execute): Fix regex patterns to
> 	always explicitly match newlines.
> 
> 
> [0] : https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42399
`
Thanks for chasing this up. This looks a lot like the issues being
tracked in PR jit/69435, so please add that to the ChangeLog when
committing.

OK for master.
Dave


      reply	other threads:[~2020-07-20 14:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20 11:10 Alex Coplan
2020-07-20 14:44 ` David Malcolm [this message]

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=e7c7d39f8fada704f0c9184738ba7efc145d420e.camel@redhat.com \
    --to=dmalcolm@redhat.com \
    --cc=alex.coplan@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jit@gcc.gnu.org \
    --cc=nd@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).