Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: [RFA] testsuite/gdb.c++/derivation.exp: use 'runto' library function
@ 2001-03-12 12:17 Michael Elizabeth Chastain
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Elizabeth Chastain @ 2001-03-12 12:17 UTC (permalink / raw)
  To: chastain, msnyder; +Cc: gdb-patches

Michael Snyder writes:

> Maybe we should add one, somewhere (if not in this file), 
> so that that bug cannot slip thru the cracks?

There's an explicit test in gdb.c++/method.exp that matches this
bug pretty well.

  send_gdb "continue\n"
  gdb_expect {
     -re "Continuing\\.\r\n\r\nBreakpoint \[0-9\]*, A::foo \\(this=$hex, arg=13\\) at .*method\\.cc:38\r\n38\[\t \]*x \\+= arg;\r\n$gdb_prompt $" {
	pass "continued and got breakpoint in A::foo"
     }
     -re ".*$gdb_prompt $" { fail "continuing and breaking in A::foo" }
     timeout { fail "(timeout) continue" }
  }

gdb.log says:

  continue^M
  Continuing.^M
  ^M
  Breakpoint 2, A::foo(int) (this=0xbffff390, arg=13) at /vittone/fsf/2001-03-09/source/gdb/testsuite/gdb.c++/method.cc:38^M
  38        x += arg;^M
  (gdb) FAIL: gdb.c++/method.exp: continuing and breaking in A::foo

I'll add a note to PR gdb/34 that it's tested in gdb.c++/method.exp.

Do you want me to add a note to gdb.c++/method.exp that it tests PR gdb/34?

Michael


^ permalink raw reply	[flat|nested] 3+ messages in thread
* [RFA] testsuite/gdb.c++/derivation.exp: use 'runto' library function
@ 2001-03-12  2:05 Michael Elizabeth Chastain
  2001-03-12 11:52 ` Michael Snyder
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Elizabeth Chastain @ 2001-03-12  2:05 UTC (permalink / raw)
  To: gdb-patches

This is Sunday Project Patch #7.

This patch changes gdb.c++/derivation.exp to use the library function
'runto' to reach a marker function.  This simplifies the file.  The real
benefit is that 'runto' accommodates an unrelated bug in gdb (PR gdb/34,
"g++ v3 functions show as "inheritance2() ()"").  This enables the
keep its synchronization and do its job testing C++.

Before this patch, this test script outputs 20 FAILs + 3 XFAILs.
After this patch, output is 16 PASSes + 4 FAILs + 3 XPASSes.

I tested this on Red Hat Linux 7 native and Solaris 2.5.1 native with
gcc 2.95.2 and gcc 3pre dated 2001-03-09.

OK to apply?

Michael

===

2001-03-12  Michael Chastain  <chastain@redhat.com>

	* gdb.c++/derivation.exp: Use the 'runto' library function.

===

Index: gdb/testsuite/gdb.c++/derivation.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/derivation.exp,v
retrieving revision 1.4
diff -c -3 -p -r1.4 derivation.exp
*** gdb/testsuite/gdb.c++/derivation.exp	2001/03/06 08:21:52	1.4
--- gdb/testsuite/gdb.c++/derivation.exp	2001/03/12 09:34:43
***************
*** 1,4 ****
! # Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
  
  # This program is free software; you can redistribute it and/or modify
  # it under the terms of the GNU General Public License as published by
--- 1,4 ----
! # Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
  
  # This program is free software; you can redistribute it and/or modify
  # it under the terms of the GNU General Public License as published by
*************** if ![runto_main] then {
*** 69,93 ****
      continue
  }
  
! send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
  
!     send_gdb "cont\n"
!     gdb_expect {
!         -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
!             send_gdb "up\n"
!             gdb_expect {
!                 -re ".*main.*$gdb_prompt $" {
! 		    pass "up from marker1"
! 		}
!                 -re ".*$gdb_prompt $" {
! 		    fail "up from marker1"
! 		}
!                 timeout { fail "up from marker1 (timeout)" }
!             }
!         }
!         -re "$gdb_prompt $" { fail "continue to marker1"  }
!         timeout { fail "(timeout) continue to marker1"  }
!     }
  
  
  
--- 69,80 ----
      continue
  }
  
! if ![runto 'marker1'] then {
!     perror "couldn't run to marker1"
!     continue
! }
  
! gdb_test "up" ".*main.*" "up from marker1"
  
  
  


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

end of thread, other threads:[~2001-03-12 12:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-12 12:17 [RFA] testsuite/gdb.c++/derivation.exp: use 'runto' library function Michael Elizabeth Chastain
  -- strict thread matches above, loose matches on Subject: below --
2001-03-12  2:05 Michael Elizabeth Chastain
2001-03-12 11:52 ` Michael Snyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox