public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@redhat.com>
To: Pierre-Marie de Rodat <derodat@adacore.com>
Cc: Joel Brobecker <brobecker@adacore.com>,
	Pedro Alves <palves@redhat.com>,
	       GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Share the "multi_line" helper among all Ada testcases
Date: Sat, 18 Jul 2015 00:35:00 -0000	[thread overview]
Message-ID: <87oajas3pb.fsf@redhat.com> (raw)
In-Reply-To: <550C100D.5000500@adacore.com> (Pierre-Marie de Rodat's message	of "Fri, 20 Mar 2015 13:18:21 +0100")

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,

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/

gdb/testsuite/ChangeLog:
2015-07-17  Sergio Durigan Junior  <sergiodj@redhat.com>

	* gdb.ada/info_exc.exp (info exceptions): Remove ".*" match.

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\":" \

  parent reply	other threads:[~2015-07-18  0:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10 11:55 Pierre-Marie de Rodat
2015-03-17 20:08 ` Joel Brobecker
2015-03-18  9:45   ` Pedro Alves
2015-03-18 14:12     ` Joel Brobecker
2015-03-20 12:18       ` Pierre-Marie de Rodat
2015-03-20 18:00         ` Pedro Alves
2015-04-01  8:50           ` Pierre-Marie de Rodat
2015-04-01 10:26             ` Pedro Alves
2015-04-01 13:08               ` Pierre-Marie de Rodat
2015-07-18  0:35         ` Sergio Durigan Junior [this message]
2015-07-20 14:49           ` Pierre-Marie de Rodat
2015-07-20 15:35             ` Sergio Durigan Junior
2015-07-20 22:23               ` Joel Brobecker
2015-07-20 22:42                 ` Sergio Durigan Junior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oajas3pb.fsf@redhat.com \
    --to=sergiodj@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=derodat@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).