Revisión | 87a3a92c46c770e6aa2ca1209f46af16eae2c4e9 (tree) |
---|---|
Tiempo | 2015-12-15 08:02:59 |
Autor | Sandra Loosemore <sandra@code...> |
Commiter | Sandra Loosemore |
Skip tests that send ctrl-c to GDB if nointerrupts target property is set.
2015-12-14 Sandra Loosemore <sandra@codesourcery.com>
gdb/testsuite/
* gdb.base/completion.exp: Skip tests that interrupt GDB with
ctrl-C if nointerrupts target property is set.
* gdb.base/double-prompt-target-event-error.exp: Likewise.
* gdb.base/paginate-after-ctrl-c-running.exp: Likewise.
* gdb.base/paginate-bg-execution.exp: Likewise.
* gdb.base/paginate-execution-startup.exp: Likewise.
* gdb.base/random-signal.exp: Likewise.
* gdb.base/range-stepping.exp: Likewise.
* gdb.cp/annota2.exp: Likewise.
* gdb.cp/annota3.exp: Likewise.
* gdb.gdb/selftest.exp: Likewise.
* gdb.threads/continue-pending-status.exp: Likewise.
* gdb.threads/leader-exit.exp: Likewise.
* gdb.threads/manythreads.exp: Likewise.
* gdb.threads/pthreads.exp: Likewise.
* gdb.threads/schedlock.exp: Likewise.
* gdb.threads/sigthread.exp: Likewise.
@@ -1,3 +1,23 @@ | ||
1 | +2015-12-14 Sandra Loosemore <sandra@codesourcery.com> | |
2 | + | |
3 | + * gdb.base/completion.exp: Skip tests that interrupt GDB with | |
4 | + ctrl-C if nointerrupts target property is set. | |
5 | + * gdb.base/double-prompt-target-event-error.exp: Likewise. | |
6 | + * gdb.base/paginate-after-ctrl-c-running.exp: Likewise. | |
7 | + * gdb.base/paginate-bg-execution.exp: Likewise. | |
8 | + * gdb.base/paginate-execution-startup.exp: Likewise. | |
9 | + * gdb.base/random-signal.exp: Likewise. | |
10 | + * gdb.base/range-stepping.exp: Likewise. | |
11 | + * gdb.cp/annota2.exp: Likewise. | |
12 | + * gdb.cp/annota3.exp: Likewise. | |
13 | + * gdb.gdb/selftest.exp: Likewise. | |
14 | + * gdb.threads/continue-pending-status.exp: Likewise. | |
15 | + * gdb.threads/leader-exit.exp: Likewise. | |
16 | + * gdb.threads/manythreads.exp: Likewise. | |
17 | + * gdb.threads/pthreads.exp: Likewise. | |
18 | + * gdb.threads/schedlock.exp: Likewise. | |
19 | + * gdb.threads/sigthread.exp: Likewise. | |
20 | + | |
1 | 21 | 2015-12-11 Don Breazeal <donb@codesourcery.com> |
2 | 22 | |
3 | 23 | * gdb.base/execl-update-breakpoints.exp (main): Enable for target |
@@ -944,7 +944,7 @@ gdb_test_multiple "" "$test" { | ||
944 | 944 | |
945 | 945 | gdb_test_no_output "set max-completions unlimited" |
946 | 946 | |
947 | -if {![skip_tui_tests]} { | |
947 | +if {![skip_tui_tests] && ![target_info exists gdb,nointerrupts]} { | |
948 | 948 | set test "test completion of layout names" |
949 | 949 | send_gdb "layout\t\t\t" |
950 | 950 | gdb_test_multiple "" "$test" { |
@@ -960,7 +960,7 @@ if {![skip_tui_tests]} { | ||
960 | 960 | } |
961 | 961 | } |
962 | 962 | } |
963 | -if {![skip_tui_tests]} { | |
963 | +if {![skip_tui_tests] && ![target_info exists gdb,nointerrupts]} { | |
964 | 964 | with_test_prefix "focus command" { |
965 | 965 | set test "test completion" |
966 | 966 | send_gdb "focus \t\t" |
@@ -13,6 +13,11 @@ | ||
13 | 13 | # You should have received a copy of the GNU General Public License |
14 | 14 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 | |
16 | +if [target_info exists gdb,nointerrupts] { | |
17 | + verbose "Skipping double-prompt-target-event-error.exp because of nointerrupts." | |
18 | + return | |
19 | +} | |
20 | + | |
16 | 21 | standard_testfile |
17 | 22 | |
18 | 23 | if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug] == -1} { |
@@ -13,6 +13,11 @@ | ||
13 | 13 | # You should have received a copy of the GNU General Public License |
14 | 14 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 | |
16 | +if [target_info exists gdb,nointerrupts] { | |
17 | + verbose "Skipping paginate-after-ctrl-c-running.exp because of nointerrupts." | |
18 | + return | |
19 | +} | |
20 | + | |
16 | 21 | standard_testfile |
17 | 22 | |
18 | 23 | if {[build_executable "failed to prepare" $testfile $srcfile debug] == -1} { |
@@ -114,5 +114,7 @@ proc test_bg_execution_pagination_cancel { how } { | ||
114 | 114 | } |
115 | 115 | |
116 | 116 | test_bg_execution_pagination_return |
117 | -test_bg_execution_pagination_cancel "ctrl-c" | |
117 | +if ![target_info exists gdb,nointerrupts] { | |
118 | + test_bg_execution_pagination_cancel "ctrl-c" | |
119 | +} | |
118 | 120 | test_bg_execution_pagination_cancel "quit" |
@@ -174,7 +174,9 @@ proc test_fg_execution_pagination_cancel { how } { | ||
174 | 174 | |
175 | 175 | if {[probe_can_run_cmdline] > 0} { |
176 | 176 | test_fg_execution_pagination_return |
177 | - test_fg_execution_pagination_cancel "ctrl-c" | |
177 | + if ![target_info exists gdb,nointerrupts] { | |
178 | + test_fg_execution_pagination_cancel "ctrl-c" | |
179 | + } | |
178 | 180 | test_fg_execution_pagination_cancel "quit" |
179 | 181 | } |
180 | 182 |
@@ -18,6 +18,12 @@ if [target_info exists gdb,nosignals] { | ||
18 | 18 | continue |
19 | 19 | } |
20 | 20 | |
21 | +# This test requires sending ^C to interrupt the running target. | |
22 | +if [target_info exists gdb,nointerrupts] { | |
23 | + verbose "Skipping random-signal.exp because of nointerrupts." | |
24 | + return | |
25 | +} | |
26 | + | |
21 | 27 | standard_testfile |
22 | 28 | |
23 | 29 | if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} { |
@@ -172,42 +172,44 @@ with_test_prefix "loop 2" { | ||
172 | 172 | # Check that range stepping works well even when it is interrupted by |
173 | 173 | # ctrl-c. |
174 | 174 | |
175 | -with_test_prefix "interrupt" { | |
176 | - gdb_test_no_output "set debug remote 1" | |
177 | - | |
178 | - send_gdb "next\n" | |
179 | - sleep 1 | |
180 | - send_gdb "\003" | |
181 | - | |
182 | - # GDB should send one vCont;r and receive one stop reply for | |
183 | - # SIGINT: | |
184 | - # --> vCont;rSTART,END (range step) | |
185 | - # <-- T02 (SIGINT) | |
186 | - | |
187 | - set vcont_r_counter 0 | |
188 | - | |
189 | - set test "send ctrl-c to GDB" | |
190 | - gdb_test_multiple "" $test { | |
191 | - -re "vCont;r\[^\r\n\]*\.\.\." { | |
192 | - incr vcont_r_counter | |
193 | - exp_continue | |
175 | +if ![target_info exists gdb,nointerrupts] { | |
176 | + with_test_prefix "interrupt" { | |
177 | + gdb_test_no_output "set debug remote 1" | |
178 | + | |
179 | + send_gdb "next\n" | |
180 | + sleep 1 | |
181 | + send_gdb "\003" | |
182 | + | |
183 | + # GDB should send one vCont;r and receive one stop reply for | |
184 | + # SIGINT: | |
185 | + # --> vCont;rSTART,END (range step) | |
186 | + # <-- T02 (SIGINT) | |
187 | + | |
188 | + set vcont_r_counter 0 | |
189 | + | |
190 | + set test "send ctrl-c to GDB" | |
191 | + gdb_test_multiple "" $test { | |
192 | + -re "vCont;r\[^\r\n\]*\.\.\." { | |
193 | + incr vcont_r_counter | |
194 | + exp_continue | |
195 | + } | |
196 | + -re "Program received signal SIGINT.*$gdb_prompt $" { | |
197 | + pass $test | |
198 | + } | |
194 | 199 | } |
195 | - -re "Program received signal SIGINT.*$gdb_prompt $" { | |
196 | - pass $test | |
200 | + gdb_test_no_output "set debug remote 0" | |
201 | + | |
202 | + # Check the number of 'vCont;r' packets. | |
203 | + if { $vcont_r_counter == 1 } { | |
204 | + pass "${test}: 1 vCont;r" | |
205 | + } else { | |
206 | + fail "${test}: 1 vCont;r" | |
197 | 207 | } |
198 | - } | |
199 | - gdb_test_no_output "set debug remote 0" | |
200 | 208 | |
201 | - # Check the number of 'vCont;r' packets. | |
202 | - if { $vcont_r_counter == 1 } { | |
203 | - pass "${test}: 1 vCont;r" | |
204 | - } else { | |
205 | - fail "${test}: 1 vCont;r" | |
209 | + # Break the loop earlier and continue range stepping. | |
210 | + gdb_test "set variable c = 0" | |
211 | + exec_cmd_expect_vCont_count "next" 1 | |
206 | 212 | } |
207 | - | |
208 | - # Break the loop earlier and continue range stepping. | |
209 | - gdb_test "set variable c = 0" | |
210 | - exec_cmd_expect_vCont_count "next" 1 | |
211 | 213 | } |
212 | 214 | |
213 | 215 | # Check that range stepping doesn't break software watchpoints. With |
@@ -262,12 +262,14 @@ gdb_test_multiple "next" "watch triggered on a.x" { | ||
262 | 262 | # test: |
263 | 263 | # annotate-quit |
264 | 264 | # |
265 | -send_gdb "\003" | |
266 | -gdb_expect { | |
267 | - -re "\r\n\032\032error-begin\r\nQuit\r\n\r\n\032\032quit\r\n$gdb_prompt$" \ | |
265 | +if ![target_info exists gdb,nointerrupts] { | |
266 | + send_gdb "\003" | |
267 | + gdb_expect { | |
268 | + -re "\r\n\032\032error-begin\r\nQuit\r\n\r\n\032\032quit\r\n$gdb_prompt$" \ | |
268 | 269 | { pass "annotate-quit" } |
269 | - -re ".*$gdb_prompt$" { fail "annotate-quit" } | |
270 | - timeout { fail "annotate-quit (timeout)" } | |
270 | + -re ".*$gdb_prompt$" { fail "annotate-quit" } | |
271 | + timeout { fail "annotate-quit (timeout)" } | |
272 | + } | |
271 | 273 | } |
272 | 274 | |
273 | 275 | # |
@@ -177,11 +177,13 @@ gdb_test_multiple "next" "watch triggered on a.x" { | ||
177 | 177 | # test: |
178 | 178 | # annotate-quit |
179 | 179 | # |
180 | -send_gdb "\003" | |
181 | -gdb_expect_list "annotate-quit" "$gdb_prompt$" { | |
182 | - "\r\n\032\032error-begin\r\n" | |
183 | - "Quit\r\n" | |
184 | - "\r\n\032\032quit\r\n" | |
180 | +if ![target_info exists gdb,nointerrupts] { | |
181 | + send_gdb "\003" | |
182 | + gdb_expect_list "annotate-quit" "$gdb_prompt$" { | |
183 | + "\r\n\032\032error-begin\r\n" | |
184 | + "Quit\r\n" | |
185 | + "\r\n\032\032quit\r\n" | |
186 | + } | |
185 | 187 | } |
186 | 188 | |
187 | 189 | # |
@@ -433,17 +433,19 @@ proc test_with_self { executable } { | ||
433 | 433 | } |
434 | 434 | |
435 | 435 | # kill the xgdb process |
436 | - set description "send ^C to child process" | |
437 | - send_gdb "\003" | |
438 | - gdb_expect { | |
439 | - -re "Program received signal SIGINT.*$gdb_prompt $" { | |
440 | - pass "$description" | |
441 | - } | |
442 | - -re ".*$gdb_prompt $" { | |
443 | - fail "$description" | |
444 | - } | |
445 | - timeout { | |
446 | - fail "$description (timeout)" | |
436 | + if ![target_info exists gdb,nointerrupts] { | |
437 | + set description "send ^C to child process" | |
438 | + send_gdb "\003" | |
439 | + gdb_expect { | |
440 | + -re "Program received signal SIGINT.*$gdb_prompt $" { | |
441 | + pass "$description" | |
442 | + } | |
443 | + -re ".*$gdb_prompt $" { | |
444 | + fail "$description" | |
445 | + } | |
446 | + timeout { | |
447 | + fail "$description (timeout)" | |
448 | + } | |
447 | 449 | } |
448 | 450 | } |
449 | 451 |
@@ -17,6 +17,11 @@ | ||
17 | 17 | # thread, then switching to a thread that has a status pending and |
18 | 18 | # continuing. |
19 | 19 | |
20 | +if [target_info exists gdb,nointerrupts] { | |
21 | + verbose "Skipping continue-pending-status.exp because of nointerrupts." | |
22 | + return | |
23 | +} | |
24 | + | |
20 | 25 | standard_testfile |
21 | 26 | |
22 | 27 | if [prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] { |
@@ -13,6 +13,11 @@ | ||
13 | 13 | # You should have received a copy of the GNU General Public License |
14 | 14 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 | |
16 | +if [target_info exists gdb,nointerrupts] { | |
17 | + verbose "Skipping leader-exit.exp because of nointerrupts." | |
18 | + return | |
19 | +} | |
20 | + | |
16 | 21 | # Exit of the thread group leader should not break GDB. |
17 | 22 | |
18 | 23 | standard_testfile |
@@ -16,6 +16,11 @@ | ||
16 | 16 | |
17 | 17 | # This file was written by Jeff Johnston. (jjohnstn@redhat.com) |
18 | 18 | |
19 | +# This test requires sending ^C to interrupt the running target. | |
20 | +if [target_info exists gdb,nointerrupts] { | |
21 | + verbose "Skipping manythreads.exp because of nointerrupts." | |
22 | + return | |
23 | +} | |
19 | 24 | |
20 | 25 | standard_testfile |
21 | 26 |
@@ -15,6 +15,11 @@ | ||
15 | 15 | |
16 | 16 | # This file was written by Fred Fish. (fnf@cygnus.com) |
17 | 17 | |
18 | +# This test requires sending ^C to interrupt the running target. | |
19 | +if [target_info exists gdb,nointerrupts] { | |
20 | + verbose "Skipping pthreads.exp because of nointerrupts." | |
21 | + return | |
22 | +} | |
18 | 23 | |
19 | 24 | standard_testfile |
20 | 25 |
@@ -18,6 +18,12 @@ | ||
18 | 18 | # |
19 | 19 | # This test covers the various forms of "set scheduler-locking". |
20 | 20 | |
21 | +# This test requires sending ^C to interrupt the running target. | |
22 | + | |
23 | +if [target_info exists gdb,nointerrupts] { | |
24 | + verbose "Skipping schedlock.exp because of nointerrupts." | |
25 | + return | |
26 | +} | |
21 | 27 | |
22 | 28 | standard_testfile |
23 | 29 |
@@ -37,6 +37,12 @@ gdb_test_multiple "continue" "continue" { | ||
37 | 37 | } |
38 | 38 | } |
39 | 39 | |
40 | +# This test requires sending ^C to interrupt the running target. | |
41 | +if [target_info exists gdb,nointerrupts] { | |
42 | + verbose "Skipping sigthread.exp because of nointerrupts." | |
43 | + return | |
44 | +} | |
45 | + | |
40 | 46 | # For this to work we must be sure to consume the "Continuing." |
41 | 47 | # message first, or GDB's signal handler may not be in place. |
42 | 48 | after 500 {send_gdb "\003"} |