From patchwork Mon Jul 18 23:36:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gab Charette X-Patchwork-Id: 105365 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]) by ozlabs.org (Postfix) with SMTP id 66203B6F00 for ; Tue, 19 Jul 2011 09:36:59 +1000 (EST) Received: (qmail 19498 invoked by alias); 18 Jul 2011 23:36:58 -0000 Received: (qmail 19490 invoked by uid 22791); 18 Jul 2011 23:36:57 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RP_MATCHES_RCVD, SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 18 Jul 2011 23:36:38 +0000 Received: from kpbe20.cbf.corp.google.com (kpbe20.cbf.corp.google.com [172.25.105.84]) by smtp-out.google.com with ESMTP id p6INaboo012909; Mon, 18 Jul 2011 16:36:37 -0700 Received: from gchare.mtv.corp.google.com (gchare.mtv.corp.google.com [172.18.111.122]) by kpbe20.cbf.corp.google.com with ESMTP id p6INaZSg013938; Mon, 18 Jul 2011 16:36:35 -0700 Received: by gchare.mtv.corp.google.com (Postfix, from userid 138564) id 6B9341C3720; Mon, 18 Jul 2011 16:36:35 -0700 (PDT) To: reply@codereview.appspotmail.com, crowl@google.com, dnovillo@google.com, gcc-patches@gcc.gnu.org Subject: [pph] Output checksum for new unexpected diff (issue4768041) Message-Id: <20110718233635.6B9341C3720@gchare.mtv.corp.google.com> Date: Mon, 18 Jul 2011 16:36:35 -0700 (PDT) From: gchare@google.com (Gabriel Charette) X-System-Of-Record: true X-IsSubscribed: yes 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 Output the diff's sum for unexpected diffs as well (used to only output it when it had changed, but outputting it for new diffs will make it easier to generate the comment required to mark this diff as expected when needed). Also switched from using exec calls to tr/cut, now using native TCL functions as suggested by Andreas Schwab in issue 4744043 (which was already commited then). 2011-07-18 Gabriel Charette * lib/dg-pph.exp (dg-pph-pos): Output actualSum on unexpected diff. Use native TCL functions instead of exec calls to tr and cut. --- This patch is available for review at http://codereview.appspot.com/4768041 diff --git a/gcc/testsuite/lib/dg-pph.exp b/gcc/testsuite/lib/dg-pph.exp index b285ccf..013ccfe 100644 --- a/gcc/testsuite/lib/dg-pph.exp +++ b/gcc/testsuite/lib/dg-pph.exp @@ -142,16 +142,16 @@ proc dg-pph-pos { subdir test options mapflag suffix } { file_on_host delete "$bname.s+pph" } elseif { $adiff == 1 } { verbose -log "Diff obtained:\n$diff_result" + set actualSum [lindex [split [exec sum << $diff_result] " "] 0] if { $xdiff } { - set expectedSum [exec tr -d \} << [exec cut -f 4 -d\ << $xdiff_entry]] - set actualSum [exec cut -f 1 -d\ << [exec sum << $diff_result]] + set expectedSum [lindex [split $xdiff_entry " \}"] 3] if { $expectedSum == $actualSum } { xfail "$nshort $options (assembly comparison)" } else { fail "$nshort $options (assembly comparison, sums $expectedSum=>$actualSum)" } } else { - fail "$nshort $options (assembly comparison)" + fail "$nshort $options (assembly comparison, sum=$actualSum)" } } else { fail "$nshort $options comparison failure"