Update years in copyright notice for the GDB files.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.threads / killed.exp
index 3712508bb6c6f105c3b740e94e61e94deb6bbd60..2d307607a29d529c4b53e164fbc41a12795858e6 100644 (file)
@@ -1,18 +1,17 @@
-# Copyright 2002 Free Software Foundation, Inc.
+# Copyright 2002-2013 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
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Please email any bugs, comments, and/or additions to this file to:
 # bug-gdb@gnu.org
 # [7]+  Killed                  $D6/gdb/gdb -nw killed
 # $ 
 
-if $tracelevel then {
-       strace $tracelevel
-}
-
-set prms_id 0
-set bug_id 0
 
-set testfile "killed"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
 
-if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}/${subdir}"]] != "" } {
-    gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
+    return -1
 }
 
 
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
 
-gdb_test "run" "" "run program to completion"
+gdb_run_cmd
+gdb_expect {
+  -re "$gdb_prompt $" {
+    pass "run program to completion"
+  }
+  timeout {
+    fail "run program to completion (timeout)"
+  }
+}
 
 # Try to quit.
 send_gdb "quit\n"
 gdb_expect {
-    -re "The program is running.  Exit anyway\\? \\(y or n\\) $" {
+    -re "Quit anyway\\? \\(y or n\\) $" {
         send_gdb "y\n"
         exp_continue
     }
@@ -88,8 +85,7 @@ gdb_expect {
         pass "GDB exits after multi-threaded program exits messily"
     }
     -re "Cannot find thread ${decimal}: generic error\[\r\n\]*$gdb_prompt $" {
-        # setup_kfail "gdb/568"
-        fail "GDB exits after multi-threaded program exits messily (gdb/568)"
+        kfail "gdb/568" "GDB exits after multi-threaded program exits messily"
     }
     timeout {
         fail "GDB exits after multi-threaded program exits messily (timeout)"
This page took 0.024508 seconds and 4 git commands to generate.