Commit | Line | Data |
---|---|---|
61baf725 | 1 | # Copyright (C) 2010-2017 Free Software Foundation, Inc. |
0935723e JK |
2 | |
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 | |
5 | # the Free Software Foundation; either version 3 of the License, or | |
6 | # (at your option) any later version. | |
7 | # | |
8 | # This program is distributed in the hope that it will be useful, | |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. | |
12 | # | |
13 | # You should have received a copy of the GNU General Public License | |
14 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
15 | ||
0935723e JK |
16 | if {[is_remote target]} { |
17 | # RuntimeError: Could not find event thread | |
18 | kfail "python/12966" "Signal Thread 3" | |
19 | return -1 | |
20 | } | |
21 | ||
22 | load_lib gdb-python.exp | |
23 | ||
b4a58790 | 24 | standard_testfile py-evthreads.c |
0935723e JK |
25 | set pyfile ${srcdir}/${subdir}/py-events.py |
26 | ||
27 | if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { | |
28 | return -1 | |
29 | } | |
30 | clean_restart $testfile | |
31 | ||
32 | if { [skip_python_tests] } { continue } | |
33 | ||
9325cb04 | 34 | gdb_test_no_output "python exec (open ('${pyfile}').read ())" "" |
0935723e | 35 | |
314bb8c3 | 36 | gdb_test "test-events" "Event testers registered." |
0935723e | 37 | gdb_test_no_output "set non-stop on" |
0935723e JK |
38 | |
39 | gdb_run_cmd | |
de97fdd4 | 40 | gdb_test_multiple "" "signal Thread 3" { |
5068630a | 41 | -re "event type: stop\r\nstop reason: signal\r\nstop signal: SIGUSR1\r\nthread num: 3\r\nevent type: stop\r\n.*$gdb_prompt $" { |
0935723e JK |
42 | pass "thread 3 was signaled" |
43 | } | |
44 | -re "The target does not support running in non-stop mode" { | |
45 | unsupported "non-stop mode is unsupported" | |
46 | } | |
47 | } |