Skip tests that send ctrl-c to GDB if nointerrupts target property is set.
authorSandra Loosemore <sandra@codesourcery.com>
Mon, 14 Dec 2015 23:02:59 +0000 (15:02 -0800)
committerSandra Loosemore <sandra@codesourcery.com>
Mon, 14 Dec 2015 23:02:59 +0000 (15:02 -0800)
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.

17 files changed:
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/completion.exp
gdb/testsuite/gdb.base/double-prompt-target-event-error.exp
gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp
gdb/testsuite/gdb.base/paginate-bg-execution.exp
gdb/testsuite/gdb.base/paginate-execution-startup.exp
gdb/testsuite/gdb.base/random-signal.exp
gdb/testsuite/gdb.base/range-stepping.exp
gdb/testsuite/gdb.cp/annota2.exp
gdb/testsuite/gdb.cp/annota3.exp
gdb/testsuite/gdb.gdb/selftest.exp
gdb/testsuite/gdb.threads/continue-pending-status.exp
gdb/testsuite/gdb.threads/leader-exit.exp
gdb/testsuite/gdb.threads/manythreads.exp
gdb/testsuite/gdb.threads/pthreads.exp
gdb/testsuite/gdb.threads/schedlock.exp
gdb/testsuite/gdb.threads/sigthread.exp

index f8e7084f66d05feb904a36bb7f2fe7c1eb9dd3c6..9228e09f595957e9616fed51dd418070d2717d6c 100644 (file)
@@ -1,3 +1,23 @@
+2015-12-14  Sandra Loosemore  <sandra@codesourcery.com>
+
+       * 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.
+
 2015-12-11  Don Breazeal  <donb@codesourcery.com>
 
        * gdb.base/execl-update-breakpoints.exp (main): Enable for target
index f0e4dec9b54c9825fe036bb8519f82907e8fed1a..2aabab5dc6d555034ab878954922bec5b674f4d2 100644 (file)
@@ -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"
index 6e5085fa61b2fa1a5950376e0e8e41c53a45311b..b5ad7eb5185b6f5cc58c296c772c943268aadd5d 100644 (file)
 # 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} {
index d721990a44d9b0c7da8a59fb80b701417e98da9e..aae31226b01a86b9628b7e874e3047fab14ccffd 100644 (file)
 # 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} {
index f7437ac483f76e623ed09534e676e3468f6edaaf..f2a4d73210c5bb7f348aab0ba7f6ee8422dd21e6 100644 (file)
@@ -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"
index cdade32919d09811ff73eaeba75b325ef3c79dbc..c5d8e23523b3bebc0bebcc67eacc792afc6255b8 100644 (file)
@@ -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"
 }
 
