Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Fix spurious failures in foll-{v,}fork.exp
@ 2008-11-20 23:39 Andreas Schwab
  2008-11-21  1:34 ` Andreas Schwab
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2008-11-20 23:39 UTC (permalink / raw)
  To: gdb-patches

The patterns in foll-fork.exp and foll-vfork.exp don't match reality on
ia64.

Andreas.

2008-11-20  Andreas Schwab  <schwab@suse.de>

	* gdb.base/foll-fork.exp (catch_fork_child_follow): Fix patterns
	matching syscall entry point.
	* gdb.base/foll-vfork.exp (tcatch_vfork_then_parent_follow)
	(tcatch_vfork_then_child_follow): Likewise.

Index: gdb.base/foll-fork.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/foll-fork.exp,v
retrieving revision 1.11
diff -u -a -p -u -p -a -r1.11 foll-fork.exp
--- gdb.base/foll-fork.exp	16 Oct 2008 16:25:36 -0000	1.11
+++ gdb.base/foll-fork.exp	20 Nov 2008 14:24:45 -0000
@@ -167,7 +167,7 @@ proc catch_fork_child_follow {} {
 
    send_gdb "continue\n"
    gdb_expect {
-      -re "Catchpoint.*(forked process.*),.*in .*(fork|__kernel_vsyscall).*$gdb_prompt $"\
+      -re "Catchpoint.*(forked process.*),.*in .*(fork|__kernel_v?syscall).*$gdb_prompt $"\
                       {pass "explicit child follow, catch fork"}
       -re "$gdb_prompt $" {fail "explicit child follow, catch fork"}
       timeout         {fail "(timeout) explicit child follow, catch fork"}
@@ -239,7 +239,7 @@ proc tcatch_fork_parent_follow {} {
 
    send_gdb "continue\n"
    gdb_expect {
-      -re ".*in .*(fork|__kernel_vsyscall).*$gdb_prompt $"\
+      -re ".*in .*(fork|__kernel_v?syscall).*$gdb_prompt $"\
                       {pass "explicit parent follow, tcatch fork"}
       -re "$gdb_prompt $" {fail "explicit parent follow, tcatch fork"}
       timeout         {fail "(timeout) explicit parent follow, tcatch fork"}
Index: gdb.base/foll-vfork.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/foll-vfork.exp,v
retrieving revision 1.8
diff -u -a -p -u -p -a -r1.8 foll-vfork.exp
--- gdb.base/foll-vfork.exp	29 Jan 2008 22:47:20 -0000	1.8
+++ gdb.base/foll-vfork.exp	20 Nov 2008 14:24:45 -0000
@@ -264,7 +264,7 @@ proc tcatch_vfork_then_parent_follow {} 
 # HP-UX 10.20 seems to stop you in "vfork", while more recent HP-UXs
 # stop you in "_vfork".
    gdb_expect {
-      -re "0x\[0-9a-fA-F\]*.*vfork.*$gdb_prompt "\
+      -re "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*$gdb_prompt "\
                       {pass "vfork parent follow, tcatch vfork"}
       -re "vfork \\(\\) at.*$gdb_prompt "\
                       {pass "vfork parent follow, tcatch vfork"}
@@ -275,6 +275,8 @@ proc tcatch_vfork_then_parent_follow {} 
    gdb_expect {
       -re "Run till exit from.*vfork.*0x\[0-9a-fA-F\]* in main .* at .*${srcfile}:12.*$gdb_prompt "\
                       {pass "vfork parent follow, finish after tcatch vfork"}
+      -re "Run till exit from.*__kernel_v?syscall.*0x\[0-9a-fA-F\]* in vfork .*$gdb_prompt "\
+                      {pass "vfork parent follow, finish after tcatch vfork"}
       -re "$gdb_prompt $" {fail "vfork parent follow, finish after tcatch vfork"}
       timeout         {fail "(timeout) vfork parent follow, finish after tcatch vfork" }
    }
@@ -308,9 +310,7 @@ proc tcatch_vfork_then_child_follow {} {
    gdb_expect {
       -re "vfork \\(\\) at .*$gdb_prompt $"\
                       {pass "vfork child follow, tcatch vfork"}
-      -re "0x\[0-9a-fA-F\]*.*vfork.*$gdb_prompt "\
-                      {pass "vfork child follow, tcatch vfork"}
-      -re "0x\[0-9a-fA-F\]*.*_vfork.*$gdb_prompt "\
+      -re "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*$gdb_prompt "\
                       {pass "vfork child follow, tcatch vfork"}
       -re "$gdb_prompt $" {fail "vfork child follow, tcatch vfork"}
       timeout         {fail "(timeout) vfork child follow, tcatch vfork"}
@@ -319,6 +319,8 @@ proc tcatch_vfork_then_child_follow {} {
    gdb_expect {
       -re "Run till exit from.*vfork.*${srcfile}:12.*$gdb_prompt "\
                       {pass "vfork child follow, finish after tcatch vfork"}
+      -re "Run till exit from.*__kernel_v?syscall.*0x\[0-9a-fA-F\]* in vfork .*$gdb_prompt "\
+                      {pass "vfork child follow, finish after tcatch vfork"}
       -re "Run till exit from.*vfork.*${srcfile2}:9.*$gdb_prompt "\
                       {pass "vfork child follow, finish after tcatch vfork (followed exec)"}
       -re "$gdb_prompt $" {fail "vfork child follow, finish after tcatch vfork"}

-- 
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] 3+ messages in thread

* Re: Fix spurious failures in foll-{v,}fork.exp
  2008-11-20 23:39 Fix spurious failures in foll-{v,}fork.exp Andreas Schwab
@ 2008-11-21  1:34 ` Andreas Schwab
  2008-11-21 11:30   ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2008-11-21  1:34 UTC (permalink / raw)
  To: gdb-patches

