public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* FAIL: gdb.base/finish.exp: finish from char_func
@ 2000-12-21  4:50 Mark Kettenis
  2000-12-21  7:41 ` Fernando Nasser
  2000-12-21  9:52 ` Michael Snyder
  0 siblings, 2 replies; 5+ messages in thread
From: Mark Kettenis @ 2000-12-21  4:50 UTC (permalink / raw)
  To: msnyder; +Cc: gdb

Hi Michael,

Running the testsuite on i586-pc-linux-gnu gives me the following failure:

   FAIL: gdb.base/finish.exp: finish from char_func

From the .log file I see that the output is:

   Value returned is $1 = 49 '1'^M

which looks OK to me.  But in finish.exp there is the following
regular expression:

   ".*Value returned is .* = 1 '.001'\r\n$gdb_prompt $"

which I don't understand at all.  I would expect something like:

   ".*Value returned is .* = \[0123456789\]* '1'\r\n$gdb_prompt $"

(since you wouldn't want to assume that the character set in use is
ASCII).

What's up?

Mark

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: FAIL: gdb.base/finish.exp: finish from char_func
  2000-12-21  4:50 FAIL: gdb.base/finish.exp: finish from char_func Mark Kettenis
@ 2000-12-21  7:41 ` Fernando Nasser
  2000-12-21  9:57   ` Michael Snyder
  2000-12-21  9:52 ` Michael Snyder
  1 sibling, 1 reply; 5+ messages in thread
From: Fernando Nasser @ 2000-12-21  7:41 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: msnyder, gdb

This change would make this test very weak.

What target are you talking about and what character set?

We can add an "if" for this case until GDB adopts some official way
to handle different character sets.  Some mechanism to handle that
without loosen the tests too much will have to be devised then.

Fernando



Mark Kettenis wrote:
> 
> Hi Michael,
> 
> Running the testsuite on i586-pc-linux-gnu gives me the following failure:
> 
>    FAIL: gdb.base/finish.exp: finish from char_func
> 
> >From the .log file I see that the output is:
> 
>    Value returned is $1 = 49 '1'^M
> 
> which looks OK to me.  But in finish.exp there is the following
> regular expression:
> 
>    ".*Value returned is .* = 1 '.001'\r\n$gdb_prompt $"
> 
> which I don't understand at all.  I would expect something like:
> 
>    ".*Value returned is .* = \[0123456789\]* '1'\r\n$gdb_prompt $"
> 
> (since you wouldn't want to assume that the character set in use is
> ASCII).
> 
> What's up?
> 
> Mark

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: FAIL: gdb.base/finish.exp: finish from char_func
  2000-12-21  4:50 FAIL: gdb.base/finish.exp: finish from char_func Mark Kettenis
  2000-12-21  7:41 ` Fernando Nasser
@ 2000-12-21  9:52 ` Michael Snyder
  2000-12-21 11:52   ` Mark Kettenis
  1 sibling, 1 reply; 5+ messages in thread
From: Michael Snyder @ 2000-12-21  9:52 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb

Mark Kettenis wrote:
> 
> Hi Michael,
> 
> Running the testsuite on i586-pc-linux-gnu gives me the following failure:
> 
>    FAIL: gdb.base/finish.exp: finish from char_func
> 
> >From the .log file I see that the output is:
> 
>    Value returned is $1 = 49 '1'^M
> 
> which looks OK to me.  But in finish.exp there is the following
> regular expression:
> 
>    ".*Value returned is .* = 1 '.001'\r\n$gdb_prompt $"
> 
> which I don't understand at all. 

Oops.  My fault.  I was playing with two different versions of the test
before I checked it in: one which returned the value \001, and one
that returned the ascii character '1'.  I obviously checked in the
c code for one and the regular expression for the other.

> I would expect something like:
> 
>    ".*Value returned is .* = \[0123456789\]* '1'\r\n$gdb_prompt $"
> 
> (since you wouldn't want to assume that the character set in use is
> ASCII).

Well, the ASCII character set is assumed pretty widely in these tests.
And I'm not really aware of GDB ever being ported to a platform with
a non-ASCII character set.  Tell you what.  I will change it so that
first it's consistant, second it expects an ASCII character, and finally
it will pass but with a remark for a non-ASCII character.

Back to you in a minute...

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: FAIL: gdb.base/finish.exp: finish from char_func
  2000-12-21  7:41 ` Fernando Nasser
@ 2000-12-21  9:57   ` Michael Snyder
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Snyder @ 2000-12-21  9:57 UTC (permalink / raw)
  To: Fernando Nasser; +Cc: Mark Kettenis, gdb

Fernando Nasser wrote:
> 
> This change would make this test very weak.
> 
> What target are you talking about and what character set?

Fernando, FYI, the fail was due to my checking in an inconsistent set
of sources.  The RE was expecting the value \001, while the program
was returning the character '1'.
> 
> We can add an "if" for this case until GDB adopts some official way
> to handle different character sets.  Some mechanism to handle that
> without loosen the tests too much will have to be devised then.

I'll get back to you with a change that I hope will answer Marks
issues and yours.  Although I seriously don't expect GDB to work
with a non-ASCII character set...


> Mark Kettenis wrote:
> >
> > Hi Michael,
> >
> > Running the testsuite on i586-pc-linux-gnu gives me the following failure:
> >
> >    FAIL: gdb.base/finish.exp: finish from char_func
> >
> > >From the .log file I see that the output is:
> >
> >    Value returned is $1 = 49 '1'^M
> >
> > which looks OK to me.  But in finish.exp there is the following
> > regular expression:
> >
> >    ".*Value returned is .* = 1 '.001'\r\n$gdb_prompt $"
> >
> > which I don't understand at all.  I would expect something like:
> >
> >    ".*Value returned is .* = \[0123456789\]* '1'\r\n$gdb_prompt $"
> >
> > (since you wouldn't want to assume that the character set in use is
> > ASCII).
> >
> > What's up?
> >
> > Mark
> 
> --
> Fernando Nasser
> Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
> 2323 Yonge Street, Suite #300
> Toronto, Ontario   M4P 2C9

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: FAIL: gdb.base/finish.exp: finish from char_func
  2000-12-21  9:52 ` Michael Snyder
@ 2000-12-21 11:52   ` Mark Kettenis
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Kettenis @ 2000-12-21 11:52 UTC (permalink / raw)
  To: msnyder; +Cc: gdb

   Date: Thu, 21 Dec 2000 09:53:06 -0800
   From: Michael Snyder <msnyder@redhat.com>

   > I would expect something like:
   > 
   >    ".*Value returned is .* = \[0123456789\]* '1'\r\n$gdb_prompt $"
   > 
   > (since you wouldn't want to assume that the character set in use is
   > ASCII).

   Well, the ASCII character set is assumed pretty widely in these tests.
   And I'm not really aware of GDB ever being ported to a platform with
   a non-ASCII character set.  Tell you what.  I will change it so that
   first it's consistant, second it expects an ASCII character, and finally
   it will pass but with a remark for a non-ASCII character.

To be honest, I don't really care about platforms with non-ASCII
character sets.  I just thought others might.

Your patch looks fine to me.  Thanks!

Mark

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-12-21 11:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-21  4:50 FAIL: gdb.base/finish.exp: finish from char_func Mark Kettenis
2000-12-21  7:41 ` Fernando Nasser
2000-12-21  9:57   ` Michael Snyder
2000-12-21  9:52 ` Michael Snyder
2000-12-21 11:52   ` Mark Kettenis

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).