diff options
author | Don Breazeal <donb@codesourcery.com> | 2015-12-14 11:18:05 -0800 |
---|---|---|
committer | Don Breazeal <donb@codesourcery.com> | 2015-12-14 11:18:05 -0800 |
commit | a8f077dc25b1732fb272a7ff10f72b5ca6f67b70 (patch) | |
tree | 73b4c90b87cb6fc66300ade3dc2d41d871ab00fe /gdb/testsuite/gdb.base | |
parent | 4fd0a9fd005ea3affe8e61f6ec82817055a3bc2b (diff) | |
download | gdb-a8f077dc25b1732fb272a7ff10f72b5ca6f67b70.zip gdb-a8f077dc25b1732fb272a7ff10f72b5ca6f67b70.tar.gz gdb-a8f077dc25b1732fb272a7ff10f72b5ca6f67b70.tar.bz2 |
Target remote mode fork and exec test updates
This patch updates tests for fork and exec events in target remote mode.
In the majority of cases this was a simple matter of removing some code
that disabled the test for target remote. In a few cases the test needed
to be disabled; in those cases the gdb_protocol was checked instead of
using the [is_remote target] etc.
In a couple of cases we needed to use clean_restart, since target remote
doesn't support the run command, and in one case we had to modify an expect
expression to allow for a "multiprocess-style" ptid.
Tested with the patch that implemented target remote mode fork and exec
event support.
gdb/testsuite/ChangeLog:
* gdb.base/execl-update-breakpoints.exp (main): Enable for target
remote.
* gdb.base/foll-exec-mode.exp (main): Disable for target remote.
* gdb.base/foll-exec.exp (main): Enable for target remote.
* gdb.base/foll-fork.exp (main): Likewise.
* gdb.base/foll-vfork.exp (main): Likewise.
* gdb.base/multi-forks.exp (main): Likewise, and use clean_restart.
(proc continue_to_exit_bp_loc): Use clean_restart.
* gdb.base/pie-execl.exp (main): Disable for target remote.
* gdb.base/watch-vfork.exp (main): Enable for target remote.
* gdb.mi/mi-nsthrexec.exp (main): Likewise.
* gdb.threads/execl.exp (main): Likewise.
* gdb.threads/fork-child-threads.exp (main): Likewise.
* gdb.threads/fork-plus-threads.exp (main): Disable for target
remote.
* gdb.threads/fork-thread-pending.exp (main): Enable for target
remote.
* gdb.threads/linux-dp.exp (check_philosopher_stack): Allow
pid.tid style ptids, instead of just tid.
* gdb.threads/thread-execl.exp (main): Enable for target remote.
* gdb.threads/watchpoint-fork.exp (main): Likewise.
* gdb.trace/report.exp (use_collected_data): Allow pid.tid style
ptids, instead of just tid.
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r-- | gdb/testsuite/gdb.base/execl-update-breakpoints.exp | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/foll-exec-mode.exp | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/foll-exec.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/foll-fork.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/foll-vfork.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/multi-forks.exp | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/pie-execl.exp | 10 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/watch-vfork.exp | 5 |
8 files changed, 13 insertions, 33 deletions
diff --git a/gdb/testsuite/gdb.base/execl-update-breakpoints.exp b/gdb/testsuite/gdb.base/execl-update-breakpoints.exp index a980791..20d9101 100644 --- a/gdb/testsuite/gdb.base/execl-update-breakpoints.exp +++ b/gdb/testsuite/gdb.base/execl-update-breakpoints.exp @@ -16,12 +16,6 @@ # Test that when following an exec, we don't try to insert breakpoints # in the new image at the addresses the symbols had before the exec. -# Remote protocol does not support follow-exec notifications. - -if [is_remote target] { - continue -} - standard_testfile # Build two copies of the program, each linked at a different address. diff --git a/gdb/testsuite/gdb.base/foll-exec-mode.exp b/gdb/testsuite/gdb.base/foll-exec-mode.exp index ee193e2..8a0a3a9 100644 --- a/gdb/testsuite/gdb.base/foll-exec-mode.exp +++ b/gdb/testsuite/gdb.base/foll-exec-mode.exp @@ -26,8 +26,11 @@ # be a breakpoint in order to stop after the exec, even if we use # a single-step command to execute past the exec. -if { [is_remote target] || ![isnative] } then { - continue +# Remote mode doesn't support the 'run' command, which is +# required for follow-exec-mode testing. +if { [target_info exists gdb_protocol] + && [target_info gdb_protocol] == "remote" } { + continue } # Until "catch exec" is implemented on other targets... diff --git a/gdb/testsuite/gdb.base/foll-exec.exp b/gdb/testsuite/gdb.base/foll-exec.exp index 0a6347c..a36f212 100644 --- a/gdb/testsuite/gdb.base/foll-exec.exp +++ b/gdb/testsuite/gdb.base/foll-exec.exp @@ -16,10 +16,6 @@ # This is a test of gdb's ability to follow a process through a # Unix exec() system call. -if { [is_remote target] || ![isnative] } then { - continue -} - # Until "catch exec" is implemented on other targets... # if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-linux*"]} then { diff --git a/gdb/testsuite/gdb.base/foll-fork.exp b/gdb/testsuite/gdb.base/foll-fork.exp index 5993973..51e6a7a 100644 --- a/gdb/testsuite/gdb.base/foll-fork.exp +++ b/gdb/testsuite/gdb.base/foll-fork.exp @@ -13,10 +13,6 @@ # 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 { [is_remote target] || ![isnative] } then { - continue -} - # Until "set follow-fork-mode" and "catch fork" are implemented on # other targets... # diff --git a/gdb/testsuite/gdb.base/foll-vfork.exp b/gdb/testsuite/gdb.base/foll-vfork.exp index 82922d8..0659509 100644 --- a/gdb/testsuite/gdb.base/foll-vfork.exp +++ b/gdb/testsuite/gdb.base/foll-vfork.exp @@ -18,10 +18,6 @@ # either execs or exits --- since those events take somewhat different # code paths in GDB, both variants are exercised. -if { [is_remote target] || ![isnative] } then { - continue -} - # Until "set follow-fork-mode" and "catch vfork" are implemented on # other targets... # diff --git a/gdb/testsuite/gdb.base/multi-forks.exp b/gdb/testsuite/gdb.base/multi-forks.exp index 2b0b81d..cb1464d 100644 --- a/gdb/testsuite/gdb.base/multi-forks.exp +++ b/gdb/testsuite/gdb.base/multi-forks.exp @@ -13,10 +13,6 @@ # 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 { [is_remote target] || ![isnative] } then { - continue -} - # Until "set follow-fork-mode" and "catch fork" are implemented on # other targets... # @@ -111,6 +107,7 @@ proc continue_to_exit_bp_loc {} { # First set gdb to follow the child. # The result should be that each of the 4 forks returns zero. +clean_restart ${binfile} runto_main gdb_test_no_output "set follow-fork child" continue_to_exit_bp_loc @@ -120,6 +117,7 @@ gdb_test "print pids" "\\$.* = \\{0, 0, 0, 0\\}.*" "follow child, print pids" # Now set gdb to follow the parent. # Result should be that none of the 4 forks returns zero. +clean_restart ${binfile} runto_main gdb_test_no_output "set follow-fork parent" "" continue_to_exit_bp_loc diff --git a/gdb/testsuite/gdb.base/pie-execl.exp b/gdb/testsuite/gdb.base/pie-execl.exp index 51edc82..f75c4dc 100644 --- a/gdb/testsuite/gdb.base/pie-execl.exp +++ b/gdb/testsuite/gdb.base/pie-execl.exp @@ -23,10 +23,12 @@ if ![istarget *-linux*] { continue } -# Remote protocol does not support follow-exec notifications. - -if [is_remote target] { - continue +# In remote mode we cannot use the 'set args' command, and this +# test requires it. +if { [target_info exists gdb_protocol] } then { + if { [target_info gdb_protocol] == "remote" } then { + continue + } } standard_testfile .c diff --git a/gdb/testsuite/gdb.base/watch-vfork.exp b/gdb/testsuite/gdb.base/watch-vfork.exp index 9b43ac6..67ff1c2 100644 --- a/gdb/testsuite/gdb.base/watch-vfork.exp +++ b/gdb/testsuite/gdb.base/watch-vfork.exp @@ -15,11 +15,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# There's no support for vfork events in the remote protocol. -if { [is_remote target] } { - return 0 -} - standard_testfile .c if { [build_executable ${testfile}.exp ${testfile} $srcfile {debug}] } { |