From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100842 invoked by alias); 18 Sep 2015 08:36:09 -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 100830 invoked by uid 89); 18 Sep 2015 08:36:08 -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,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mga09.intel.com Received: from mga09.intel.com (HELO mga09.intel.com) (134.134.136.24) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Sep 2015 08:36:07 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 18 Sep 2015 01:36:06 -0700 X-ExtLoop1: 1 Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga002.fm.intel.com with ESMTP; 18 Sep 2015 01:36:05 -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 t8I8a4Em031208; Fri, 18 Sep 2015 09:36:04 +0100 Received: from ulvlx001.iul.intel.com (localhost [127.0.0.1]) by ulvlx001.iul.intel.com with ESMTP id t8I8a3pw013899; Fri, 18 Sep 2015 10:36:03 +0200 Received: (from mmetzger@localhost) by ulvlx001.iul.intel.com with œ id t8I8a3IP013895; Fri, 18 Sep 2015 10:36:03 +0200 From: Markus Metzger To: palves@redhat.com Cc: gdb-patches@sourceware.org Subject: [PATCH] btrace, testsuite: fix spurious gdb.btrace/tsx.exp fails Date: Fri, 18 Sep 2015 08:36:00 -0000 Message-Id: <1442565363-13628-1-git-send-email-markus.t.metzger@intel.com> X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00439.txt.bz2 If the atomic section in x86-tsx.S is aborted, the tsx.exp test will fail even if the traced output is actually correct. Consider abort scenarios in the test. 2015-09-18 Markus Metzger testsuite/ * gdb.btrace/tsx.exp: Consider multiple correct outputs in the record instruction-history test. --- gdb/testsuite/gdb.btrace/tsx.exp | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/gdb/testsuite/gdb.btrace/tsx.exp b/gdb/testsuite/gdb.btrace/tsx.exp index 525d4d2..cc493a1 100644 --- a/gdb/testsuite/gdb.btrace/tsx.exp +++ b/gdb/testsuite/gdb.btrace/tsx.exp @@ -32,10 +32,34 @@ gdb_test_no_output "record btrace pt" gdb_test "next" # look at the instruction trace -gdb_test "record instruction-history" [multi_line \ - ".*" \ - "\[0-9\]*\t\\? 0x\[0-9a-f\]+ :\txbegin\[^\\\r\\\n\]*" \ - "\[0-9\]*\t\\? 0x\[0-9a-f\]+ :\tmov\[^\\\r\\\n\]*" \ - "\[0-9\]*\t 0x\[0-9a-f\]+ :\txend\[^\\\r\\\n\]*" \ - ".*" \ - ] +set begin_to_end [multi_line \ + ".*" \ + "\[0-9\]*\t\\? 0x\[0-9a-f\]+ :\txbegin\[^\\\r\\\n\]*" \ + "\[0-9\]*\t\\? 0x\[0-9a-f\]+ :\tmov\[^\\\r\\\n\]*" \ + "\[0-9\]*\t 0x\[0-9a-f\]+ :\txend\[^\\\r\\\n\]*" \ + ] +set abort_1 [multi_line \ + ".*" \ + "\[0-9\]*\t\\? 0x\[0-9a-f\]+ :\txbegin\[^\\\r\\\n\]*" \ + "\[0-9\]*\t 0x\[0-9a-f\]+ :\tmov\[^\\\r\\\n\]*" \ + "\[0-9\]*\t 0x\[0-9a-f\]+ :\tret\[^\\\r\\\n\]*" \ + ] +set abort_2 [multi_line \ + ".*" \ + "\[0-9\]*\t\\? 0x\[0-9a-f\]+ :\txbegin\[^\\\r\\\n\]*" \ + "\[0-9\]*\t\\? 0x\[0-9a-f\]+ :\tmov\[^\\\r\\\n\]*" \ + "\[0-9\]*\t 0x\[0-9a-f\]+ :\tmov\[^\\\r\\\n\]*" \ + "\[0-9\]*\t 0x\[0-9a-f\]+ :\tret\[^\\\r\\\n\]*" \ + ] + +gdb_test_multiple "record instruction-history" "speculation indication" { + -re "$abort_1.*$gdb_prompt $" { + pass "speculation indication: abort" + } + -re "$abort_2.*$gdb_prompt $" { + pass "speculation indication: abort" + } + -re "$begin_to_end.*$gdb_prompt $" { + pass "speculation indication: begin..end" + } +} -- 1.8.3.1