From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31155 invoked by alias); 1 Aug 2012 08:46:07 -0000 Received: (qmail 31146 invoked by uid 22791); 1 Aug 2012 08:46:05 -0000 X-SWARE-Spam-Status: No, hits=-7.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,TW_XF,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 01 Aug 2012 08:45:53 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q718jqk6011497 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 1 Aug 2012 04:45:52 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q718jpY0023331; Wed, 1 Aug 2012 04:45:51 -0400 Message-ID: <5018ECBE.4020007@redhat.com> Date: Wed, 01 Aug 2012 08:46:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: Sergio Durigan Junior CC: GDB Patches , Tom Tromey , Jan Kratochvil Subject: Re: [PATCH] Adjust `pc-fp.exp' for ppc64/s390x (PR 12659) References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2012-08/txt/msg00008.txt.bz2 On 07/31/2012 10:25 PM, Sergio Durigan Junior wrote: > While regtesting 7.4 against 7.5 branch on ppc64/s390x RHEL 6.3, I > noticed this failure. The patch which introduced this failure was > committed because of: > > http://sourceware.org/bugzilla/show_bug.cgi?id=12659 > > On x86*, the output of `info register pc fp' is: > > info register pc fp > pc: 0x400520 > fp: 0x7fffffffc490 > (gdb) PASS: gdb.base/pc-fp.exp: info register pc fp > > On ppc64/s390x, it is: > > info register pc fp > pc 0x10000658 0x10000658 > fp: 0xfffffffd120 > (gdb) FAIL: gdb.base/pc-fp.exp: info register pc fp > > Since this difference in the output does not seem to be an error itself, > the patch below just adjusts the testcase to match this kind of output > as well. It does not fail on x86*. Why is the output format different? It looks like consistency here would be good. On 07/31/2012 10:25 PM, Sergio Durigan Junior wrote:> --- src.orig/gdb/testsuite/gdb.base/pc-fp.exp > +++ src/gdb/testsuite/gdb.base/pc-fp.exp > @@ -66,4 +66,4 @@ gdb_test "info register \$fp" "${valueof > # Regression test for > # http://sourceware.org/bugzilla/show_bug.cgi?id=12659 > gdb_test "info register pc fp" \ > - "pc: ${valueof_pc}\[\r\n\]+fp: ${valueof_fp}\[\r\n\]+" > + "pc(:)?.*${valueof_pc}(.*${hex} <.*>)?\[\r\n\]+fp: ${valueof_fp}\[\r\n\]+" Relaxing the output like that means that inadvertent changes to x86's or ppc/s390x output might go unnoticed. It's best to have if [istarget xxx] one way elseif [istarget yyy] another way etc. checks in these cases. -- Pedro Alves