From patchwork Sat Jul 18 00:35:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Durigan Junior X-Patchwork-Id: 7740 Received: (qmail 29122 invoked by alias); 18 Jul 2015 00:35:18 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 29110 invoked by uid 89); 18 Jul 2015 00:35:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 18 Jul 2015 00:35:16 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id E4A1D8E3CF; Sat, 18 Jul 2015 00:35:14 +0000 (UTC) Received: from localhost (unused-10-15-17-51.yyz.redhat.com [10.15.17.51]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t6I0ZCvt008774 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 17 Jul 2015 20:35:14 -0400 From: Sergio Durigan Junior To: Pierre-Marie de Rodat Cc: Joel Brobecker , Pedro Alves , GDB Patches Subject: Re: [PATCH] Share the "multi_line" helper among all Ada testcases References: <54FEDB92.9060808@adacore.com> <20150317200809.GD7494@adacore.com> <5509492C.5000604@redhat.com> <20150318141238.GE7494@adacore.com> <550C100D.5000500@adacore.com> X-URL: http://blog.sergiodj.net Date: Fri, 17 Jul 2015 20:35:12 -0400 In-Reply-To: <550C100D.5000500@adacore.com> (Pierre-Marie de Rodat's message of "Fri, 20 Mar 2015 13:18:21 +0100") Message-ID: <87oajas3pb.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes On Friday, March 20 2015, Pierre-Marie de Rodat wrote: > On 03/18/2015 03:12 PM, Joel Brobecker wrote: >>> How about making multi_line join with strict "\r\n" too? Then if >>> you need to match one empty line, you can do: >>> >>> [multi_line "line1" \ >>> "" >>> "line3"] >>> >>> and if you need multiple, you can always do: >>> >>> [multi_line "line1" \ >>> "\[\r\n\]*" >>> "lineNN"] >> >> Very good suggestion, I like it! Pierre-Marie? > > I do like it too: thank you for the suggestion! Here is the updated > patch: I moved multi_line to gdb.exp, updated it according to what you > said and updated all testcases matching "[join [list" to use it. The > good news is that it seems no testcase actually needs the [\r\n]* > laxism. Hmm, I am seeing a regression on gdb.ada/info_exc.exp because of this patch. Because of the way multi_line was rewritten it is not possibe anymore to mean "anything" again; it will always be at least a newline (\r\n). I've rewritten the test to expect the exact output from "info exceptions" (i.e., removing the ".*" parts), but I am not sure this is the right thing to do. Joel/Pierre? This was a regression introduced in the 7.10 branch, BTW. Thanks, diff --git a/gdb/testsuite/gdb.ada/info_exc.exp b/gdb/testsuite/gdb.ada/info_exc.exp index add83c5..4f7b1d4 100644 --- a/gdb/testsuite/gdb.ada/info_exc.exp +++ b/gdb/testsuite/gdb.ada/info_exc.exp @@ -34,9 +34,7 @@ gdb_test "info exceptions" \ "program_error: $hex" \ "storage_error: $hex" \ "tasking_error: $hex" \ - ".*" \ - "const.aint_global_gdb_e: $hex" \ - ".*"] + "const.aint_global_gdb_e: $hex"] gdb_test "info exceptions task" \ [multi_line "All Ada exceptions matching regular expression \"task\":" \