From patchwork Tue Jun 9 12:42:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jambor X-Patchwork-Id: 1305878 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49h8t10Q0Tz9sTN for ; Tue, 9 Jun 2020 22:43:05 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8532C383F869; Tue, 9 Jun 2020 12:43:01 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 1CF0838708A8 for ; Tue, 9 Jun 2020 12:42:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1CF0838708A8 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mjambor@suse.cz X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 97D59ACE3; Tue, 9 Jun 2020 12:42:59 +0000 (UTC) From: Martin Jambor To: Thomas Schwinge , Alexandre Oliva , Pekka =?utf-8?b?SsOkw6Rza2Vsw6RpbmVu?= Subject: BRIG FE testsuite: Fix all dump-scans (Was: Re: drop -aux{dir, base}, revamp -dump{dir, base}) In-Reply-To: <87eeqoqv5t.fsf@euler.schwinge.homeip.net> References: <87eeqoqv5t.fsf@euler.schwinge.homeip.net> User-Agent: Notmuch/0.29.3 (https://notmuchmail.org) Emacs/26.3 (x86_64-suse-linux-gnu) Date: Tue, 09 Jun 2020 14:42:55 +0200 Message-ID: MIME-Version: 1.0 X-Spam-Status: No, score=-3042.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Biener , ebotcazou@adacore.com, gcc-patches@gcc.gnu.org, joseph@codesourcery.com Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Hi, On Tue, Jun 09 2020, Thomas Schwinge wrote: > Hi! > > On 2020-05-26T04:08:44-0300, Alexandre Oliva wrote: >> Thanks, here's the combined patch I'm checking in. >> >> revamp dump and aux output names > > For BRIG (HSAIL) front end testing, I'm see a lot of failures like: > > Running [...]/source-gcc/gcc/testsuite/brig.dg/dg.exp ... > PASS: brig.dg/test/gimple/variables.hsail (test for excess errors) > [-PASS:-]{+UNRESOLVED:+} variables.hsail.brig scan-tree-dump original "__group_base_addr \\+ \\(0 \\+" > [-PASS:-]{+UNRESOLVED:+} variables.hsail.brig scan-tree-dump original "__group_base_addr \\+ 0" > [-PASS:-]{+UNRESOLVED:+} variables.hsail.brig scan-tree-dump gimple "[ ]*prog_global = s204;" > [-PASS:-]{+UNRESOLVED:+} variables.hsail.brig scan-tree-dump gimple ".module.mod_global;" > [...] > > That's: > > spawn -ignore SIGHUP [...]/build-gcc/gcc/xgcc -B[...]/build-gcc/gcc/ [...]/build-gcc/gcc/testsuite/brig/variables.hsail.brig -fdump-tree-gimple -fdump-tree-original -S -o variables.s > PASS: brig.dg/test/gimple/variables.hsail (test for excess errors) > variables.hsail.brig: dump file does not exist > dump file: variables.hsail.brig.original > UNRESOLVED: variables.hsail.brig scan-tree-dump original "__group_base_addr \\+ \\(0 \\+" > > We're trying to scan 'variables.hsail.brig.*', but for input file name > 'variables.hsail.brig', we're now creating: > > $ ls -1 build-gcc/gcc/testsuite/brig/variables.*???t.* > build-gcc/gcc/testsuite/brig/variables.brig.004t.original > build-gcc/gcc/testsuite/brig/variables.brig.005t.gimple > > Before your changes, GCC produced the expected: > > $ ls -1 build-gcc/gcc/testsuite/brig/variables.*???t.* > build-gcc/gcc/testsuite/brig/variables.hsail.brig.004t.original > build-gcc/gcc/testsuite/brig/variables.hsail.brig.005t.gimple > > Are you able to easily create a patch for that? How/where to adjust: > producer-side (GCC driver, or BRIG (HSAIL) front end?), or consumer-side > (testsuite: tree scanning machinery, or have to put some '-dumpbase' into > all test case files?)? I looked into the issue yesterday and decided the simplest fix is probably the following. I am going to use my BRIG maintainer hat to commit the patch in a day or two unless someone thinks it is a bad idea. Tested by running make check-brig on an x86_64-linux. Martin Since Alexandre's revamp of dump files handling in r11-627-g1dedc12d186, BRIG FE has been receiving slightly different -dumpbase (e.g. smoke_test.brig instead of smoke_test.hsail.brig when compiling file smoke_test.hsail.brig) and the testsuite then could not find the generated dump files it wanted to scan. I have not really looked into why that changed, the easiest fix seems to me to remove the hsail part already when generating the binary brig file from the textual HSAIL representation. gcc/testsuite/ChangeLog: 2020-06-09 Martin Jambor * lib/brig.exp (brig_target_compile): Strip hsail extension when gnerating the name of the binary brig file. --- gcc/testsuite/lib/brig.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/lib/brig.exp b/gcc/testsuite/lib/brig.exp index fbfb1da947a..de47f13e42c 100644 --- a/gcc/testsuite/lib/brig.exp +++ b/gcc/testsuite/lib/brig.exp @@ -29,7 +29,7 @@ proc brig_target_compile { source dest type options } { # We cannot assume all inputs are .hsail as the dg machinery # calls this for a some c files to check linker plugin support or # similar. - set brig_source ${tmpdir}/[file tail ${source}].brig + set brig_source ${tmpdir}/[file rootname [file tail ${source}]].brig exec HSAILasm $source -o ${brig_source} set source ${brig_source} # Change the testname the .brig.