diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2016-01-11 22:20:16 +0100 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2016-01-11 22:20:16 +0100 |
commit | 9a70630256e21a7b86344d555dbe39407e998f91 (patch) | |
tree | f0a42981426d428e27ce3f7ba5f8e6e0c78b0268 | |
parent | c0ecb95f3dc0c3e8d1545f0a37c0c3e537e1ea96 (diff) | |
download | gdb-9a70630256e21a7b86344d555dbe39407e998f91.zip gdb-9a70630256e21a7b86344d555dbe39407e998f91.tar.gz gdb-9a70630256e21a7b86344d555dbe39407e998f91.tar.bz2 |
testsuite: Regression for foll-vfork.exp
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.
The third case is not necessary during testing but I have changed back all the
3 cases.
Pedro Alves:
I know it was that way before, but would you mind moving this to a helper
proc.
gdb/testsuite/ChangeLog
2016-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
Pedro Alves <palves@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.
-rw-r--r-- | gdb/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/foll-vfork.exp | 27 |
2 files changed, 29 insertions, 6 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index a0eba33..8b0425b 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,4 +1,12 @@ 2016-01-11 Jan Kratochvil <jan.kratochvil@redhat.com> + Pedro Alves <palves@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. + +2016-01-11 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.guile/scm-value.exp (test_value_in_inferior): Set print elements and repeats to unlimited. diff --git a/gdb/testsuite/gdb.base/foll-vfork.exp b/gdb/testsuite/gdb.base/foll-vfork.exp index ed25487..173a7c3 100644 --- a/gdb/testsuite/gdb.base/foll-vfork.exp +++ b/gdb/testsuite/gdb.base/foll-vfork.exp @@ -212,6 +212,21 @@ proc vfork_and_exec_child_follow_through_step {} { exec sleep 1 }} +proc continue_to_vfork {} { + global gdb_prompt + + # A vfork catchpoint 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 + } + } +} + proc tcatch_vfork_then_parent_follow {} { with_test_prefix "vfork parent follow, finish after tcatch vfork" { global gdb_prompt @@ -222,8 +237,8 @@ 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" + + continue_to_vfork set linenum [gdb_get_line_number "pid = vfork ();"] set test "finish" @@ -254,8 +269,8 @@ 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" + + continue_to_vfork set linenum1 [gdb_get_line_number "pid = vfork ();"] set linenum2 [gdb_get_line_number "printf(\"Hello from vforked-prog" ${srcfile2}] @@ -290,8 +305,8 @@ 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" + + continue_to_vfork set test "finish" gdb_test_multiple "finish" $test { |