From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 73110 invoked by alias); 19 Aug 2016 15:51:06 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 73098 invoked by uid 89); 19 Aug 2016 15:51:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RCVD_IN_SEMBACKSCATTER,SPF_PASS autolearn=ham version=3.3.2 spammy=42, 4.2, sk:get_com, (unknown) X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 19 Aug 2016 15:51:03 +0000 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u7JFmwf4021306 for ; Fri, 19 Aug 2016 11:51:02 -0400 Received: from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154]) by mx0a-001b2d01.pphosted.com with ESMTP id 24wyrv9ekf-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 19 Aug 2016 11:51:02 -0400 Received: from localhost by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 19 Aug 2016 09:51:01 -0600 Received: from d03dlp02.boulder.ibm.com (9.17.202.178) by e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 19 Aug 2016 09:51:00 -0600 X-IBM-Helo: d03dlp02.boulder.ibm.com X-IBM-MailFrom: cel@us.ibm.com Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id B04A33E4004C for ; Fri, 19 Aug 2016 09:50:59 -0600 (MDT) Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u7JFoqC19765216; Fri, 19 Aug 2016 08:50:59 -0700 Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7AE8E78056; Fri, 19 Aug 2016 09:50:59 -0600 (MDT) Received: from [9.70.82.29] (unknown [9.70.82.29]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP id 1AC0078047; Fri, 19 Aug 2016 09:50:59 -0600 (MDT) Subject: [PATCH] Fix missing files for ld when test suite not compiled in the source directory From: "Carl E. Love" To: Edjunior Barbosa Machado , Ulrich Weigand , gdb-patches@sourceware.org Cc: cel@us.ibm.com Date: Fri, 19 Aug 2016 15:51:00 -0000 Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16081915-0020-0000-0000-00000997873B X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00005616; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000183; SDB=6.00746924; UDB=6.00352211; IPR=6.00519446; BA=6.00004671; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00012393; XFM=3.00000011; UTC=2016-08-19 15:51:01 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16081915-0021-0000-0000-000054B735E4 Message-Id: <1471621858.4102.33.camel@us.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-08-19_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1608190200 X-SW-Source: 2016-08/txt/msg00203.txt.bz2 Fix missing files for ld when test suite not compiled in the source directory This patch fixes an issues with six test suite expect files that do not run correctly when the test suite is not built in the source directory. The issue is these tests are not using the current "standard_testfile" call but rather using the older set command to initialize the "testfile", "srcfile" and "binprefix" variables or are missing the set for the "binprefix" variable. ----------------------------------------------- gdb/testsuite/ChangeLog 2016-08-19 Carl Love * gdb.arch/altivec-regs.exp: Use standard_testfile instead of maintaining separate logic for constructing the output path. * gdb.arch/powerpc-d128-regs.exp: Likewise. * gdb.arch/ppc-dfp.exp: Likewise. * gdb.arch/ppc-fp.exp: Likewise. * gdb.arch/vsx-regs.exp: Likewise. * gdb.arch/altivec-abi.exp: Likewise, plus added local variable binprefix for generating the additional binary files. --- gdb/testsuite/gdb.arch/altivec-abi.exp | 14 +++++++------- gdb/testsuite/gdb.arch/altivec-regs.exp | 4 +--- gdb/testsuite/gdb.arch/powerpc-d128-regs.exp | 4 +--- gdb/testsuite/gdb.arch/ppc-dfp.exp | 4 +--- gdb/testsuite/gdb.arch/ppc-fp.exp | 4 +--- gdb/testsuite/gdb.arch/vsx-regs.exp | 4 +--- 6 files changed, 12 insertions(+), 22 deletions(-) diff --git a/gdb/testsuite/gdb.arch/altivec-abi.exp b/gdb/testsuite/gdb.arch/altivec-abi.exp index 13350d2..3070fab 100644 --- a/gdb/testsuite/gdb.arch/altivec-abi.exp +++ b/gdb/testsuite/gdb.arch/altivec-abi.exp @@ -26,9 +26,7 @@ if {![istarget "powerpc*"] || [skip_altivec_tests]} then { return } -set testfile "altivec-abi" -set binfile ${objdir}/${subdir}/${testfile} -set srcfile ${testfile}.c +standard_testfile if [get_compiler_info] { warning "get_compiler failed" @@ -146,6 +144,8 @@ proc altivec_abi_tests { extra_flags force_abi } { } if [test_compiler_info gcc*] { + set binprefix ${binfile} + with_test_prefix "default ABI, auto" { altivec_abi_tests "additional_flags=-maltivec" "auto" } @@ -156,23 +156,23 @@ if [test_compiler_info gcc*] { # On 64-bit GNU/Linux with GCC 4.1 and 4.2, -mabi=no-altivec # was broken, so skip those tests there. if { ![is_lp64_target] || ![test_compiler_info "gcc-4-\[12\]-*"] } { - set binfile ${objdir}/${subdir}/${testfile}-ge-ge + set binfile ${binprefix}-ge-ge with_test_prefix "generic ABI, forced" { altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=no-altivec" "generic" } - set binfile ${objdir}/${subdir}/${testfile}-ge-auto + set binfile ${binprefix}-ge-auto with_test_prefix "generic ABI, auto" { altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=no-altivec" "auto" } } - set binfile ${objdir}/${subdir}/${testfile}-av-av + set binfile ${binprefix}-av-av with_test_prefix "AltiVec ABI, forced" { altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=altivec" "altivec" } - set binfile ${objdir}/${subdir}/${testfile}-av-auto + set binfile ${binprefix}-av-auto with_test_prefix "AltiVec ABI, auto" { altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=altivec" "auto" } diff --git a/gdb/testsuite/gdb.arch/altivec-regs.exp b/gdb/testsuite/gdb.arch/altivec-regs.exp index 29cf021..f02ef26 100644 --- a/gdb/testsuite/gdb.arch/altivec-regs.exp +++ b/gdb/testsuite/gdb.arch/altivec-regs.exp @@ -27,9 +27,7 @@ if {![istarget "powerpc*"] || [skip_altivec_tests]} then { return } -set testfile "altivec-regs" -set binfile ${objdir}/${subdir}/${testfile} -set srcfile ${testfile}.c +standard_testfile set compile_flags {debug nowarnings} if [get_compiler_info] { diff --git a/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp b/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp index 3335224..4a08f26 100644 --- a/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp +++ b/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp @@ -25,9 +25,7 @@ if ![istarget "powerpc64*-*"] then { return } -set testfile "powerpc-d128-regs" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {quiet debug}] != "" } { untested powerpc-d128-regs.exp diff --git a/gdb/testsuite/gdb.arch/ppc-dfp.exp b/gdb/testsuite/gdb.arch/ppc-dfp.exp index 75dc2ce..6f77d18 100644 --- a/gdb/testsuite/gdb.arch/ppc-dfp.exp +++ b/gdb/testsuite/gdb.arch/ppc-dfp.exp @@ -21,9 +21,7 @@ if ![istarget "powerpc*"] then { return } -set testfile "ppc-dfp" -set binfile ${objdir}/${subdir}/${testfile} -set srcfile ${testfile}.c +standard_testfile if [get_compiler_info] { warning "get_compiler failed" diff --git a/gdb/testsuite/gdb.arch/ppc-fp.exp b/gdb/testsuite/gdb.arch/ppc-fp.exp index b59a3d9..523aaa3 100644 --- a/gdb/testsuite/gdb.arch/ppc-fp.exp +++ b/gdb/testsuite/gdb.arch/ppc-fp.exp @@ -21,9 +21,7 @@ if ![istarget "powerpc*"] then { return } -set testfile "ppc-fp" -set binfile ${objdir}/${subdir}/${testfile} -set srcfile ${testfile}.c +standard_testfile if [get_compiler_info] { warning "get_compiler failed" diff --git a/gdb/testsuite/gdb.arch/vsx-regs.exp b/gdb/testsuite/gdb.arch/vsx-regs.exp index 58bfab4..307f12a 100644 --- a/gdb/testsuite/gdb.arch/vsx-regs.exp +++ b/gdb/testsuite/gdb.arch/vsx-regs.exp @@ -24,9 +24,7 @@ if {![istarget "powerpc*"] || [skip_vsx_tests]} then { return } -set testfile "vsx-regs" -set binfile ${objdir}/${subdir}/${testfile} -set srcfile ${testfile}.c +standard_testfile set compile_flags {debug nowarnings quiet} if [get_compiler_info] { -- 1.8.3.1