Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Simon Marchi <simon.marchi@ericsson.com>
Cc: Pedro Alves <palves@redhat.com>, gdb-patches@sourceware.org
Subject: [testsuite patch] Regression for foll-vfork.exp  [Re: [PATCH] Remove HP-UX reference in foll-vfork.exp]
Date: Fri, 08 Jan 2016 20:52:00 -0000	[thread overview]
Message-ID: <20160108205202.GB24397@host1.jankratochvil.net> (raw)
In-Reply-To: <567971F3.1070505@ericsson.com>

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

On Tue, 22 Dec 2015 16:53:23 +0100, Simon Marchi wrote:
> Thanks, pushed.

fe33faff35a8ee19db823149e764e3373e603bb9 is the first bad commit
commit fe33faff35a8ee19db823149e764e3373e603bb9
Author: Simon Marchi <simon.marchi@ericsson.com>
Date:   Tue Dec 22 10:52:31 2015 -0500
    Remove HP-UX reference in foll-vfork.exp

FAIL: gdb.base/foll-vfork.exp: exec: vfork parent follow, finish after tcatch vfork: continue to vfork
FAIL: gdb.base/foll-vfork.exp: exec: vfork child follow, finish after tcatch vfork: continue to vfork
FAIL: gdb.base/foll-vfork.exp: exit: vfork parent follow, finish after tcatch vfork: continue to vfork
FAIL: gdb.base/foll-vfork.exp: exit: vfork child follow, finish after tcatch vfork: continue to vfork

It happens for plain gdb.base/foll-vfork.exp runtest on Fedora 23 x86_64.

-Temporary catchpoint 2 (vforked process 24562), vfork () at ../sysdeps/unix/sysv/linux/x86_64/vfork.S:52^M
+Temporary catchpoint 2 (vforked process 25345), vfork () at ../sysdeps/unix/sysv/linux/x86_64/vfork.S:52^M
 52             pushq   %rdi^M
 Current language:  auto^M
 The current source language is "auto; currently asm".^M
-(gdb) PASS: gdb.base/foll-vfork.exp: exec: vfork parent follow, finish after tcatch vfork: continue to vfork
+(gdb) FAIL: gdb.base/foll-vfork.exp: exec: vfork parent follow, finish after tcatch vfork: continue to vfork

-Temporary catchpoint 2 (vforked process 24629), vfork () at ../sysdeps/unix/sysv/linux/x86_64/vfork.S:52^M
+Temporary catchpoint 2 (vforked process 25411), vfork () at ../sysdeps/unix/sysv/linux/x86_64/vfork.S:52^M
 52             pushq   %rdi^M
 Current language:  auto^M
 The current source language is "auto; currently asm".^M
-(gdb) PASS: gdb.base/foll-vfork.exp: exec: vfork child follow, finish after tcatch vfork: continue to vfork
+(gdb) FAIL: gdb.base/foll-vfork.exp: exec: vfork child follow, finish after tcatch vfork: continue to vfork


So I have reverted it and just simplified the comment, OK for check-in?

The third case is not necessary during testing but I have changed back all the
3 cases.


Jan

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

gdb/testsuite/ChangeLog
2016-01-08  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* gdb.base/foll-vfork.exp (tcatch_vfork_then_parent_follow)
	(tcatch_vfork_then_child_follow_exec)
	(tcatch_vfork_then_child_follow_exit): Revert back DWARF vfork
	identification.

diff --git a/gdb/testsuite/gdb.base/foll-vfork.exp b/gdb/testsuite/gdb.base/foll-vfork.exp
index efa1b39..ebbe4ad 100644
--- a/gdb/testsuite/gdb.base/foll-vfork.exp
+++ b/gdb/testsuite/gdb.base/foll-vfork.exp
@@ -222,8 +222,17 @@ proc tcatch_vfork_then_parent_follow {} {
    gdb_test_no_output "set follow-fork parent"
 
    gdb_test "tcatch vfork" "Catchpoint .*(vfork).*"
-   gdb_test "continue" "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*" \
-	"continue to vfork"
+
+   # It may stop in either "vfork" or "_vfork".
+   set test "continue to vfork"
+   gdb_test_multiple "continue" $test {
+      -re "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*$gdb_prompt " {
+	  pass $test
+      }
+      -re "vfork \\(\\) at.*$gdb_prompt " {
+	  pass $test
+      }
+   }
 
    set linenum [gdb_get_line_number "pid = vfork ();"]
    set test "finish"
@@ -254,8 +263,17 @@ proc tcatch_vfork_then_child_follow_exec {} {
    gdb_test_no_output "set follow-fork child"
 
    gdb_test "tcatch vfork" "Catchpoint .*(vfork).*"
-   gdb_test "continue" "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*" \
-	"continue to vfork"
+
+   # It may stop in either "vfork" or "_vfork".
+   set test "continue to vfork"
+   gdb_test_multiple "continue" $test {
+      -re "vfork \\(\\) at .*$gdb_prompt $" {
+	  pass $test
+      }
+      -re "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*$gdb_prompt " {
+	  pass $test
+      }
+   }
 
    set linenum1 [gdb_get_line_number "pid = vfork ();"]
    set linenum2 [gdb_get_line_number "printf(\"Hello from vforked-prog" ${srcfile2}]
@@ -290,8 +308,17 @@ proc tcatch_vfork_then_child_follow_exit {} {
    gdb_test_no_output "set follow-fork child"
 
    gdb_test "tcatch vfork" "Catchpoint .*(vfork).*"
-   gdb_test "continue" "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*" \
-	"continue to vfork"
+
+   # It may stop in either "vfork" or "_vfork".
+   set test "continue to vfork"
+   gdb_test_multiple "continue" $test {
+      -re "vfork \\(\\) at .*$gdb_prompt $" {
+	  pass $test
+      }
+      -re "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*$gdb_prompt " {
+	  pass $test
+      }
+   }
 
    set test "finish"
    gdb_test_multiple "finish" $test {

  reply	other threads:[~2016-01-08 20:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-21 20:10 [PATCH] Remove HP-UX reference in foll-vfork.exp Simon Marchi
2015-12-21 21:13 ` Pedro Alves
2015-12-22 15:53   ` Simon Marchi
2016-01-08 20:52     ` Jan Kratochvil [this message]
2016-01-08 21:04       ` [testsuite patch] Regression for foll-vfork.exp [Re: [PATCH] Remove HP-UX reference in foll-vfork.exp] Simon Marchi
2016-01-11 12:22       ` Pedro Alves
2016-01-11 21:23         ` [commit] " Jan Kratochvil

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=20160108205202.GB24397@host1.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=simon.marchi@ericsson.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