From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12593 invoked by alias); 8 Jan 2018 06:42: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 12566 invoked by uid 89); 8 Jan 2018 06:42:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,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=pay X-HELO: mail-lf0-f65.google.com Received: from mail-lf0-f65.google.com (HELO mail-lf0-f65.google.com) (209.85.215.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 08 Jan 2018 06:42:32 +0000 Received: by mail-lf0-f65.google.com with SMTP id j143so10977520lfg.0 for ; Sun, 07 Jan 2018 22:42:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ghT8Tl1BDLzdTxlTdcB+0wAtWJHVTwru9I3l6GvvJHo=; b=D8dKQz2ZGBgY1/2m7l19HvlWAJE2JOzqGVNi8GBDhbUo//UEjPxIxj2V6IHhVV4MxL TnRLuwKBm7DG2cuNPRLVnQqiYULyjK2XmJo4kKsM3ckcVmHFh6CATRQOBvaAm9HG+VZW UahSNEoTSNvGe7LASHHaT5YyfL4wTUNrDfu0BDx2EPtNVoBy4xVkvpoQcaG/bwuLDVM2 SNjUe2iko2GftntFlIYbJgiSQ805qNgMEIRhaFtch0Ez1LQvd1fXkxEuxk1hrvhf33Zd I0LsyxthDQCPZDWV+szWKde5+rfqrSmv3RFKQeHWDTIBTC+hUIi5MMBsaylGP46RHY8U pruw== X-Gm-Message-State: AKwxytccT1DBQucn1Vh08H7Spo80Y6EA29Egd6a4Z78cLMiQmTbDEV10 l4j1wr5XOu2V8L8qAyzIeJjY65DIzC1j7G6G7/A= X-Google-Smtp-Source: ACJfBovOTHMm4Ge8ox6D57Fp7MoC9+wc4YXEqYNv/Xc6ykoNPyyQoTqY4kbxXUILWmhjqBITPOWLOVmKK9KVRLv9NCk= X-Received: by 10.25.161.19 with SMTP id k19mr5544138lfe.127.1515393749389; Sun, 07 Jan 2018 22:42:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.152.195 with HTTP; Sun, 7 Jan 2018 22:42:28 -0800 (PST) In-Reply-To: <20180108042544.yzq3egkfph2c6v45@adacore.com> References: <1515363510-18374-1-git-send-email-b7.10110111@gmail.com> <20180108042544.yzq3egkfph2c6v45@adacore.com> From: Ruslan Kabatsayev Date: Mon, 08 Jan 2018 06:42:00 -0000 Message-ID: Subject: Re: [PATCH] Make tests expect [ \t]+ pattern instead of \t for "info reg" command To: Joel Brobecker Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00153.txt.bz2 On 8 January 2018 at 07:25, Joel Brobecker wrote: > 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. \\s would also allow newlines, form feeds etc., which doesn't look like a good idea here. > > Anyone against this change? > > One comment: > >> diff --git a/gdb/testsuite/gdb.base/pc-fp.exp b/gdb/testsuite/gdb.base/p= c-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=3D12659 >> 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... Well it allows _multiple_ spaces/tabs instead of exactly one tab =E2=80=94 exactly what we need to be compatible with space-alignment. In other respects I don't see what else it does. > > For the rest of this (large and mechanical patch), I tried my best > to pay attention to all the details. > > -- > Joel