public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] [gdb/testsuite] Skip aarch64 in skip_gdbserver_test if no xml support
@ 2022-11-15 12:54 Tom de Vries
  2022-11-15 12:57 ` Luis Machado
  0 siblings, 1 reply; 2+ messages in thread
From: Tom de Vries @ 2022-11-15 12:54 UTC (permalink / raw)
  To: gdb-patches; +Cc: Luis Machado

From: Tom de Vries <tdevries@ampere3.arch.suse.de>

On aarch64-linux, with a gdb build without libexpat, so without xml support, I
run into:
...
(gdb) builtin_spawn attach-no-multi-process^M
attach 26808^M
Attaching to Remote target^M
warning: Can not parse XML target description; XML support was disabled at \
  compile time^M
Reading symbols from attach-no-multi-process...^M
Remote 'g' packet reply is too long (expected 788 bytes, got 796 bytes): ... ^M
...

The test-case checks for skip_gdbserver_tests and that one contains a check
for xml support:
...
    # If GDB is lack of XML support, and targets, like arm, have
    # multiple target descriptions, GDB doesn't know which target
    # description GDBserver uses, and may fail to parse 'g' packet
    # after connection.
    if { [gdb_skip_xml_test]
	 && ([istarget "arm*-*-linux*"]
	      || [istarget "mips*-*-linux*"]
	      || [istarget "powerpc*-*-linux*"]
	      || [istarget "s390*-*-linux*"]
	      || [istarget "x86_64-*-linux*"]
	      || [istarget "i\[34567\]86-*-linux*"]) } {
	return 1
    }
...
but it doesn't trigger because aarch64 is missing.

Fix this by adding istarget "aarch64*-*-linux*".

Tested on aarch64-linux.
---
 gdb/testsuite/lib/gdbserver-support.exp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gdb/testsuite/lib/gdbserver-support.exp b/gdb/testsuite/lib/gdbserver-support.exp
index 3f2cec246fa..c9f0c35c07e 100644
--- a/gdb/testsuite/lib/gdbserver-support.exp
+++ b/gdb/testsuite/lib/gdbserver-support.exp
@@ -173,6 +173,7 @@ proc skip_gdbserver_tests { } {
     # after connection.
     if { [gdb_skip_xml_test]
 	 && ([istarget "arm*-*-linux*"]
+	     || [istarget "aarch64*-*-linux*"]
 	     || [istarget "mips*-*-linux*"]
 	     || [istarget "powerpc*-*-linux*"]
 	     || [istarget "s390*-*-linux*"]
-- 
2.35.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] [gdb/testsuite] Skip aarch64 in skip_gdbserver_test if no xml support
  2022-11-15 12:54 [PATCH] [gdb/testsuite] Skip aarch64 in skip_gdbserver_test if no xml support Tom de Vries
@ 2022-11-15 12:57 ` Luis Machado
  0 siblings, 0 replies; 2+ messages in thread
From: Luis Machado @ 2022-11-15 12:57 UTC (permalink / raw)
  To: Tom de Vries, gdb-patches

Hi Tom,

On 11/15/22 12:54, Tom de Vries wrote:
> From: Tom de Vries <tdevries@ampere3.arch.suse.de>
> 
> On aarch64-linux, with a gdb build without libexpat, so without xml support, I
> run into:
> ...
> (gdb) builtin_spawn attach-no-multi-process^M
> attach 26808^M
> Attaching to Remote target^M
> warning: Can not parse XML target description; XML support was disabled at \
>    compile time^M
> Reading symbols from attach-no-multi-process...^M
> Remote 'g' packet reply is too long (expected 788 bytes, got 796 bytes): ... ^M
> ...
> 
> The test-case checks for skip_gdbserver_tests and that one contains a check
> for xml support:
> ...
>      # If GDB is lack of XML support, and targets, like arm, have
>      # multiple target descriptions, GDB doesn't know which target
>      # description GDBserver uses, and may fail to parse 'g' packet
>      # after connection.
>      if { [gdb_skip_xml_test]
> 	 && ([istarget "arm*-*-linux*"]
> 	      || [istarget "mips*-*-linux*"]
> 	      || [istarget "powerpc*-*-linux*"]
> 	      || [istarget "s390*-*-linux*"]
> 	      || [istarget "x86_64-*-linux*"]
> 	      || [istarget "i\[34567\]86-*-linux*"]) } {
> 	return 1
>      }
> ...
> but it doesn't trigger because aarch64 is missing.
> 
> Fix this by adding istarget "aarch64*-*-linux*".
> 
> Tested on aarch64-linux.
> ---
>   gdb/testsuite/lib/gdbserver-support.exp | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/gdb/testsuite/lib/gdbserver-support.exp b/gdb/testsuite/lib/gdbserver-support.exp
> index 3f2cec246fa..c9f0c35c07e 100644
> --- a/gdb/testsuite/lib/gdbserver-support.exp
> +++ b/gdb/testsuite/lib/gdbserver-support.exp
> @@ -173,6 +173,7 @@ proc skip_gdbserver_tests { } {
>       # after connection.
>       if { [gdb_skip_xml_test]
>   	 && ([istarget "arm*-*-linux*"]
> +	     || [istarget "aarch64*-*-linux*"]
>   	     || [istarget "mips*-*-linux*"]
>   	     || [istarget "powerpc*-*-linux*"]
>   	     || [istarget "s390*-*-linux*"]

Thanks for spotting this. LGTM.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-15 12:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-15 12:54 [PATCH] [gdb/testsuite] Skip aarch64 in skip_gdbserver_test if no xml support Tom de Vries
2022-11-15 12:57 ` Luis Machado

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).