set not_nl "\[^\r\n\]*"
- if {$detach_on_fork == "on" && $non_stop == "on" && $follow_fork == "child"} {
+ if {$detach_on_fork == "on" && $follow_fork == "child"} {
gdb_test "info threads" \
" 2.1 ${not_nl}\\\(running\\\).*No selected thread.*"
- } elseif {$detach_on_fork == "on" && $follow_fork == "child"} {
- gdb_test "info threads" \
- "\\\* 2.1 ${not_nl}\\\(running\\\)"
} elseif {$detach_on_fork == "on"} {
gdb_test "info threads" \
"\\\* 1 ${not_nl}\\\(running\\\)"
- } elseif {$non_stop == "on"
- || ($schedule_multiple == "on" && $follow_fork == "parent")} {
+ } elseif {$non_stop == "on" || $schedule_multiple == "on"} {
# Both parent and child should be marked running, and the
# parent should be selected.
gdb_test "info threads" \
[multi_line \
"\\\* 1.1 ${not_nl} \\\(running\\\)${not_nl}" \
" 2.1 ${not_nl} \\\(running\\\)"]
- } elseif {$schedule_multiple == "on" && $follow_fork == "child"} {
- # Both parent and child should be marked running, and the
- # child should be selected.
- gdb_test "info threads" \
- [multi_line \
- " 1.1 ${not_nl} \\\(running\\\)${not_nl}" \
- "\\\* 2.1 ${not_nl} \\\(running\\\)"]
} else {
set test "only $follow_fork marked running"
gdb_test_multiple "info threads" $test {
-re "\\\* 1.1 ${not_nl}\\\(running\\\)\r\n 2.1 ${not_nl}\r\n$gdb_prompt $" {
gdb_assert [string eq $follow_fork "parent"] $test
}
- -re "1.1 ${not_nl}\r\n\\\* 2.1 ${not_nl}\\\(running\\\)\r\n$gdb_prompt $" {
+ -re "\\\* 1.1 ${not_nl}\r\n 2.1 ${not_nl}\\\(running\\\)\r\n$gdb_prompt $" {
gdb_assert [string eq $follow_fork "child"] $test
}
}