+# Test stepping/nexting with different modes of scheduler locking.
+foreach schedlock {"off" "step" "on"} {
+ with_test_prefix "schedlock=$schedlock" {
+ with_test_prefix "cmd=step" {
+ test_step $schedlock "step" 0
+ }
+ with_test_prefix "cmd=next" {
+ # In GDB <= 7.9, with schedlock "step", "next" would
+ # unlock threads when stepping over a function call. This
+ # exercises "next" with and without a function call. WRT
+ # "schedlock step", "next" should behave just like "step".
+ foreach call_function {0 1} {
+ with_test_prefix "call_function=$call_function" {
+ test_step $schedlock "next" $call_function
+ }
+ }
+ }
+ }
+}