OLD | NEW |
1 # Copyright (C) 1996-1997, 2002-2003, 2007-2012 Free Software | 1 # Copyright (C) 1996-1997, 2002-2003, 2007-2012 Free Software |
2 # Foundation, Inc. | 2 # Foundation, Inc. |
3 | 3 |
4 # This program is free software; you can redistribute it and/or modify | 4 # This program is free software; you can redistribute it and/or modify |
5 # it under the terms of the GNU General Public License as published by | 5 # it under the terms of the GNU General Public License as published by |
6 # the Free Software Foundation; either version 3 of the License, or | 6 # the Free Software Foundation; either version 3 of the License, or |
7 # (at your option) any later version. | 7 # (at your option) any later version. |
8 # | 8 # |
9 # This program is distributed in the hope that it will be useful, | 9 # This program is distributed in the hope that it will be useful, |
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 # GNU General Public License for more details. | 12 # GNU General Public License for more details. |
13 # | 13 # |
14 # You should have received a copy of the GNU General Public License | 14 # You should have received a copy of the GNU General Public License |
15 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 |
17 # This file was written by Daniel Jacobowitz <drow@mvista.com> | 17 # This file was written by Daniel Jacobowitz <drow@mvista.com> |
18 # (parts based on pthreads.exp by Fred Fish (fnf@cygnus.com). | 18 # (parts based on pthreads.exp by Fred Fish (fnf@cygnus.com). |
19 # | 19 # |
20 # This test covers the various forms of "set scheduler-locking". | 20 # This test covers the various forms of "set scheduler-locking". |
21 | 21 |
22 if $tracelevel then { | |
23 strace $tracelevel | |
24 } | |
25 | 22 |
26 | 23 standard_testfile |
27 set testfile "schedlock" | |
28 set srcfile ${testfile}.c | |
29 set binfile ${objdir}/${subdir}/${testfile} | |
30 | 24 |
31 # The number of threads, including the main thread. | 25 # The number of threads, including the main thread. |
32 set NUM 2 | 26 set NUM 2 |
33 | 27 |
34 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
le [list debug "incdir=${objdir}"]] != "" } { | 28 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
le debug] != "" } { |
35 return -1 | 29 return -1 |
36 } | 30 } |
37 | 31 |
38 # Now we can proceed with the real testing. | 32 # Now we can proceed with the real testing. |
39 | 33 |
40 proc get_args { } { | 34 proc get_args { } { |
41 global list_count | 35 global list_count |
42 global gdb_prompt | 36 global gdb_prompt |
43 global NUM | 37 global NUM |
44 | 38 |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 } | 300 } |
307 } | 301 } |
308 } | 302 } |
309 if {$num_other_threads > 0} { | 303 if {$num_other_threads > 0} { |
310 fail "other threads didn't run - step locked" | 304 fail "other threads didn't run - step locked" |
311 } else { | 305 } else { |
312 pass "other threads didn't run - step locked" | 306 pass "other threads didn't run - step locked" |
313 } | 307 } |
314 | 308 |
315 return 0 | 309 return 0 |
OLD | NEW |