[FYI/pushed,v4,10/25] Remove gdb/19675 kfails (displaced stepping + clone)

Message ID 20231113150427.477431-11-pedro@palves.net
State New
Headers
Series Step over thread clone and thread exit |

Commit Message

Pedro Alves Nov. 13, 2023, 3:04 p.m. UTC
  Now that gdb/19675 is fixed for both native and gdbserver GNU/Linux,
remove the gdb/19675 kfails.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=19675
Reviewed-By: Andrew Burgess <aburgess@redhat.com>
Change-Id: I95c1c38ca370100675d303cd3c8995860bef465d
---
 gdb/testsuite/gdb.base/step-over-syscall.exp | 44 ++------------------
 1 file changed, 3 insertions(+), 41 deletions(-)
  

Patch

diff --git a/gdb/testsuite/gdb.base/step-over-syscall.exp b/gdb/testsuite/gdb.base/step-over-syscall.exp
index 1f1e62296c6..a03ed2d455c 100644
--- a/gdb/testsuite/gdb.base/step-over-syscall.exp
+++ b/gdb/testsuite/gdb.base/step-over-syscall.exp
@@ -42,46 +42,17 @@  if { [istarget "i\[34567\]86-*-linux*"] || [istarget "x86_64-*-linux*"] } {
 }
 
 proc_with_prefix check_pc_after_cross_syscall { displaced syscall syscall_insn_next_addr } {
-    global gdb_prompt
-
     set syscall_insn_next_addr_found [get_hexadecimal_valueof "\$pc" "0"]
 
     # After the 'stepi' we expect thread 1 to still be selected.
-    # However, when displaced stepping over a clone bug gdb/19675
-    # means this might not be the case.
-    #
-    # Which thread we end up in depends on a race between the original
-    # thread-1, and the new thread (created by the clone), so we can't
-    # guarantee which thread we will be in at this point.
-    #
-    # For the fork/vfork syscalls, which are correctly handled by
-    # displaced stepping we will always be in thread-1 or the original
-    # process at this point.
     set curr_thread "unknown"
-    gdb_test_multiple "info threads" "" {
-	-re "Id\\s+Target Id\\s+Frame\\s*\r\n" {
-	    exp_continue
-	}
-	-re "^\\* (\\d+)\\s+\[^\r\n\]+\r\n" {
+    gdb_test_multiple "thread" "" {
+	-re -wrap "Current thread is (\\d+) .*" {
 	    set curr_thread $expect_out(1,string)
-	    exp_continue
-	}
-	-re "^\\s+\\d+\\s+\[^\r\n\]+\r\n" {
-	    exp_continue
-	}
-	-re "$gdb_prompt " {
+	    pass $gdb_test_name
 	}
     }
 
-    # If we are displaced stepping over a clone, and we ended up in
-    # the wrong thread then the following check of the $pc value will
-    # fail.
-    if { $displaced == "on" && $syscall == "clone" && $curr_thread != 1 } {
-	# GDB doesn't support stepping over clone syscall with
-	# displaced stepping.
-	setup_kfail "*-*-*" "gdb/19675"
-    }
-
     gdb_assert {$syscall_insn_next_addr != 0 \
       && $syscall_insn_next_addr == $syscall_insn_next_addr_found \
       && $curr_thread == 1} \
@@ -299,15 +270,6 @@  proc step_over_syscall { syscall } {
 
 	    gdb_test "break marker" "Breakpoint.*at.* file .*${testfile}.c, line.*"
 
-	    # If we are displaced stepping over a clone syscall then
-	    # we expect the following check to fail.  See also the
-	    # code in check_pc_after_cross_syscall.
-	    if { $displaced == "on" && $syscall == "clone" } {
-		# GDB doesn't support stepping over clone syscall with
-		# displaced stepping.
-		setup_kfail "*-*-*" "gdb/19675"
-	    }
-
 	    gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, marker \\(\\) at.*" \
 		"continue to marker ($syscall)"
 	}