aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2017-10-13 10:48:42 +0100
committerPedro Alves <palves@redhat.com>2017-10-13 11:20:37 +0100
commit23fb630af09f2601e7cb75233837399d67cfd017 (patch)
tree1d661f78af81bb1a6f2cdc8fc90cc5fae93c9405
parentcc77b1dc33790bcb852c8c72e2efebaa3b505b01 (diff)
downloadgdb-23fb630af09f2601e7cb75233837399d67cfd017.zip
gdb-23fb630af09f2601e7cb75233837399d67cfd017.tar.gz
gdb-23fb630af09f2601e7cb75233837399d67cfd017.tar.bz2
Fix is_remote check in gdb.base/remote.exp
1. Otherwise, when the native-gdbserver board stops setting is_remote, this test would stop running there. 2. Makes the test run with --target_board=native-extended-gdbserver too. gdb/testsuite/ChangeLog: 2017-10-13 Pedro Alves <palves@redhat.com> * gdb.base/remote.exp: Check gdb_protocol instead of is_remote. (top level): Add comment.
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/remote.exp11
2 files changed, 12 insertions, 4 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 51d788b..117ab9b 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2017-10-13 Pedro Alves <palves@redhat.com>
+ * gdb.base/remote.exp: Check gdb_protocol instead of is_remote.
+ (top level): Add comment.
+
+2017-10-13 Pedro Alves <palves@redhat.com>
+
* gdb.base/remote.exp (top level): Fix comment typo and add
missing return.
diff --git a/gdb/testsuite/gdb.base/remote.exp b/gdb/testsuite/gdb.base/remote.exp
index db6fc00..2f3ede1 100644
--- a/gdb/testsuite/gdb.base/remote.exp
+++ b/gdb/testsuite/gdb.base/remote.exp
@@ -13,10 +13,9 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-
-# test only on a remote target board
-if {! [is_remote target]} {
+# Test only on boards that actually use the remote protocol.
+if {[target_info gdb_protocol] != "remote"
+ && [target_info gdb_protocol] != "extended-remote"} {
return
}
@@ -103,6 +102,10 @@ proc gdb_load_timed {executable class writesize} {
pass $test
}
+# These download tests won't actually download anything on !is_remote
+# target boards, but we run them anyway because it's simpler, and
+# harmless.
+
# Typically about 400-1 bytes can be downloaded
gdb_load_timed $binfile "limit" 398
gdb_load_timed $binfile "limit" 400