-# Copyright 2005-2015 Free Software Foundation, Inc.
+# Copyright 2005-2017 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if { [is_remote target] || ![isnative] } then {
- continue
-}
-
# Until "set follow-fork-mode" and "catch fork" are implemented on
# other targets...
#
-if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-*-linux*"]} then {
+if { ![istarget "*-*-linux*"] } then {
continue
}
standard_testfile .c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested multi-forks.exp
+ untested "failed to compile"
return -1
}
# First set gdb to follow the child.
# The result should be that each of the 4 forks returns zero.
+clean_restart ${binfile}
runto_main
gdb_test_no_output "set follow-fork child"
continue_to_exit_bp_loc
# Now set gdb to follow the parent.
# Result should be that none of the 4 forks returns zero.
+clean_restart ${binfile}
runto_main
gdb_test_no_output "set follow-fork parent" ""
continue_to_exit_bp_loc
# Now test with detach-on-fork off.
#
-# detach-on-fork isn't implemented on hpux.
-#
-if {![istarget "*-*-linux*"]} then {
- continue
-}
-
# Start with a fresh gdb
clean_restart ${binfile}
#
for {set i 1} {$i <= 15} {incr i} {
- gdb_test "continue" "Breakpoint .* main .*exit.*" "Run to exit $i"
+ gdb_test "continue" "Breakpoint .* main .*exit.*" "run to exit $i"
gdb_test "info inferior" " 2 .* 3 .* 4 .* 5 .*" "info inferior $i"
gdb_test "inferior $i + 1" "(_dl_sysinfo_int80|fork|__kernel_(v|)syscall).*" \
"inferior $i"
}
-gdb_test "continue" "Breakpoint .* main .*exit.*" "Run to exit 16"
+gdb_test "continue" "Breakpoint .* main .*exit.*" "run to exit 16"
gdb_test "info inferior" " 2 .* 3 .* 4 .* 5 .*" "info inferior 16"
gdb_test "inferior 2" " main .*" "restart final"
#
# [assumes we're at #1]
-gdb_test "detach inferior 2" "Detaching .*" "Detach 2"
-gdb_test "detach inferior 3" "Detaching .*" "Detach 3"
-gdb_test "detach inferior 4" "Detaching .*" "Detach 4"
-gdb_test "detach inferior 5" "Detaching .*" "Detach 5"
+gdb_test "detach inferior 2" "Detaching .*" "detach 2"
+gdb_test "detach inferior 3" "Detaching .*" "detach 3"
+gdb_test "detach inferior 4" "Detaching .*" "detach 4"
+gdb_test "detach inferior 5" "Detaching .*" "detach 5"
#
# Test kill inferior
#
for {set i 6} { $i <= 16} {incr i} {
- gdb_test_no_output "kill inferior $i" "Kill $i"
- gdb_test "info inferior $i" "<null>.*" "Did kill $i"
+ gdb_test_no_output "kill inferior $i" "kill $i"
+ gdb_test "info inferior $i" "<null>.*" "did kill $i"
}
return 0