diff options
author | Tom de Vries <tdevries@suse.de> | 2019-09-19 00:23:54 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2019-09-19 00:23:54 +0200 |
commit | 81dc3ab59476c9851a6cda321b85dcf8a6ef4be8 (patch) | |
tree | b816302403fc35a17c2d3a2713e4b47e423ddf96 /gdb/osabi.h | |
parent | a1726c38a9e8ac07b3fd6bbfac04da27c32c0d70 (diff) | |
download | fsf-binutils-gdb-81dc3ab59476c9851a6cda321b85dcf8a6ef4be8.zip fsf-binutils-gdb-81dc3ab59476c9851a6cda321b85dcf8a6ef4be8.tar.gz fsf-binutils-gdb-81dc3ab59476c9851a6cda321b85dcf8a6ef4be8.tar.bz2 |
[gdb/testsuite] Handle unreachable network in server-connect.exp
When running gdb.server/server-connect.exp I run into:
...
FAIL: gdb.server/server-connect.exp: tcp6: connect to gdbserver using tcp6:::1
FAIL: gdb.server/server-connect.exp: tcp6-with-brackets: connect to gdbserver \
using tcp6:[::1]
FAIL: gdb.server/server-connect.exp: udp6: connect to gdbserver using udp6:::1
FAIL: gdb.server/server-connect.exp: udp6-with-brackets: connect to gdbserver \
using udp6:[::1]
...
The FAIL is caused by the fact that the ipv6 loopback address is not available:
...
PASS: gdb.server/server-connect.exp: tcp6: start gdbserver
target remote tcp6:::1:2347^M
A program is being debugged already. Kill it? (y or n) y^M
tcp6:::1:2347: Network is unreachable.^M
(gdb) FAIL: gdb.server/server-connect.exp: tcp6: connect to gdbserver using tcp6:::1
...
This should be marked UNSUPPORTED rather than FAIL.
Furthermore, the test-case takes about 4 minutes, because the 'Network is
unreachable' response is not explicitly handled in gdb_target_cmd, so instead
it runs into the timeout case.
Fix this by handling the 'Network is unreachable' response as UNSUPPORTED.
This reduces testing time from 4 minutes to about 2 seconds.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2019-09-19 Tom de Vries <tdevries@suse.de>
* lib/gdbserver-support.exp (gdb_target_cmd_ext): Return 2 (meaning
UNSUPPORTED) for 'Network is unreachable' message. Factor out of ...
(gdb_target_cmd): ... here.
* gdb.server/server-connect.exp: Use gdb_target_cmd_ext, handle return
value 2.
Diffstat (limited to 'gdb/osabi.h')
0 files changed, 0 insertions, 0 deletions