diff mbox

[gdb/testsuite] Skip multi-target.exp without gdbserver

Message ID 428ef76b-23f4-e6dc-499f-e90c4edb074e@suse.de
State New
Headers show

Commit Message

Tom de Vries Feb. 10, 2020, 10:59 a.m. UTC
[ was: Re: [PATCH] Move gdbserver to top level ]
On 09-02-2020 15:17, Tom de Vries wrote:
> On 09-02-2020 14:59, Tom de Vries wrote:
>> On 03-02-2020 22:34, Tom Tromey wrote:
>>> I'm going to push it tomorrow or the day after, unless there's some
>>> objection.
>>
>> Hi,
>>
>> FYI, starting this commit, I'm running into:
>> ...
>> (gdb) PASS: gdb.multi/multi-target.exp: continue: non-stop=off: set
>> remote-exec file in inferior 2
>> spawn of  --once --multi localhost:2346 failed
>> ERROR: tcl error sourcing
>> /data/gdb_versions/devel/src/gdb/testsuite/gdb.multi/multi-target.exp.
>> ERROR: Timeout waiting for gdbserver response.
> 
> Looking at other tests that use gdbserver, I guess this is missing:
> ...
> diff --git a/gdb/testsuite/gdb.multi/multi-target.exp
> b/gdb/testsuite/gdb.multi/multi-target.exp
> index 3588eb4d76..6c727b5e3b 100644
> --- a/gdb/testsuite/gdb.multi/multi-target.exp
> +++ b/gdb/testsuite/gdb.multi/multi-target.exp
> @@ -17,6 +17,10 @@
> 
>  load_lib gdbserver-support.exp
> 
> +if { [skip_gdbserver_tests] } {
> +    return 0
> +}
> +
>  standard_testfile
> 
>  # The plain remote target can't do multiple inferiors.
> 
> ...

This is an unrelated issue though, I can reproduce it before this commit
with --disable-gdbserver.

Fixed by attached patch.

OK for trunk?

Thanks,
- Tom

Comments

Pedro Alves Feb. 10, 2020, 12:20 p.m. UTC | #1
On 2/10/20 10:59 AM, Tom de Vries wrote:

> This is an unrelated issue though, I can reproduce it before this commit
> with --disable-gdbserver.
> 
> Fixed by attached patch.
> 
> OK for trunk?

OK.

Thanks,
Pedro Alves
diff mbox

Patch

[gdb/testsuite] Skip multi-target.exp without gdbserver

Pre-commit 919adfe840 "Move gdbserver to top level", if we build gdb with
--disable-gdbserver, and run test-case gdb.multi/multi-target.exp, we run
into:
...
(gdb) PASS: gdb.multi/multi-target.exp: continue: non-stop=off: set remote-exec file in inferior 2
spawn of  --once --multi localhost:2346 failed
ERROR: tcl error sourcing /data/gdb_versions/devel/src/gdb/testsuite/gdb.multi/multi-target.exp.
ERROR: Timeout waiting for gdbserver response.
...

Fix this by using skip_gdbserver_tests in multi-target.exp.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-02-10  Tom de Vries  <tdevries@suse.de>

	* gdb.multi/multi-target.exp: Skip if skip_gdbserver_tests.

---
 gdb/testsuite/gdb.multi/multi-target.exp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gdb/testsuite/gdb.multi/multi-target.exp b/gdb/testsuite/gdb.multi/multi-target.exp
index 3588eb4d76..6c727b5e3b 100644
--- a/gdb/testsuite/gdb.multi/multi-target.exp
+++ b/gdb/testsuite/gdb.multi/multi-target.exp
@@ -17,6 +17,10 @@ 
 
 load_lib gdbserver-support.exp
 
+if { [skip_gdbserver_tests] } {
+    return 0
+}
+
 standard_testfile
 
 # The plain remote target can't do multiple inferiors.