aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base
diff options
context:
space:
mode:
authorSandra Loosemore <sandra@codesourcery.com>2015-12-14 15:02:59 -0800
committerSandra Loosemore <sandra@codesourcery.com>2015-12-14 15:02:59 -0800
commit87a3a92c46c770e6aa2ca1209f46af16eae2c4e9 (patch)
tree20befb6166c28a18b2fe0a63829e3c964daa7d3e /gdb/testsuite/gdb.base
parent19d9d4efd18bcc633e99cb6a3e39bd9b22ca70ce (diff)
downloadgdb-87a3a92c46c770e6aa2ca1209f46af16eae2c4e9.zip
gdb-87a3a92c46c770e6aa2ca1209f46af16eae2c4e9.tar.gz
gdb-87a3a92c46c770e6aa2ca1209f46af16eae2c4e9.tar.bz2
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.
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r--gdb/testsuite/gdb.base/completion.exp4
-rw-r--r--gdb/testsuite/gdb.base/double-prompt-target-event-error.exp5
-rw-r--r--gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp5
-rw-r--r--gdb/testsuite/gdb.base/paginate-bg-execution.exp4
-rw-r--r--gdb/testsuite/gdb.base/paginate-execution-startup.exp4
-rw-r--r--gdb/testsuite/gdb.base/random-signal.exp6
-rw-r--r--gdb/testsuite/gdb.base/range-stepping.exp66
7 files changed, 58 insertions, 36 deletions
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp
index f0e4dec..2aabab5 100644
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -944,7 +944,7 @@ gdb_test_multiple "" "$test" {
gdb_test_no_output "set max-completions unlimited"
-if {![skip_tui_tests]} {
+if {![skip_tui_tests] && ![target_info exists gdb,nointerrupts]} {
set test "test completion of layout names"
send_gdb "layout\t\t\t"
gdb_test_multiple "" "$test" {
@@ -960,7 +960,7 @@ if {![skip_tui_tests]} {
}
}
}
-if {![skip_tui_tests]} {
+if {![skip_tui_tests] && ![target_info exists gdb,nointerrupts]} {
with_test_prefix "focus command" {
set test "test completion"
send_gdb "focus \t\t"
diff --git a/gdb/testsuite/gdb.base/double-prompt-target-event-error.exp b/gdb/testsuite/gdb.base/double-prompt-target-event-error.exp
index 6e5085f..b5ad7eb 100644
--- 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 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+if [target_info exists gdb,nointerrupts] {
+ verbose "Skipping double-prompt-target-event-error.exp because of nointerrupts."
+ return
+}
+
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug] == -1} {
diff --git a/gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp b/gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp
index d721990..aae3122 100644
--- 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 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+if [target_info exists gdb,nointerrupts] {
+ verbose "Skipping paginate-after-ctrl-c-running.exp because of nointerrupts."
+ return
+}
+
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile debug] == -1} {
diff --git a/gdb/testsuite/gdb.base/paginate-bg-execution.exp b/gdb/testsuite/gdb.base/paginate-bg-execution.exp
index f7437ac..f2a4d73 100644
--- 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 } {
}
test_bg_execution_pagination_return
-test_bg_execution_pagination_cancel "ctrl-c"
+if ![target_info exists gdb,nointerrupts] {
+ test_bg_execution_pagination_cancel "ctrl-c"
+}
test_bg_execution_pagination_cancel "quit"
diff --git a/gdb/testsuite/gdb.base/paginate-execution-startup.exp b/gdb/testsuite/gdb.base/paginate-execution-startup.exp
index cdade32..c5d8e23 100644
--- 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 } {
if {[probe_can_run_cmdline] > 0} {
test_fg_execution_pagination_return
- test_fg_execution_pagination_cancel "ctrl-c"
+ if ![target_info exists gdb,nointerrupts] {
+ test_fg_execution_pagination_cancel "ctrl-c"
+ }
test_fg_execution_pagination_cancel "quit"
}
diff --git a/gdb/testsuite/gdb.base/random-signal.exp b/gdb/testsuite/gdb.base/random-signal.exp
index 566668a..47c3549 100644
--- 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] {
continue
}
+# This test requires sending ^C to interrupt the running target.
+if [target_info exists gdb,nointerrupts] {
+ verbose "Skipping random-signal.exp because of nointerrupts."
+ return
+}
+
standard_testfile
if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
diff --git a/gdb/testsuite/gdb.base/range-stepping.exp b/gdb/testsuite/gdb.base/range-stepping.exp
index 79667ba..507d6cc 100644
--- 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" {
# Check that range stepping works well even when it is interrupted by
# ctrl-c.
-with_test_prefix "interrupt" {
- gdb_test_no_output "set debug remote 1"
-
- send_gdb "next\n"
- sleep 1
- send_gdb "\003"
-
- # GDB should send one vCont;r and receive one stop reply for
- # SIGINT:
- # --> vCont;rSTART,END (range step)
- # <-- T02 (SIGINT)
-
- set vcont_r_counter 0
-
- set test "send ctrl-c to GDB"
- gdb_test_multiple "" $test {
- -re "vCont;r\[^\r\n\]*\.\.\." {
- incr vcont_r_counter
- exp_continue
+if ![target_info exists gdb,nointerrupts] {
+ with_test_prefix "interrupt" {
+ gdb_test_no_output "set debug remote 1"
+
+ send_gdb "next\n"
+ sleep 1
+ send_gdb "\003"
+
+ # GDB should send one vCont;r and receive one stop reply for
+ # SIGINT:
+ # --> vCont;rSTART,END (range step)
+ # <-- T02 (SIGINT)
+
+ set vcont_r_counter 0
+
+ set test "send ctrl-c to GDB"
+ gdb_test_multiple "" $test {
+ -re "vCont;r\[^\r\n\]*\.\.\." {
+ incr vcont_r_counter
+ exp_continue
+ }
+ -re "Program received signal SIGINT.*$gdb_prompt $" {
+ pass $test
+ }
}
- -re "Program received signal SIGINT.*$gdb_prompt $" {
- pass $test
+ gdb_test_no_output "set debug remote 0"
+
+ # Check the number of 'vCont;r' packets.
+ if { $vcont_r_counter == 1 } {
+ pass "${test}: 1 vCont;r"
+ } else {
+ fail "${test}: 1 vCont;r"
}
- }
- gdb_test_no_output "set debug remote 0"
- # Check the number of 'vCont;r' packets.
- if { $vcont_r_counter == 1 } {
- pass "${test}: 1 vCont;r"
- } else {
- fail "${test}: 1 vCont;r"
+ # Break the loop earlier and continue range stepping.
+ gdb_test "set variable c = 0"
+ exec_cmd_expect_vCont_count "next" 1
}
-
- # Break the loop earlier and continue range stepping.
- gdb_test "set variable c = 0"
- exec_cmd_expect_vCont_count "next" 1
}
# Check that range stepping doesn't break software watchpoints. With