From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65793 invoked by alias); 26 Jul 2016 07:39:36 -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 65782 invoked by uid 89); 26 Jul 2016 07:39:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=opts, H*r:sk:mmetzge, 2719, 3513 X-HELO: mga14.intel.com Received: from mga14.intel.com (HELO mga14.intel.com) (192.55.52.115) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 26 Jul 2016 07:39:25 +0000 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 26 Jul 2016 00:39:24 -0700 X-ExtLoop1: 1 Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga001.fm.intel.com with ESMTP; 26 Jul 2016 00:39:23 -0700 Received: from ulvlx001.iul.intel.com (ulvlx001.iul.intel.com [172.28.207.17]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u6Q75rOG003145; Tue, 26 Jul 2016 08:05:53 +0100 Received: from ulvlx001.iul.intel.com (localhost [127.0.0.1]) by ulvlx001.iul.intel.com with ESMTP id u6Q75r5d032584; Tue, 26 Jul 2016 09:05:53 +0200 Received: (from mmetzger@localhost) by ulvlx001.iul.intel.com with œ id u6Q75qgF032580; Tue, 26 Jul 2016 09:05:52 +0200 From: Markus Metzger To: gdb-patches@sourceware.org Cc: palves@redhat.com, jan.kratochvil@redhat.com Subject: [PATCH] btrace, testsuite: fix assembly source file selection Date: Tue, 26 Jul 2016 07:39:00 -0000 Message-Id: <1469516752-32313-1-git-send-email-markus.t.metzger@intel.com> X-IsSubscribed: yes X-SW-Source: 2016-07/txt/msg00340.txt.bz2 Some btrace tests use assembly source files. They use the target triplet to distinguish between x86_64 and ia32 ISA. This does not work for -m32 tests without setting the target triplet to i686-?-?. Instead use is_amd64_regs_target to distinguish between x86_64 and ia32 ISA. See also https://sourceware.org/ml/gdb-patches/2016-07/msg00256.html. 2016-07-26 Markus Metzger testsuite/ * gdb.btrace/record_goto.exp: Use is_amd64_regs_target for selecting assembly source files. * gdb.btrace/stepi.exp: Use is_amd64_regs_target for selecting assembly source files. * gdb.btrace/tailcall.exp: Use is_amd64_regs_target for selecting assembly source files. * gdb.btrace/tailcall-only.exp: Use is_amd64_regs_target for selecting assembly source files. --- gdb/testsuite/gdb.btrace/record_goto.exp | 10 ++++++---- gdb/testsuite/gdb.btrace/stepi.exp | 17 ++++++++++++----- gdb/testsuite/gdb.btrace/tailcall-only.exp | 10 ++++++---- gdb/testsuite/gdb.btrace/tailcall.exp | 12 +++++++----- 4 files changed, 31 insertions(+), 18 deletions(-) diff --git a/gdb/testsuite/gdb.btrace/record_goto.exp b/gdb/testsuite/gdb.btrace/record_goto.exp index 50b259a..7df33bc 100644 --- a/gdb/testsuite/gdb.btrace/record_goto.exp +++ b/gdb/testsuite/gdb.btrace/record_goto.exp @@ -33,10 +33,12 @@ if [info exists COMPILE] { # make check RUNTESTFLAGS="gdb.btrace/record_goto.exp COMPILE=1" standard_testfile record_goto.c lappend opts debug -} elseif {[istarget "x86_64-*-*"]} { - standard_testfile x86_64-record_goto.S -} elseif {[istarget "i?86-*-*"]} { - standard_testfile i686-record_goto.S +} elseif {[istarget "i?86-*-*"] || [istarget "x86_64-*-*"]} { + if {[is_amd64_regs_target]} { + standard_testfile x86_64-record_goto.S + } else { + standard_testfile i686-record_goto.S + } } else { verbose "Skipping ${testfile}." return -1 diff --git a/gdb/testsuite/gdb.btrace/stepi.exp b/gdb/testsuite/gdb.btrace/stepi.exp index 3aff8cb..b21e4e5 100644 --- a/gdb/testsuite/gdb.btrace/stepi.exp +++ b/gdb/testsuite/gdb.btrace/stepi.exp @@ -27,12 +27,19 @@ if { [skip_btrace_tests] } { return -1 } # # Luckily, they are similar enough that a single test script can handle # both. -if {[istarget "x86_64-*-*"]} { - standard_testfile x86_64-record_goto.S -} elseif {[istarget "i?86-*-*"]} { - standard_testfile i686-record_goto.S +if [info exists COMPILE] { + # make check RUNTESTFLAGS="gdb.btrace/stepi.exp COMPILE=1" + standard_testfile record_goto.c + lappend opts debug +} elseif {[istarget "i?86-*-*"] || [istarget "x86_64-*-*"]} { + if {[is_amd64_regs_target]} { + standard_testfile x86_64-record_goto.S + } else { + standard_testfile i686-record_goto.S + } } else { - return -1 + verbose "Skipping ${testfile}." + return -1 } # start inferior diff --git a/gdb/testsuite/gdb.btrace/tailcall-only.exp b/gdb/testsuite/gdb.btrace/tailcall-only.exp index 50837bf..494e2e8 100644 --- a/gdb/testsuite/gdb.btrace/tailcall-only.exp +++ b/gdb/testsuite/gdb.btrace/tailcall-only.exp @@ -35,13 +35,15 @@ if [info exists COMPILE] { # make check RUNTESTFLAGS="gdb.btrace/tailcall-only.exp COMPILE=1" standard_testfile tailcall-only.c lappend opts debug optimize=-O2 -} elseif {[istarget "x86_64-*-*"] && [is_lp64_target]} { - standard_testfile x86_64-tailcall-only.S } elseif {[istarget "i?86-*-*"] || [istarget "x86_64-*-*"]} { - standard_testfile i686-tailcall-only.S + if {[is_amd64_regs_target]} { + standard_testfile x86_64-tailcall-only.S + } else { + standard_testfile i686-tailcall-only.S + } } else { verbose "Skipping ${testfile}." - return + return -1 } if [prepare_for_testing tailcall-only.exp $testfile $srcfile $opts] { diff --git a/gdb/testsuite/gdb.btrace/tailcall.exp b/gdb/testsuite/gdb.btrace/tailcall.exp index 22704c7..bc8afc4 100644 --- a/gdb/testsuite/gdb.btrace/tailcall.exp +++ b/gdb/testsuite/gdb.btrace/tailcall.exp @@ -32,13 +32,15 @@ if [info exists COMPILE] { # make check RUNTESTFLAGS="gdb.btrace/tailcall.exp COMPILE=1" standard_testfile tailcall.c lappend opts debug optimize=-O2 -} elseif {[istarget "x86_64-*-*"]} { - standard_testfile x86_64-tailcall.S -} elseif {[istarget "i?86-*-*"]} { - standard_testfile i686-tailcall.S +} elseif {[istarget "i?86-*-*"] || [istarget "x86_64-*-*"]} { + if {[is_amd64_regs_target]} { + standard_testfile x86_64-tailcall.S + } else { + standard_testfile i686-tailcall.S + } } else { verbose "Skipping ${testfile}." - return + return -1 } if [prepare_for_testing tailcall.exp $testfile $srcfile $opts] { -- 1.8.3.1