Copyright year update in most files of the GDB Project.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / checkpoint.exp
index c041e1335fddc30fd699b7f4a704a3076727fb6e..2aec4249aac07406e490c9aa01e0fb13137cf18b 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright 2005, 2007, 2008 Free Software Foundation, Inc.
+#   Copyright 2005, 2007-2012 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
@@ -28,8 +28,6 @@ if {![istarget "*-*-linux*"]} then {
     continue
 }
 
-set prms_id 0
-set bug_id 0
 
 set testfile "checkpoint"
 set srcfile ${testfile}.c
@@ -64,34 +62,34 @@ set break4_loc [gdb_get_line_number "breakpoint 4"]
 gdb_breakpoint $break1_loc
 gdb_test "continue" "breakpoint 1.*" "break1 start"
 
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
 gdb_test "continue 10" "breakpoint 1.*" "break1 two"
 
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
 gdb_test "continue 10" "breakpoint 1.*" "break1 three"
 
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
 gdb_test "continue 10" "breakpoint 1.*" "break1 four" 
 
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
 gdb_test "continue 10" "breakpoint 1.*" "break1 five"
 
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
 gdb_test "continue 10" "breakpoint 1.*" "break1 six"
 
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
 gdb_test "continue 10" "breakpoint 1.*" "break1 seven"
 
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
 gdb_test "continue 10" "breakpoint 1.*" "break1 eight"
 
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
 gdb_test "continue 10" "breakpoint 1.*" "break1 nine"
 
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
 gdb_test "continue 10" "breakpoint 1.*" "break1 ten"
 
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
 
 gdb_test "info checkpoints" \
     " 10 .* 9 .* 8 .* 7 .* 6 .* 5 .* 4 .* 3 .* 2 .* 1 .*" \
@@ -171,43 +169,43 @@ gdb_test "shell diff -s pi.txt copy1.txt" \
 gdb_breakpoint $break1_loc
 
 gdb_test "restart 1" "Switching to .*c == EOF.*" "restart 1 two"
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
 gdb_test "continue 100" "breakpoint 1.*" "breakpoint 1 1 one"
 gdb_test "step" "if .c == EOF.*" "step in 1 two"
 gdb_test "print lines" " = 102.*" "verify lines 1 two"
 
 gdb_test "restart 2" "Switching to .*c == EOF.*" "restart 2 two"
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
 gdb_test "continue 100" "breakpoint 1.*" "breakpoint 1 2 one"
 gdb_test "step" "if .c == EOF.*" "step in 2 two"
 gdb_test "print lines" " = 112.*" "verify lines 2 two"
 
 gdb_test "restart 3" "Switching to .*c == EOF.*" "restart 3 two"
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
 gdb_test "continue 500" "breakpoint 1.*" "breakpoint 1 3 one"
 gdb_test "step" "if .c == EOF.*" "step in 3 two"
 gdb_test "print lines" " = 522.*" "verify lines 3 two"
 
 gdb_test "restart 4" "Switching to .*c == EOF.*" "restart 4 two"
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
 gdb_test "continue 500" "breakpoint 1.*" "breakpoint 1 4 one"
 gdb_test "step" "if .c == EOF.*" "step in 4 two"
 gdb_test "print lines" " = 532.*" "verify lines 4 two"
 
 gdb_test "restart 5" "Switching to .*c == EOF.*" "restart 5 two"
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
 gdb_test "continue 1000" "breakpoint 1.*" "breakpoint 1 5 one"
 gdb_test "step" "if .c == EOF.*" "step in 5 two"
 gdb_test "print lines" " = 1042.*" "verify lines 5 two"
 
 gdb_test "restart 6" "Switching to .*c == EOF.*" "restart 6 two"
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
 gdb_test "continue 1000" "breakpoint 1.*" "breakpoint 1 6 one"
 gdb_test "step" "if .c == EOF.*" "step in 6 two"
 gdb_test "print lines" " = 1052.*" "verify lines 5 two"
 
 gdb_test "restart 7" "Switching to .*c == EOF.*" "restart 7 two"
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
 gdb_test "continue 1100" "breakpoint 1.*" "breakpoint 1 7 one"
 gdb_test "step" "if .c == EOF.*" "step in 7 two"
 gdb_test "print lines" " = 1162.*" "verify lines 7 two"
@@ -278,23 +276,23 @@ gdb_test "print ftell (out) > 100000" " = 1.*" "outfile still open 10"
 
 delete_breakpoints
 gdb_test "continue" \
-    "Deleting copy.*Program exited normally.*Switching to.*" \
+    "Deleting copy.*$inferior_exited_re normally.*Switching to.*" \
     "Exit, dropped into next fork one"
 
 gdb_test "continue" \
-    "Deleting copy.*Program exited normally.*Switching to.*" \
+    "Deleting copy.*$inferior_exited_re normally.*Switching to.*" \
     "Exit, dropped into next fork two"
 
 gdb_test "continue" \
-    "Deleting copy.*Program exited normally.*Switching to.*" \
+    "Deleting copy.*$inferior_exited_re normally.*Switching to.*" \
     "Exit, dropped into next fork three"
 
 gdb_test "continue" \
-    "Deleting copy.*Program exited normally.*Switching to.*" \
+    "Deleting copy.*$inferior_exited_re normally.*Switching to.*" \
     "Exit, dropped into next fork four"
 
 gdb_test "continue" \
-    "Deleting copy.*Program exited normally.*Switching to.*" \
+    "Deleting copy.*$inferior_exited_re normally.*Switching to.*" \
     "Exit, dropped into next fork five"
 
 #
@@ -328,7 +326,7 @@ gdb_test "restart 9" "Not found.*" "no more checkpoint 9"
 gdb_test "restart 10" "Not found.*" "no more checkpoint 10"
 
 #
-# Now let's try setting a large number of checkpoints (>1000)
+# Now let's try setting a large number of checkpoints (>600)
 #
 
 gdb_exit
@@ -339,18 +337,13 @@ gdb_load ${binfile}
 runto_main
 gdb_breakpoint $break1_loc
 
-send_gdb "commands\n"
-send_gdb "  silent\n"
-send_gdb "  if (lines % 2)\n"
-send_gdb "    checkpoint\n"
-send_gdb "  end\n"
-send_gdb "  continue\n"
-send_gdb "end\n"
-
-gdb_expect {
-    -re ".*$gdb_prompt $" { pass "set checkpoint breakpoint" }
-    timeout { fail "(timeout) set checkpoint breakpoint" }
-}
+gdb_test "commands\nsilent\nif (lines % 2)\ncheckpoint\nend\n  continue\nend" \
+    "" \
+    "set checkpoint breakpoint"
+
+set prev_timeout $timeout
+set timeout [expr $timeout + 120]
+verbose "Timeout now $timeout sec."
 
 gdb_breakpoint $break2_loc
 gdb_test "continue" "breakpoint 2.*" "break2 with many checkpoints"
@@ -375,9 +368,13 @@ gdb_test_multiple "info checkpoints" $msg {
 # OK, kill 'em all...
 #
 
-gdb_test "kill" "" "kill all one" \
+gdb_test "kill" "" "kill all one with many checkpoints" \
     "Kill the program being debugged.*y or n. $" "y"
 
+# Restore old timeout
+set timeout $prev_timeout
+verbose "Timeout now $timeout sec."
+
 #
 # Finished: cleanup
 #
This page took 0.027494 seconds and 4 git commands to generate.