• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisión87a3a92c46c770e6aa2ca1209f46af16eae2c4e9 (tree)
Tiempo2015-12-15 08:02:59
AutorSandra Loosemore <sandra@code...>
CommiterSandra Loosemore

Log Message

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.

Cambiar Resumen

Diferencia incremental

--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -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+
121 2015-12-11 Don Breazeal <donb@codesourcery.com>
222
323 * gdb.base/execl-update-breakpoints.exp (main): Enable for target
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -944,7 +944,7 @@ gdb_test_multiple "" "$test" {
944944
945945 gdb_test_no_output "set max-completions unlimited"
946946
947-if {![skip_tui_tests]} {
947+if {![skip_tui_tests] && ![target_info exists gdb,nointerrupts]} {
948948 set test "test completion of layout names"
949949 send_gdb "layout\t\t\t"
950950 gdb_test_multiple "" "$test" {
@@ -960,7 +960,7 @@ if {![skip_tui_tests]} {
960960 }
961961 }
962962 }
963-if {![skip_tui_tests]} {
963+if {![skip_tui_tests] && ![target_info exists gdb,nointerrupts]} {
964964 with_test_prefix "focus command" {
965965 set test "test completion"
966966 send_gdb "focus \t\t"
--- a/gdb/testsuite/gdb.base/double-prompt-target-event-error.exp
+++ b/gdb/testsuite/gdb.base/double-prompt-target-event-error.exp
@@ -13,6 +13,11 @@
1313 # You should have received a copy of the GNU General Public License
1414 # along with this program. If not, see <http://www.gnu.org/licenses/>.
1515
16+if [target_info exists gdb,nointerrupts] {
17+ verbose "Skipping double-prompt-target-event-error.exp because of nointerrupts."
18+ return
19+}
20+
1621 standard_testfile
1722
1823 if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug] == -1} {
--- a/gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp
+++ b/gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp
@@ -13,6 +13,11 @@
1313 # You should have received a copy of the GNU General Public License
1414 # along with this program. If not, see <http://www.gnu.org/licenses/>.
1515
16+if [target_info exists gdb,nointerrupts] {
17+ verbose "Skipping paginate-after-ctrl-c-running.exp because of nointerrupts."
18+ return
19+}
20+
1621 standard_testfile
1722
1823 if {[build_executable "failed to prepare" $testfile $srcfile debug] == -1} {
--- a/gdb/testsuite/gdb.base/paginate-bg-execution.exp
+++ b/gdb/testsuite/gdb.base/paginate-bg-execution.exp
@@ -114,5 +114,7 @@ proc test_bg_execution_pagination_cancel { how } {
114114 }
115115
116116 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+}
118120 test_bg_execution_pagination_cancel "quit"
--- a/gdb/testsuite/gdb.base/paginate-execution-startup.exp
+++ b/gdb/testsuite/gdb.base/paginate-execution-startup.exp
@@ -174,7 +174,9 @@ proc test_fg_execution_pagination_cancel { how } {
174174
175175 if {[probe_can_run_cmdline] > 0} {
176176 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+ }
178180 test_fg_execution_pagination_cancel "quit"
179181 }
180182
--- a/gdb/testsuite/gdb.base/random-signal.exp
+++ b/gdb/testsuite/gdb.base/random-signal.exp
@@ -18,6 +18,12 @@ if [target_info exists gdb,nosignals] {
1818 continue
1919 }
2020
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+
2127 standard_testfile
2228
2329 if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
--- a/gdb/testsuite/gdb.base/range-stepping.exp
+++ b/gdb/testsuite/gdb.base/range-stepping.exp
@@ -172,42 +172,44 @@ with_test_prefix "loop 2" {
172172 # Check that range stepping works well even when it is interrupted by
173173 # ctrl-c.
174174
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+ }
194199 }
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"
197207 }
198- }
199- gdb_test_no_output "set debug remote 0"
200208
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
206212 }
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
211213 }
212214
213215 # Check that range stepping doesn't break software watchpoints. With
--- a/gdb/testsuite/gdb.cp/annota2.exp
+++ b/gdb/testsuite/gdb.cp/annota2.exp
@@ -262,12 +262,14 @@ gdb_test_multiple "next" "watch triggered on a.x" {
262262 # test:
263263 # annotate-quit
264264 #
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$" \
268269 { 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+ }
271273 }
272274
273275 #
--- a/gdb/testsuite/gdb.cp/annota3.exp
+++ b/gdb/testsuite/gdb.cp/annota3.exp
@@ -177,11 +177,13 @@ gdb_test_multiple "next" "watch triggered on a.x" {
177177 # test:
178178 # annotate-quit
179179 #
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+ }
185187 }
186188
187189 #
--- a/gdb/testsuite/gdb.gdb/selftest.exp
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
@@ -433,17 +433,19 @@ proc test_with_self { executable } {
433433 }
434434
435435 # 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+ }
447449 }
448450 }
449451
--- a/gdb/testsuite/gdb.threads/continue-pending-status.exp
+++ b/gdb/testsuite/gdb.threads/continue-pending-status.exp
@@ -17,6 +17,11 @@
1717 # thread, then switching to a thread that has a status pending and
1818 # continuing.
1919
20+if [target_info exists gdb,nointerrupts] {
21+ verbose "Skipping continue-pending-status.exp because of nointerrupts."
22+ return
23+}
24+
2025 standard_testfile
2126
2227 if [prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] {
--- a/gdb/testsuite/gdb.threads/leader-exit.exp
+++ b/gdb/testsuite/gdb.threads/leader-exit.exp
@@ -13,6 +13,11 @@
1313 # You should have received a copy of the GNU General Public License
1414 # along with this program. If not, see <http://www.gnu.org/licenses/>.
1515
16+if [target_info exists gdb,nointerrupts] {
17+ verbose "Skipping leader-exit.exp because of nointerrupts."
18+ return
19+}
20+
1621 # Exit of the thread group leader should not break GDB.
1722
1823 standard_testfile
--- a/gdb/testsuite/gdb.threads/manythreads.exp
+++ b/gdb/testsuite/gdb.threads/manythreads.exp
@@ -16,6 +16,11 @@
1616
1717 # This file was written by Jeff Johnston. (jjohnstn@redhat.com)
1818
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+}
1924
2025 standard_testfile
2126
--- a/gdb/testsuite/gdb.threads/pthreads.exp
+++ b/gdb/testsuite/gdb.threads/pthreads.exp
@@ -15,6 +15,11 @@
1515
1616 # This file was written by Fred Fish. (fnf@cygnus.com)
1717
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+}
1823
1924 standard_testfile
2025
--- a/gdb/testsuite/gdb.threads/schedlock.exp
+++ b/gdb/testsuite/gdb.threads/schedlock.exp
@@ -18,6 +18,12 @@
1818 #
1919 # This test covers the various forms of "set scheduler-locking".
2020
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+}
2127
2228 standard_testfile
2329
--- a/gdb/testsuite/gdb.threads/sigthread.exp
+++ b/gdb/testsuite/gdb.threads/sigthread.exp
@@ -37,6 +37,12 @@ gdb_test_multiple "continue" "continue" {
3737 }
3838 }
3939
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+
4046 # For this to work we must be sure to consume the "Continuing."
4147 # message first, or GDB's signal handler may not be in place.
4248 after 500 {send_gdb "\003"}