index 566668a5184b37d74dd093d59fb532fca29ad3ad..47c354997805867616864d2aad7e60ae29e2d142 100644 (file)
@@ -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]} {
index 79667ba7b7b8b8b96b83b6cf0de7ac5cda478a37..507d6cc8da896e7167e145e324c447d696b61424 100644 (file)
@@ -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
index 52ef3c437415ed61fb08bca46508bb9d5a39b0eb..953a724c5aed62dc587dc59923218bb69bc1b044 100644 (file)
@@ -262,12 +262,14 @@ gdb_test_multiple "next" "watch triggered on a.x" {
 # test:
 # annotate-quit
 #
-send_gdb "\003"
-gdb_expect {
-    -re "\r\n\032\032error-begin\r\nQuit\r\n\r\n\032\032quit\r\n$gdb_prompt$" \
+if ![target_info exists gdb,nointerrupts] {
+    send_gdb "\003"
+    gdb_expect {
+       -re "\r\n\032\032error-begin\r\nQuit\r\n\r\n\032\032quit\r\n$gdb_prompt$" \
            { pass "annotate-quit" }
-    -re ".*$gdb_prompt$" { fail "annotate-quit" }
-    timeout { fail "annotate-quit (timeout)" }
+       -re ".*$gdb_prompt$" { fail "annotate-quit" }
+       timeout { fail "annotate-quit (timeout)" }
+    }
 }
 
 #
index e62bb2925a77e84bd095a2df0882ecf6688ad5dc..055ed5c34803b866dfd3cf4361f58e1f0362eb0e 100644 (file)
@@ -177,11 +177,13 @@ gdb_test_multiple "next" "watch triggered on a.x" {
 # test:
 # annotate-quit
 #
-send_gdb "\003"
-gdb_expect_list "annotate-quit" "$gdb_prompt$" {
-    "\r\n\032\032error-begin\r\n"
-    "Quit\r\n"
-    "\r\n\032\032quit\r\n"
+if ![target_info exists gdb,nointerrupts] {
+    send_gdb "\003"
+    gdb_expect_list "annotate-quit" "$gdb_prompt$" {
+       "\r\n\032\032error-begin\r\n"
+       "Quit\r\n"
+       "\r\n\032\032quit\r\n"
+    }
 }
 
 #
index 8b1298f3c1087a0fb2ba9a71a66de268a4a01cc1..e8644fbfd16f1ab15b8b471f6d4831683315f579 100644 (file)
@@ -433,17 +433,19 @@ proc test_with_self { executable } {
     }
 
     # kill the xgdb process
-    set description "send ^C to child process"
-    send_gdb "\003"
-    gdb_expect {
-       -re "Program received signal SIGINT.*$gdb_prompt $" {
-           pass "$description"
-       }
-       -re ".*$gdb_prompt $" {
-           fail "$description"
-       }
-       timeout {
-           fail "$description (timeout)"
+    if ![target_info exists gdb,nointerrupts] {
+       set description "send ^C to child process"
+       send_gdb "\003"
+       gdb_expect {
+           -re "Program received signal SIGINT.*$gdb_prompt $" {
+               pass "$description"
+           }
+           -re ".*$gdb_prompt $" {
+               fail "$description"
+           }
+           timeout {
+               fail "$description (timeout)"
+           }
        }
     }
     
index 1f170f74ef4ddf70cca73d7ebb068a009131ee3e..0833065007378869a71c006e388aa87510bbeb94 100644 (file)
 # thread, then switching to a thread that has a status pending and
 # continuing.
 
+if [target_info exists gdb,nointerrupts] {
+    verbose "Skipping continue-pending-status.exp because of nointerrupts."
+    return
+}
+
 standard_testfile
 
 if [prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] {
index 01e3258022d723138b295bbe4d1a9179d47901ef..7de91a981c751d95916924479d5e6d4224118a1f 100644 (file)
 # 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 leader-exit.exp because of nointerrupts."
+    return
+}
+
 # Exit of the thread group leader should not break GDB.
 
 standard_testfile
index 2a55f868a01983c45c65a4b999378c3ec818ec12..b6a1c212d6ca64c52ff02cd2b361142da93b48ed 100644 (file)
 
 # This file was written by Jeff Johnston. (jjohnstn@redhat.com)
 
+# This test requires sending ^C to interrupt the running target.
+if [target_info exists gdb,nointerrupts] {
+    verbose "Skipping manythreads.exp because of nointerrupts."
+    return
+}
 
 standard_testfile
 
index 80cae2cbc28518bcfbf40cb17839f64501869d37..b456641ef81bfd8cc4d2da8408ba958494714efd 100644 (file)
 
 # This file was written by Fred Fish. (fnf@cygnus.com)
 
+# This test requires sending ^C to interrupt the running target.
+if [target_info exists gdb,nointerrupts] {
+    verbose "Skipping pthreads.exp because of nointerrupts."
+    return
+}
 
 standard_testfile
 
index 54e847efda8f23b4e9d6061219bd9eab0b760d23..65b13ffd47a259c670f07a3020f7677f927983ba 100644 (file)
 #
 # This test covers the various forms of "set scheduler-locking".
 
+# This test requires sending ^C to interrupt the running target.
+
+if [target_info exists gdb,nointerrupts] {
+    verbose "Skipping schedlock.exp because of nointerrupts."
+    return
+}
 
 standard_testfile
 
index ea3a62dc3779402949e39e53ead187c802a49535..cc1634ae95c176db4f294246b2007bd9fd45848e 100644 (file)
@@ -37,6 +37,12 @@ gdb_test_multiple "continue" "continue" {
     }
 }
 
+# This test requires sending ^C to interrupt the running target.
+if [target_info exists gdb,nointerrupts] {
+    verbose "Skipping sigthread.exp because of nointerrupts."
+    return
+}
+
 # For this to work we must be sure to consume the "Continuing."
 # message first, or GDB's signal handler may not be in place.
 after 500 {send_gdb "\003"}
This page took 0.037809 seconds and 4 git commands to generate.