From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118191 invoked by alias); 8 Jan 2018 04:25:58 -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 118166 invoked by uid 89); 8 Jan 2018 04:25:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:2358, pay, wish X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 08 Jan 2018 04:25:51 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id D9DDC11751D; Sun, 7 Jan 2018 23:25:49 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 4ki3Rvw+OjIe; Sun, 7 Jan 2018 23:25:49 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 71F37117510; Sun, 7 Jan 2018 23:25:49 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id D13BC8304F; Mon, 8 Jan 2018 08:25:44 +0400 (+04) Date: Mon, 08 Jan 2018 04:25:00 -0000 From: Joel Brobecker To: Ruslan Kabatsayev Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Make tests expect [ \t]+ pattern instead of \t for "info reg" command Message-ID: <20180108042544.yzq3egkfph2c6v45@adacore.com> References: <1515363510-18374-1-git-send-email-b7.10110111@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1515363510-18374-1-git-send-email-b7.10110111@gmail.com> User-Agent: NeoMutt/20170113 (1.7.2) X-SW-Source: 2018-01/txt/msg00151.txt.bz2 On Mon, Jan 08, 2018 at 01:18:30AM +0300, Ruslan Kabatsayev wrote: > This will allow to format output of "info reg" command as we wish, > without breaking the tests. In particular, it'll let us correctly align > raw and natural values of the registers using spaces instead of current > badly-working approach with tabs. > > This change is forwards- and backwards-compatible, so that the amended > tests will work in the same way before and after reformatting patches > (unless the tests check formatting, of course, but I've not come across > any such tests). > > Some tests already used this expected pattern, so they didn't > even have to be modified. Others are changed by this patch. > > I've checked this on a i386 system, with no noticeable differences in > test results, so at least on i386 nothing seems to be broken by this. > > gdb/testsuite/ChangeLog: > > * gdb.arch/powerpc-d128-regs.exp: Replace expected "\[\t\]*" from > "info reg" with "\[ \t\]*". > * gdb.arch/altivec-regs.exp: Replace expected "\t" from "info reg" with > "\[ \t\]+". > * gdb.arch/s390-multiarch.exp: Ditto. > * gdb.base/pc-fp.exp: Ditto. > * gdb.reverse/i386-precsave.exp: Ditto. > * gdb.reverse/i386-reverse.exp: Ditto. > * gdb.reverse/i387-env-reverse.exp: Ditto. > * gdb.reverse/i387-stack-reverse.exp: Ditto. No objection on my end. I might have used \\s instead of \[ \t\], but perhaps there was a reason not to; and even if not, no point in redoing it all now. Anyone against this change? One comment: > diff --git a/gdb/testsuite/gdb.base/pc-fp.exp b/gdb/testsuite/gdb.base/pc-fp.exp > index 5230b2b..8a81db4 100644 > --- a/gdb/testsuite/gdb.base/pc-fp.exp > +++ b/gdb/testsuite/gdb.base/pc-fp.exp > @@ -58,4 +58,4 @@ gdb_test "info register \$fp" "${valueof_fp}.*" > # Regression test for > # http://sourceware.org/bugzilla/show_bug.cgi?id=12659 > gdb_test "info register pc fp" \ > - "pc +${valueof_pc}\t${valueof_pc} <.*>\[\r\n\]+fp +${valueof_fp}\t${valueof_fp}\[\r\n\]+" > + "pc +${valueof_pc}\[ \t\]+${valueof_pc} <.*>\[\r\n\]+fp +${valueof_fp}\[ \t\]+${valueof_fp}\[\r\n\]+" This change looks like it's doing more than just allowing spaces on top of tabs... For the rest of this (large and mechanical patch), I tried my best to pay attention to all the details. -- Joel