Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] Run follow-fork tests on Linux
@ 2005-11-26  0:05 Michael Snyder
  2005-11-26  3:58 ` Andreas Schwab
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Michael Snyder @ 2005-11-26  0:05 UTC (permalink / raw)
  To: GDB Patches, Daniel Jacobowitz

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

This allows the tests "foll-fork" and "foll-vfork" to run on Linux,
where they mostly pass.  A little more verbose output from linux-nat.c
will fix the remaining failures.


[-- Attachment #2: testfork --]
[-- Type: text/plain, Size: 1676 bytes --]

2005-11-25  Michael Snyder  <msnyder@redhat.com>

	* gdb.base/foll-fork.exp: Run if istarget linux.
	Add PASS cases for linux.
	* gdb.base/foll-vfork.exp: Run if istarget linux.

Index: gdb.base/foll-vfork.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/foll-vfork.exp,v
retrieving revision 1.3
diff -p -r1.3 foll-vfork.exp
*** gdb.base/foll-vfork.exp	11 Dec 2002 02:04:45 -0000	1.3
--- gdb.base/foll-vfork.exp	25 Nov 2005 22:30:44 -0000
*************** if  { [gdb_compile "${srcdir}/${subdir}/
*** 55,61 ****
  # Until "set follow-fork-mode" and "catch vfork" are implemented on
  # other targets...
  #
! if ![istarget "hppa*-hp-hpux*"] then {
      continue
  }
  
--- 55,61 ----
  # Until "set follow-fork-mode" and "catch vfork" are implemented on
  # other targets...
  #
! if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-pc-linux*"]} then {
      continue
  }
  
*************** proc vfork_parent_follow_to_bp {} {
*** 109,115 ****
     }
     send_gdb "continue\n"
     gdb_expect {
!       -re ".*Detaching after fork from process.*Breakpoint.*18.*$gdb_prompt "\
                        {pass "vfork parent follow, to bp"}
        -re "$gdb_prompt $" {fail "vfork parent follow, to bp"}
        timeout         {fail "(timeout) vfork parent follow, to bp" }
--- 109,115 ----
     }
     send_gdb "continue\n"
     gdb_expect {
!       -re ".*Detaching after fork from.*Breakpoint.*18.*$gdb_prompt "\
                        {pass "vfork parent follow, to bp"}
        -re "$gdb_prompt $" {fail "vfork parent follow, to bp"}
        timeout         {fail "(timeout) vfork parent follow, to bp" }

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

* Re: [RFA] Run follow-fork tests on Linux
  2005-11-26  0:05 [RFA] Run follow-fork tests on Linux Michael Snyder
@ 2005-11-26  3:58 ` Andreas Schwab
  2005-11-28  8:26   ` Michael Snyder
  2005-11-26  4:01 ` Mark Kettenis
  2005-11-26  4:03 ` Daniel Jacobowitz
  2 siblings, 1 reply; 7+ messages in thread
From: Andreas Schwab @ 2005-11-26  3:58 UTC (permalink / raw)
  To: Michael Snyder; +Cc: GDB Patches, Daniel Jacobowitz

Michael Snyder <msnyder@redhat.com> writes:

> --- 55,61 ----
>   # Until "set follow-fork-mode" and "catch vfork" are implemented on
>   # other targets...
>   #
> ! if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-pc-linux*"]} then {

Why only *-pc-linux*?

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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

* Re: [RFA] Run follow-fork tests on Linux
  2005-11-26  0:05 [RFA] Run follow-fork tests on Linux Michael Snyder
  2005-11-26  3:58 ` Andreas Schwab
