From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by sourceware.org (Postfix) with ESMTP id 6303D3850419 for ; Mon, 20 Jul 2020 14:44:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6303D3850419 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-117-smAZOc-RMWiBwffBzxOBFg-1; Mon, 20 Jul 2020 10:44:07 -0400 X-MC-Unique: smAZOc-RMWiBwffBzxOBFg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 773AA1005504; Mon, 20 Jul 2020 14:44:06 +0000 (UTC) Received: from ovpn-113-239.phx2.redhat.com (ovpn-113-239.phx2.redhat.com [10.3.113.239]) by smtp.corp.redhat.com (Postfix) with ESMTP id BA94B7951E; Mon, 20 Jul 2020 14:44:05 +0000 (UTC) Message-ID: Subject: Re: [PATCH] jit: Fix random truncation of testsuite output From: David Malcolm To: Alex Coplan , jit@gcc.gnu.org, gcc-patches@gcc.gnu.org Cc: nd@arm.com Date: Mon, 20 Jul 2020 10:44:05 -0400 In-Reply-To: <20200720111036.jnvu6qu3z4sbj2ns@arm.com> References: <20200720111036.jnvu6qu3z4sbj2ns@arm.com> User-Agent: Evolution 3.32.5 (3.32.5-1.fc30) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: jit@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Jit mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jul 2020 14:44:18 -0000 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 > > 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