From patchwork Wed Nov 12 16:53:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramana Radhakrishnan X-Patchwork-Id: 410041 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AD98B1400D2 for ; Thu, 13 Nov 2014 03:53:23 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=iEBN40WyolDfkP/LRBgfFAFV/+kkWxzGeuDN7ySwCvXFQm ZwKcYsQggO4ONOxesEhEzhT1xU1Xa0x6HUJNtGPMbzKQj61+UmotbhcHyIYYiWHB efWZ40uLD9LeIRiAm9TG1om3Xys7aumQKWZQFcNUR+yPy88HwOvQmOAboaRzM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=jd2TqRAT8ixEdOvRZbbTZiAWi1g=; b=woSXEgzA6W+jh5lyxUmA BDhQ56gUFvNWw5nYwZ3kqSnCq23E+Pd4J27B+RXpZ+18fwhp3Qv6bOnfCOllx2ES uOki7nNoKcVIe8xkz49zoVAQQDnw+EIIArtlkSWR1XFxLpTPSCMR/Zas2jEibTnc +YXjLutPFoYyxwul1Qjo0Ew= Received: (qmail 6254 invoked by alias); 12 Nov 2014 16:53:16 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 6245 invoked by uid 89); 12 Nov 2014 16:53:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: foss-mx-na.foss.arm.com Received: from foss-mx-na.foss.arm.com (HELO foss-mx-na.foss.arm.com) (217.140.108.86) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 12 Nov 2014 16:53:08 +0000 Received: from foss-smtp-na-1.foss.arm.com (unknown [10.80.61.8]) by foss-mx-na.foss.arm.com (Postfix) with ESMTP id 1BCD366 for ; Wed, 12 Nov 2014 10:53:01 -0600 (CST) Received: from collaborate-mta1.arm.com (highbank-bc01-b06.austin.arm.com [10.112.81.134]) by foss-smtp-na-1.foss.arm.com (Postfix) with ESMTP id BC4055FAD7 for ; Wed, 12 Nov 2014 10:52:59 -0600 (CST) Received: from [10.1.209.40] (e105545-lin.cambridge.arm.com [10.1.209.40]) by collaborate-mta1.arm.com (Postfix) with ESMTPS id 4FBE813F824 for ; Wed, 12 Nov 2014 10:52:59 -0600 (CST) Message-ID: <54639077.9090709@arm.com> Date: Wed, 12 Nov 2014 16:53:11 +0000 From: Ramana Radhakrishnan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" Subject: [RFC testsuite] Allow wrappers to choose file names based on pids X-IsSubscribed: yes Hi, One of the problems we appear to face with multilib testing especially with conflicting ABIs in the ARM world is the occasional case where a testglue file is built for one ABI but gets linked against a multilib test invocation with another target. We've tried to ameliorate this in some of our builds with something like this attached patch and we've been carrying this internally for quite some time. In general this appears to help in quite a few cases but there are still clashes that we get in our testing environment once a while that we are unable to remove or get to the bottom of. (My suspicion is around mov_if_change gcc-testglue{pid}.o gcc-tg.o but I'm not yet a 100% sure.) This appears to reduce the number of clashes we have with such conflicting ABIs and their testing thereof. I don't know if other folks see such issues but it's worth checking if this is of use somewhere else. At the minute this is just an RFC to see what other folks think of this and whether others face such an issue. Tested in the past for arm-none-eabi regularly built with --with-multilib-list=aprofile with a set of conflicting multilib ABI tests. I'm happy to retest and resubmit if folks think this is a good idea. regards Ramana 2014-11-12 Ramana Radhakrishnan * lib/wrapper.exp ${tool}_wrap_filename (): Define * lib/g++.exp (g++_init): Use appropriate filename for wrapper file. * lib/gcc.exp (gcc_init): Likewise. * lib/gfortran.exp (gfortran_init): Likewise. * lib/go.exp (go_init): Likewise. diff --git a/gcc/testsuite/lib/g++.exp b/gcc/testsuite/lib/g++.exp index 751e27b..c23b409 100644 --- a/gcc/testsuite/lib/g++.exp +++ b/gcc/testsuite/lib/g++.exp @@ -233,7 +233,7 @@ proc g++_init { args } { unset gluefile } - g++_maybe_build_wrapper "${tmpdir}/g++-testglue.o" "-fexceptions" + g++_maybe_build_wrapper "[g++_wrap_filename ${tmpdir}]" "-fexceptions" if {![info exists CXXFLAGS]} { set CXXFLAGS "" diff --git a/gcc/testsuite/lib/gcc.exp b/gcc/testsuite/lib/gcc.exp index 49394b0..6b20e2b 100644 --- a/gcc/testsuite/lib/gcc.exp +++ b/gcc/testsuite/lib/gcc.exp @@ -113,7 +113,7 @@ proc gcc_init { args } { set gcc_warning_prefix "warning:" set gcc_error_prefix "error:" - gcc_maybe_build_wrapper "${tmpdir}/gcc-testglue.o" + gcc_maybe_build_wrapper "[gcc_wrap_filename ${tmpdir}]" } # diff --git a/gcc/testsuite/lib/gfortran.exp b/gcc/testsuite/lib/gfortran.exp index c9b5d64..936f787 100644 --- a/gcc/testsuite/lib/gfortran.exp +++ b/gcc/testsuite/lib/gfortran.exp @@ -190,7 +190,7 @@ proc gfortran_init { args } { unset gluefile } - gfortran_maybe_build_wrapper "${tmpdir}/gfortran-testglue.o" + gfortran_maybe_build_wrapper "[gfortran_wrap_filename ${tmpdir}]" set ALWAYS_GFORTRANFLAGS "" diff --git a/gcc/testsuite/lib/go.exp b/gcc/testsuite/lib/go.exp index d674f48..ce83132 100644 --- a/gcc/testsuite/lib/go.exp +++ b/gcc/testsuite/lib/go.exp @@ -172,7 +172,7 @@ proc go_init { args } { unset gluefile } - go_maybe_build_wrapper "${tmpdir}/go-testglue.o" + go_maybe_build_wrapper "${tmpdir}/go-testglue.o" "" set ALWAYS_GOCFLAGS "" diff --git a/gcc/testsuite/lib/wrapper.exp b/gcc/testsuite/lib/wrapper.exp index 1291c11..217d0eb 100644 --- a/gcc/testsuite/lib/wrapper.exp +++ b/gcc/testsuite/lib/wrapper.exp @@ -44,3 +44,13 @@ proc ${tool}_maybe_build_wrapper { filename args } { } } } + +proc ${tool}_wrap_filename { tmpdir } { + global tool + + set twrapper "${tmpdir}/${tool}-testglue" + append twrapper [getpid] + append twrapper ".o" + + return $twrapper +}