Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Sergio Durigan Junior <sergiodj@redhat.com>
Cc: Pierre-Marie de Rodat <derodat@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: Mon, 20 Jul 2015 22:23:00 -0000	[thread overview]
Message-ID: <20150720222317.GH7406@adacore.com> (raw)
In-Reply-To: <87r3o2rgeh.fsf@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1126 bytes --]

> > --- 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" \
> > -                ".*"]
> > +                "\(.*\r\n\)*const.aint_global_gdb_e: $hex\(.*\r\n\)*"]
> >
> >  gdb_test "info exceptions task" \
> >      [multi_line "All Ada exceptions matching regular expression
> > \"task\":" \

I missed that answer, and came up with something very similar,
which I checked in. Here it is:

gdb/testsuite/ChangeLog:

        * gdb.ada/info_exc.exp: Adjust "info exceptions" expected output.

Tested on x86_64-linux.

I thought about using join directly with the relaxed end-of-line
sequence to restore the original behavior, but then decided against
it, because this expected output is stricter, and I think that's
better. So I came up with the attached patch, which is another way
of doing what Pierre Marie had done.

-- 
Joel

[-- Attachment #2: 0001-gdb.ada-info_exc.exp-Adjust-expected-output-in-info-.patch --]
[-- Type: text/x-diff, Size: 2007 bytes --]

From 8b558f797a3a63aaa8de119ddf53c8afdd1dc6eb Mon Sep 17 00:00:00 2001
From: Joel Brobecker <brobecker@adacore.com>
Date: Mon, 20 Jul 2015 15:09:44 -0700
Subject: [PATCH] gdb.ada/info_exc.exp: Adjust expected output in "info
 exception" test.

Since multi_line was moved to gdb.exp in a slightly stricter form,
The gdb.ada/info_exc.exp:info exceptions test has been failing.
This is because it now expects a new-line sequence at the end of
each argument given to multi_line, including ".*". But the intent
when writing the test was to signify "could-be-nothing-at-all".
As a result, the test fails on x86_64-linux with a runtime built as
recommended, because of that
extra new-line sequence.

gdb/testsuite/ChangeLog:

        * gdb.ada/info_exc.exp: Adjust "info exceptions" expected output.
---
 gdb/testsuite/ChangeLog            | 4 ++++
 gdb/testsuite/gdb.ada/info_exc.exp | 4 +---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 520f606..17af4fc 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2015-07-20  Joel Brobecker  <brobecker@adacore.com>
+
+	* gdb.ada/info_exc.exp: Adjust "info exceptions" expected output.
+
 2015-07-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
 	* gdb.arch/i386-biarch-core.exp: Replace istarget
diff --git a/gdb/testsuite/gdb.ada/info_exc.exp b/gdb/testsuite/gdb.ada/info_exc.exp
index add83c5..d6ea5da 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" \
-                ".*"]
+                ".*\[\r\n\]*const.aint_global_gdb_e: $hex\[\r\n\]*.*" ]
 
 gdb_test "info exceptions task" \
     [multi_line "All Ada exceptions matching regular expression \"task\":" \
-- 
2.1.4


  reply	other threads:[~2015-07-20 22:23 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
2015-07-20 14:49           ` Pierre-Marie de Rodat
2015-07-20 15:35             ` Sergio Durigan Junior
2015-07-20 22:23               ` Joel Brobecker [this message]
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=20150720222317.GH7406@adacore.com \
    --to=brobecker@adacore.com \
    --cc=derodat@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=sergiodj@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