Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: Tom Tromey <tromey@redhat.com>,
	GDB Patches <gdb-patches@sourceware.org>,
	       Jan Kratochvil <jan.kratochvil@redhat.com>
Subject: Re: [PATCH] Adjust `pc-fp.exp' for ppc64/s390x (PR 12659)
Date: Wed, 01 Aug 2012 20:49:00 -0000	[thread overview]
Message-ID: <m34noml4mg.fsf@redhat.com> (raw)
In-Reply-To: <50199028.6060208@redhat.com>

On Wednesday, August 01 2012, Pedro Alves wrote:

> On 08/01/2012 08:52 PM, Tom Tromey wrote:
>>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>> 
>>>> # Regression test for
>>>> # http://sourceware.org/bugzilla/show_bug.cgi?id=12659>>> gdb_test "info register pc fp" \
>>>> -    "pc: ${valueof_pc}\[\r\n\]+fp: ${valueof_fp}\[\r\n\]+"
>>>> + "pc(:)?.*${valueof_pc}(.*${hex} <.*>)?\[\r\n\]+fp:
>>>> ${valueof_fp}\[\r\n\]+"
>> 
>> Pedro> Relaxing the output like that means that inadvertent changes to x86's
>> Pedro> or ppc/s390x output might go unnoticed.  It's best to have
>> 
>> In this particular case, the check is really just to verify that the
>> named register, and nothing else, appears at the start of the line.
>> 
>> Before 12659 was fixed, "info register pc fp" printed:
>> 
>> sp fp: blah blah
>> fp: blah blah
>> 
>> The "fp" on the first line was the bogus bit.
>> 
>> I think the test would remain correct, with regards to what it was
>> intended to check, if it even went as far as "pc: .*\[\r\n\]+fp: .*";
>> checking the values is additional here.
>
> Ah, in that case, I agree.

In this case the testcase would have to omit the `:' after the name of
the register, since as we have seen the colon is not always present.

I will open a bugzilla to register that we want to make the output of
`info register' uniform accross all platforms.

Is this patch OK then?

-- 
Sergio

2012-08-01  Sergio Durigan Junior  <sergiodj@redhat.com>

	* gdb.base/pc-fp.exp: Adjust testcase to match a wider range of
	outputs.

Index: src/gdb/testsuite/gdb.base/pc-fp.exp

===================================================================
--- src.orig/gdb/testsuite/gdb.base/pc-fp.exp
+++ src/gdb/testsuite/gdb.base/pc-fp.exp
@@ -66,4 +66,4 @@ gdb_test "info register \$fp" "${valueof
 # Regression test for
 # http://sourceware.org/bugzilla/show_bug.cgi?id=12659
 gdb_test "info register pc fp" \
-    "pc: ${valueof_pc}\[\r\n\]+fp: ${valueof_fp}\[\r\n\]+"
+    "pc.*\[\r\n\]+fp.*\[\r\n\]+"


  reply	other threads:[~2012-08-01 20:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-31 21:26 Sergio Durigan Junior
2012-07-31 23:29 ` Andreas Schwab
2012-08-01  3:06   ` Sergio Durigan Junior
2012-08-01  9:22     ` Andreas Schwab
2012-08-01  8:46 ` Pedro Alves
2012-08-01 19:41   ` Ulrich Weigand
2012-08-01 19:47     ` Sergio Durigan Junior
2012-08-01 20:20     ` info registers output Pedro Alves
2012-08-01 20:49       ` Ulrich Weigand
2012-08-01 20:55         ` Sergio Durigan Junior
2012-08-27 17:41         ` Pedro Alves
2012-08-28  0:41           ` Ulrich Weigand
2012-08-28  9:07             ` Pedro Alves
2012-08-01 19:52   ` [PATCH] Adjust `pc-fp.exp' for ppc64/s390x (PR 12659) Tom Tromey
2012-08-01 20:23     ` Pedro Alves
2012-08-01 20:49       ` Sergio Durigan Junior [this message]
2012-08-01 21:44         ` Pedro Alves
2012-08-01 22:03         ` Andreas Schwab
2012-08-01 23:40           ` Sergio Durigan Junior
2012-08-02  9:06             ` Pedro Alves
2012-08-02 20:38               ` Sergio Durigan Junior
2012-08-08 11:57   ` Mark Kettenis

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=m34noml4mg.fsf@redhat.com \
    --to=sergiodj@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=palves@redhat.com \
    --cc=tromey@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