aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.threads/thread-execl.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.threads/thread-execl.exp')
-rw-r--r--gdb/testsuite/gdb.threads/thread-execl.exp24
1 files changed, 21 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.threads/thread-execl.exp b/gdb/testsuite/gdb.threads/thread-execl.exp
index 4a8016c..a598ad0 100644
--- a/gdb/testsuite/gdb.threads/thread-execl.exp
+++ b/gdb/testsuite/gdb.threads/thread-execl.exp
@@ -34,9 +34,18 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
proc do_test { schedlock } {
global binfile
- with_test_prefix "schedlock $schedlock" {
+ if {$schedlock == "non-stop"} {
+ set prefix $schedlock
+ } else {
+ set prefix "schedlock $schedlock"
+ }
+ with_test_prefix "$prefix" {
clean_restart ${binfile}
+ if {$schedlock == "non-stop"} {
+ gdb_test_no_output "set non-stop 1"
+ }
+
if ![runto_main] {
return 0
}
@@ -45,16 +54,25 @@ proc do_test { schedlock } {
gdb_breakpoint "thread_execler"
gdb_test "continue" ".*thread_execler.*" "continue to thread start"
+ if {$schedlock == "non-stop"} {
+ gdb_test "thread 2" \
+ "Switching to .*thread_execler.*" \
+ "switch to event thread"
+ }
+
# Now set a breakpoint at `main', and step over the execl call. The
# breakpoint at main should be reached. GDB should not try to revert
# back to the old thread from the old image and resume stepping it
# (since it is gone).
gdb_breakpoint "main"
- gdb_test_no_output "set scheduler-locking $schedlock"
+
+ if {$schedlock != "non-stop"} {
+ gdb_test_no_output "set scheduler-locking $schedlock"
+ }
gdb_test "next" ".*main.*" "get to main in new image"
}
}
-foreach schedlock {"off" "step" "on"} {
+foreach schedlock {"off" "step" "on" "non-stop"} {
do_test $schedlock
}