@ 2005-11-26  4:01 ` Mark Kettenis
  2005-11-28 13:01   ` Michael Snyder
  2005-11-26  4:03 ` Daniel Jacobowitz
  2 siblings, 1 reply; 7+ messages in thread
From: Mark Kettenis @ 2005-11-26  4:01 UTC (permalink / raw)
  To: msnyder; +Cc: gdb-patches, drow

> Date: Fri, 25 Nov 2005 14:33:48 -0800
> From: Michael Snyder <msnyder@redhat.com>
> 
> This allows the tests "foll-fork" and "foll-vfork" to run on Linux,
> where they mostly pass.  A little more verbose output from linux-nat.c
> will fix the remaining failures.

I think Dan J. and I basically agreed that actually the verbose output
seen on HP-UX is undesirable.  So we should probably fix the testsuite
instead.  I think that makes the second chunck of the patch
unecessary.  Oh, and I really think you should check for *-*-linux*
instead of *-pc-linux*.

That said I'd like to see these tests enabled on *-*-openbsd3.9 and up
too.  Feel free to add those.  If you don't I'll consider it to be an
obvious patch once you've committed the Linux stuff.

Mark


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

* Re: [RFA] Run follow-fork tests on Linux
  2005-11-26  0:05 [RFA] Run follow-fork tests on Linux Michael Snyder
  2005-11-26  3:58 ` Andreas Schwab
  2005-11-26  4:01 ` Mark Kettenis
@ 2005-11-26  4:03 ` Daniel Jacobowitz
  2005-11-28 14:00   ` Michael Snyder
  2 siblings, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2005-11-26  4:03 UTC (permalink / raw)
  To: Michael Snyder; +Cc: GDB Patches

On Fri, Nov 25, 2005 at 02:33:48PM -0800, Michael Snyder wrote:
> This allows the tests "foll-fork" and "foll-vfork" to run on Linux,
> where they mostly pass.  A little more verbose output from linux-nat.c
> will fix the remaining failures.

What the others said, but...

> *************** proc vfork_parent_follow_to_bp {} {
> *** 109,115 ****
>      }
>      send_gdb "continue\n"
>      gdb_expect {
> !       -re ".*Detaching after fork from process.*Breakpoint.*18.*$gdb_prompt "\
>                         {pass "vfork parent follow, to bp"}
>         -re "$gdb_prompt $" {fail "vfork parent follow, to bp"}
>         timeout         {fail "(timeout) vfork parent follow, to bp" }
> --- 109,115 ----
>      }
>      send_gdb "continue\n"
>      gdb_expect {
> !       -re ".*Detaching after fork from.*Breakpoint.*18.*$gdb_prompt "\
>                         {pass "vfork parent follow, to bp"}
>         -re "$gdb_prompt $" {fail "vfork parent follow, to bp"}
>         timeout         {fail "(timeout) vfork parent follow, to bp" }

... you are testing this on something close to HEAD, right?  That
shouldn't be printed unless "set debug linux-nat 1".

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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

* Re: [RFA] Run follow-fork tests on Linux
  2005-11-26  3:58 ` Andreas Schwab
@ 2005-11-28  8:26   ` Michael Snyder
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Snyder @ 2005-11-28  8:26 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: GDB Patches, Daniel Jacobowitz

Andreas Schwab wrote:
> Michael Snyder <msnyder@redhat.com> writes:
> 
> 
>>--- 55,61 ----
>>  # Until "set follow-fork-mode" and "catch vfork" are implemented on
>>  # other targets...
>>  #
>>! if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-pc-linux*"]} then {
> 
> 
> Why only *-pc-linux*?

I meant it to be *-*-linux.  The only other target I know of
that can do follow-fork is openbsd, and I don't have one handy
to test it on.


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

* Re: [RFA] Run follow-fork tests on Linux
  2005-11-26  4:01 ` Mark Kettenis
@ 2005-11-28 13:01   ` Michael Snyder
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Snyder @ 2005-11-28 13:01 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb-patches, drow

Mark Kettenis wrote:
>>Date: Fri, 25 Nov 2005 14:33:48 -0800
>>From: Michael Snyder <msnyder@redhat.com>
>>
>>This allows the tests "foll-fork" and "foll-vfork" to run on Linux,
>>where they mostly pass.  A little more verbose output from linux-nat.c
>>will fix the remaining failures.
> 
> 
> I think Dan J. and I basically agreed that actually the verbose output
> seen on HP-UX is undesirable.  So we should probably fix the testsuite
> instead. 

I'm happy to go along with that.

 > I think that makes the second chunck of the patch
> unecessary. 

Oh well, it's harmless, and it makes the test strings
consistant.  If that doesn't convince you, it can go.

> Oh, and I really think you should check for *-*-linux*
> instead of *-pc-linux*.

Roger.  Habit, that's what I meant.

> That said I'd like to see these tests enabled on *-*-openbsd3.9 and up
> too.  Feel free to add those.  If you don't I'll consider it to be an
> obvious patch once you've committed the Linux stuff.

I'd rather let you, since I can't easily test it.

Michael


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

* Re: [RFA] Run follow-fork tests on Linux
  2005-11-26  4:03 ` Daniel Jacobowitz
@ 2005-11-28 14:00   ` Michael Snyder
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Snyder @ 2005-11-28 14:00 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: GDB Patches

Daniel Jacobowitz wrote:

> ... you are testing this on something close to HEAD, right?  That
> shouldn't be printed unless "set debug linux-nat 1".

Right.  In view of Mark's comment, which I assume you second,
that chunk can go.  But it could as well stay, too, since it's
harmless and makes the test strings more consistant with one
another.

I can go either way.


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

end of thread, other threads:[~2005-11-26  4:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-26  0:05 [RFA] Run follow-fork tests on Linux Michael Snyder
2005-11-26  3:58 ` Andreas Schwab
2005-11-28  8:26   ` Michael Snyder
2005-11-26  4:01 ` Mark Kettenis
2005-11-28 13:01   ` Michael Snyder
2005-11-26  4:03 ` Daniel Jacobowitz
2005-11-28 14:00   ` Michael Snyder

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