OLD | NEW |
1 # Copyright 2002-2003, 2005, 2007-2012 Free Software Foundation, Inc. | 1 # Copyright 2002-2003, 2005, 2007-2012 Free Software Foundation, Inc. |
2 | 2 |
3 # This program is free software; you can redistribute it and/or modify | 3 # This program is free software; you can redistribute it and/or modify |
4 # it under the terms of the GNU General Public License as published by | 4 # it under the terms of the GNU General Public License as published by |
5 # the Free Software Foundation; either version 3 of the License, or | 5 # the Free Software Foundation; either version 3 of the License, or |
6 # (at your option) any later version. | 6 # (at your option) any later version. |
7 # | 7 # |
8 # This program is distributed in the hope that it will be useful, | 8 # This program is distributed in the hope that it will be useful, |
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 # $ kill %7 | 47 # $ kill %7 |
48 # | 48 # |
49 # [7]+ Stopped $D6/gdb/gdb -nw killed | 49 # [7]+ Stopped $D6/gdb/gdb -nw killed |
50 # $ kill -9 %7 | 50 # $ kill -9 %7 |
51 # | 51 # |
52 # [7]+ Stopped $D6/gdb/gdb -nw killed | 52 # [7]+ Stopped $D6/gdb/gdb -nw killed |
53 # $ | 53 # $ |
54 # [7]+ Killed $D6/gdb/gdb -nw killed | 54 # [7]+ Killed $D6/gdb/gdb -nw killed |
55 # $ | 55 # $ |
56 | 56 |
57 if $tracelevel then { | |
58 strace $tracelevel | |
59 } | |
60 | 57 |
| 58 standard_testfile |
61 | 59 |
62 set testfile "killed" | 60 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
le debug] != "" } { |
63 set srcfile ${testfile}.c | |
64 set binfile ${objdir}/${subdir}/${testfile} | |
65 | |
66 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
le [list debug "incdir=${objdir}"]] != "" } { | |
67 return -1 | 61 return -1 |
68 } | 62 } |
69 | 63 |
70 | 64 |
71 gdb_start | 65 clean_restart ${binfile} |
72 gdb_reinitialize_dir $srcdir/$subdir | |
73 gdb_load ${binfile} | |
74 | 66 |
75 gdb_run_cmd | 67 gdb_run_cmd |
76 gdb_expect { | 68 gdb_expect { |
77 -re "$gdb_prompt $" { | 69 -re "$gdb_prompt $" { |
78 pass "run program to completion" | 70 pass "run program to completion" |
79 } | 71 } |
80 timeout { | 72 timeout { |
81 fail "run program to completion (timeout)" | 73 fail "run program to completion (timeout)" |
82 } | 74 } |
83 } | 75 } |
84 | 76 |
85 # Try to quit. | 77 # Try to quit. |
86 send_gdb "quit\n" | 78 send_gdb "quit\n" |
87 gdb_expect { | 79 gdb_expect { |
88 -re "Quit anyway\\? \\(y or n\\) $" { | 80 -re "Quit anyway\\? \\(y or n\\) $" { |
89 send_gdb "y\n" | 81 send_gdb "y\n" |
90 exp_continue | 82 exp_continue |
91 } | 83 } |
92 eof { | 84 eof { |
93 pass "GDB exits after multi-threaded program exits messily" | 85 pass "GDB exits after multi-threaded program exits messily" |
94 } | 86 } |
95 -re "Cannot find thread ${decimal}: generic error\[\r\n\]*$gdb_prompt $" { | 87 -re "Cannot find thread ${decimal}: generic error\[\r\n\]*$gdb_prompt $" { |
96 kfail "gdb/568" "GDB exits after multi-threaded program exits messily" | 88 kfail "gdb/568" "GDB exits after multi-threaded program exits messily" |
97 } | 89 } |
98 timeout { | 90 timeout { |
99 fail "GDB exits after multi-threaded program exits messily (timeout)" | 91 fail "GDB exits after multi-threaded program exits messily (timeout)" |
100 } | 92 } |
101 } | 93 } |
OLD | NEW |