Here is an updated patch.

Andreas.

2008-11-20  Andreas Schwab  <schwab@suse.de>

	* gdb.base/foll-fork.exp (catch_fork_child_follow): Fix patterns
	matching syscall entry point.
	* gdb.base/foll-vfork.exp (tcatch_vfork_then_parent_follow)
	(tcatch_vfork_then_child_follow): Likewise.  Finish through
	vfork even if we stopped at the syscall trampoline.

Index: gdb/testsuite/gdb.base/foll-fork.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/foll-fork.exp,v
retrieving revision 1.11
diff -u -a -p -u -p -a -r1.11 foll-fork.exp
--- gdb/testsuite/gdb.base/foll-fork.exp	16 Oct 2008 16:25:36 -0000	1.11
+++ gdb/testsuite/gdb.base/foll-fork.exp	20 Nov 2008 14:24:45 -0000
@@ -167,7 +167,7 @@ proc catch_fork_child_follow {} {
 
    send_gdb "continue\n"
    gdb_expect {
-      -re "Catchpoint.*(forked process.*),.*in .*(fork|__kernel_vsyscall).*$gdb_prompt $"\
+      -re "Catchpoint.*(forked process.*),.*in .*(fork|__kernel_v?syscall).*$gdb_prompt $"\
                       {pass "explicit child follow, catch fork"}
       -re "$gdb_prompt $" {fail "explicit child follow, catch fork"}
       timeout         {fail "(timeout) explicit child follow, catch fork"}
@@ -239,7 +239,7 @@ proc tcatch_fork_parent_follow {} {
 
    send_gdb "continue\n"
    gdb_expect {
-      -re ".*in .*(fork|__kernel_vsyscall).*$gdb_prompt $"\
+      -re ".*in .*(fork|__kernel_v?syscall).*$gdb_prompt $"\
                       {pass "explicit parent follow, tcatch fork"}
       -re "$gdb_prompt $" {fail "explicit parent follow, tcatch fork"}
       timeout         {fail "(timeout) explicit parent follow, tcatch fork"}
Index: gdb/testsuite/gdb.base/foll-vfork.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/foll-vfork.exp,v
retrieving revision 1.8
diff -u -a -p -u -p -a -r1.8 foll-vfork.exp
--- gdb/testsuite/gdb.base/foll-vfork.exp	29 Jan 2008 22:47:20 -0000	1.8
+++ gdb/testsuite/gdb.base/foll-vfork.exp	20 Nov 2008 14:24:45 -0000
@@ -264,7 +264,7 @@ proc tcatch_vfork_then_parent_follow {}
 # HP-UX 10.20 seems to stop you in "vfork", while more recent HP-UXs
 # stop you in "_vfork".
    gdb_expect {
-      -re "0x\[0-9a-fA-F\]*.*vfork.*$gdb_prompt "\
+      -re "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*$gdb_prompt "\
                       {pass "vfork parent follow, tcatch vfork"}
       -re "vfork \\(\\) at.*$gdb_prompt "\
                       {pass "vfork parent follow, tcatch vfork"}
@@ -275,6 +275,10 @@ proc tcatch_vfork_then_parent_follow {}
    gdb_expect {
       -re "Run till exit from.*vfork.*0x\[0-9a-fA-F\]* in main .* at .*${srcfile}:12.*$gdb_prompt "\
                       {pass "vfork parent follow, finish after tcatch vfork"}
+      -re "Run till exit from.*__kernel_v?syscall.*0x\[0-9a-fA-F\]* in vfork .*$gdb_prompt " {
+	  send_gdb "finish\n"
+	  exp_continue
+      }
       -re "$gdb_prompt $" {fail "vfork parent follow, finish after tcatch vfork"}
       timeout         {fail "(timeout) vfork parent follow, finish after tcatch vfork" }
    }
@@ -308,9 +312,7 @@ proc tcatch_vfork_then_child_follow {} {
    gdb_expect {
       -re "vfork \\(\\) at .*$gdb_prompt $"\
                       {pass "vfork child follow, tcatch vfork"}
-      -re "0x\[0-9a-fA-F\]*.*vfork.*$gdb_prompt "\
-                      {pass "vfork child follow, tcatch vfork"}
-      -re "0x\[0-9a-fA-F\]*.*_vfork.*$gdb_prompt "\
+      -re "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*$gdb_prompt "\
                       {pass "vfork child follow, tcatch vfork"}
       -re "$gdb_prompt $" {fail "vfork child follow, tcatch vfork"}
       timeout         {fail "(timeout) vfork child follow, tcatch vfork"}
@@ -319,6 +321,10 @@ proc tcatch_vfork_then_child_follow {} {
    gdb_expect {
       -re "Run till exit from.*vfork.*${srcfile}:12.*$gdb_prompt "\
                       {pass "vfork child follow, finish after tcatch vfork"}
+      -re "Run till exit from.*__kernel_v?syscall.*0x\[0-9a-fA-F\]* in vfork .*$gdb_prompt " {
+	  send_gdb "finish\n"
+	  exp_continue
+      }
       -re "Run till exit from.*vfork.*${srcfile2}:9.*$gdb_prompt "\
                       {pass "vfork child follow, finish after tcatch vfork (followed exec)"}
       -re "$gdb_prompt $" {fail "vfork child follow, finish after tcatch vfork"}

-- 
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] 3+ messages in thread

* Re: Fix spurious failures in foll-{v,}fork.exp
  2008-11-21  1:34 ` Andreas Schwab
@ 2008-11-21 11:30   ` Daniel Jacobowitz
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2008-11-21 11:30 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: gdb-patches

On Thu, Nov 20, 2008 at 04:02:13PM +0100, Andreas Schwab wrote:
> Here is an updated patch.
> 
> Andreas.
> 
> 2008-11-20  Andreas Schwab  <schwab@suse.de>
> 
> 	* gdb.base/foll-fork.exp (catch_fork_child_follow): Fix patterns
> 	matching syscall entry point.
> 	* gdb.base/foll-vfork.exp (tcatch_vfork_then_parent_follow)
> 	(tcatch_vfork_then_child_follow): Likewise.  Finish through
> 	vfork even if we stopped at the syscall trampoline.

Thanks, this is fine.

-- 
Daniel Jacobowitz
CodeSourcery


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

end of thread, other threads:[~2008-11-20 17:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-20 23:39 Fix spurious failures in foll-{v,}fork.exp Andreas Schwab
2008-11-21  1:34 ` Andreas Schwab
2008-11-21 11:30   ` Daniel Jacobowitz

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