public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* Re: gdb: Improve formatting of 'show architecture' messages
@ 2020-10-12  7:46 Alan Modra
  2020-10-12 13:53 ` Tom Tromey
  2020-10-12 14:30 ` Andrew Burgess
  0 siblings, 2 replies; 4+ messages in thread
From: Alan Modra @ 2020-10-12  7:46 UTC (permalink / raw)
  To: gdb-patches

Commit ccb9eba6a25 updated the testsuite for some targets without
running the testsuite on those targets.  This patch corrects the
update, in most cases just adding the expected full-stop.

On powerpc64le-linux, fixes these:
FAIL: gdb.arch/powerpc-d128-regs.exp: checking for PPC arch
FAIL: gdb.arch/powerpc-disassembler-options.exp: set architecture powerpc:common64
FAIL: gdb.arch/powerpc-disassembler-options.exp: set architecture rs6000:6000
FAIL: gdb.arch/ppc64-symtab-cordic.exp: show architecture

I also verified that arm-linuxeabi and s390x-linux cross-builds now
pass their disassembler-options.exp tests.

OK to apply?

	* testsuite/gdb.arch/arm-disassembler-options.exp: Adjust expected
	"target architecture" output.
	* testsuite/gdb.arch/powerpc-d128-regs.exp: Likewise.
	* testsuite/gdb.arch/powerpc-disassembler-options.exp: Likewise.
	* testsuite/gdb.arch/ppc64-symtab-cordic.exp: Likewise.
	* testsuite/gdb.arch/s390-disassembler-options.exp: Likewise.

diff --git a/gdb/testsuite/gdb.arch/arm-disassembler-options.exp b/gdb/testsuite/gdb.arch/arm-disassembler-options.exp
index ac1d8a8bda..a3c0c0e5f8 100644
--- a/gdb/testsuite/gdb.arch/arm-disassembler-options.exp
+++ b/gdb/testsuite/gdb.arch/arm-disassembler-options.exp
@@ -31,7 +31,7 @@ set arch1 "armv2"
 set arch2 "armv5"
 
 gdb_test "set architecture $arch1" \
-	"The target architecture is set to \"$arch1\"" \
+	"The target architecture is set to \"$arch1\"\." \
 	"set architecture $arch1"
 
 gdb_test_no_output "set disassembler-options"
@@ -47,7 +47,7 @@ gdb_test "show disassembler-options" \
 # Change architectures and verify the disassembler options have been preserved.
 
 gdb_test "set architecture $arch2" \
-	"The target architecture is set to \"$arch2\"" \
+	"The target architecture is set to \"$arch2\"\." \
 	"set architecture $arch2"
 
 gdb_test "show disassembler-options" \
diff --git a/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp b/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp
index e7bbccb271..cd96029fe8 100644
--- a/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp
@@ -44,7 +44,7 @@ if { ![runto main] } then {
    return
 }
 
-if [gdb_test "show arch" ".*currently powerpc:common.*" "checking for PPC arch"] {
+if [gdb_test "show arch" ".*powerpc:common.*" "checking for PPC arch"] {
     return -1
 }
 
diff --git a/gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp b/gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp
index 68d9bf61e1..9b3f8309fe 100644
--- a/gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp
@@ -31,7 +31,7 @@ set arch1 "rs6000:6000"
 set arch2 "powerpc:common64"
 
 gdb_test "set architecture $arch1" \
-	"The target architecture is set to \"$arch1\"" \
+	"The target architecture is set to \"$arch1\"\." \
 	"set architecture $arch1"
 
 gdb_test_no_output "set disassembler-options"
@@ -47,7 +47,7 @@ gdb_test "show disassembler-options" \
 # Change architectures and verify the disassembler options have been preserved.
 
 gdb_test "set architecture $arch2" \
-	"The target architecture is set to \"$arch2\"" \
+	"The target architecture is set to \"$arch2\"\." \
 	"set architecture $arch2"
 
 gdb_test "show disassembler-options" \
diff --git a/gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp b/gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp
index fa5bff9ceb..a1fa5ffabe 100644
--- a/gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp
+++ b/gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp
@@ -47,10 +47,10 @@ gdb_load ${kofile}
 
 set test "show architecture"
 gdb_test_multiple $test $test {
-    -re "\r\nThe target architecture is set to \"auto\" \\(currently \"powerpc:common64\"\\)\r\n$gdb_prompt $" {
+    -re "\r\nThe target architecture is set to \"auto\" \\(currently \"powerpc:common64\"\\)\.\r\n$gdb_prompt $" {
 	pass $test
     }
-    -re "\r\nThe target architecture is set to \"auto\" \\(currently \".*\"\\)\r\n$gdb_prompt $" {
+    -re "\r\nThe target architecture is set to \"auto\" \\(currently \".*\"\\)\.\r\n$gdb_prompt $" {
 	untested "powerpc:common64 is not supported"
     }
 }
diff --git a/gdb/testsuite/gdb.arch/s390-disassembler-options.exp b/gdb/testsuite/gdb.arch/s390-disassembler-options.exp
index a9ae230aa0..16e7cd18d7 100644
--- a/gdb/testsuite/gdb.arch/s390-disassembler-options.exp
+++ b/gdb/testsuite/gdb.arch/s390-disassembler-options.exp
@@ -31,7 +31,7 @@ set arch1 "s390:64-bit"
 set arch2 "s390:31-bit"
 
 gdb_test "set architecture $arch1" \
-	"The target architecture is set to \"$arch1\"" \
+	"The target architecture is set to \"$arch1\"\." \
 	"set architecture $arch1"
 
 gdb_test_no_output "set disassembler-options"
@@ -47,7 +47,7 @@ gdb_test "show disassembler-options" \
 # Change architectures and verify the disassembler options have been preserved.
 
 gdb_test "set architecture $arch2" \
-	"The target architecture is set to \"$arch2\"" \
+	"The target architecture is set to \"$arch2\"\." \
 	"set architecture $arch2"
 
 gdb_test "show disassembler-options" \

-- 
Alan Modra
Australia Development Lab, IBM

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

* Re: gdb: Improve formatting of 'show architecture' messages
  2020-10-12  7:46 gdb: Improve formatting of 'show architecture' messages Alan Modra
@ 2020-10-12 13:53 ` Tom Tromey
  2020-10-12 14:30 ` Andrew Burgess
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2020-10-12 13:53 UTC (permalink / raw)
  To: Alan Modra via Gdb-patches; +Cc: Alan Modra

>>>>> "Alan" == Alan Modra via Gdb-patches <gdb-patches@sourceware.org> writes:

Alan> Commit ccb9eba6a25 updated the testsuite for some targets without
Alan> running the testsuite on those targets.  This patch corrects the
Alan> update, in most cases just adding the expected full-stop.

Alan> On powerpc64le-linux, fixes these:
Alan> FAIL: gdb.arch/powerpc-d128-regs.exp: checking for PPC arch
Alan> FAIL: gdb.arch/powerpc-disassembler-options.exp: set architecture powerpc:common64
Alan> FAIL: gdb.arch/powerpc-disassembler-options.exp: set architecture rs6000:6000
Alan> FAIL: gdb.arch/ppc64-symtab-cordic.exp: show architecture

Alan> I also verified that arm-linuxeabi and s390x-linux cross-builds now
Alan> pass their disassembler-options.exp tests.

Alan> OK to apply?

Yes, thank you.  Perhaps this should be cherry-picked to the gdb 10
branch as well.

Tom

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

* Re: gdb: Improve formatting of 'show architecture' messages
  2020-10-12  7:46 gdb: Improve formatting of 'show architecture' messages Alan Modra
  2020-10-12 13:53 ` Tom Tromey
@ 2020-10-12 14:30 ` Andrew Burgess
  2020-10-12 22:11   ` Alan Modra
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Burgess @ 2020-10-12 14:30 UTC (permalink / raw)
  To: Alan Modra; +Cc: gdb-patches

* Alan Modra via Gdb-patches <gdb-patches@sourceware.org> [2020-10-12 18:16:05 +1030]:

> Commit ccb9eba6a25 updated the testsuite for some targets without
> running the testsuite on those targets.  This patch corrects the
> update, in most cases just adding the expected full-stop.
> 
> On powerpc64le-linux, fixes these:
> FAIL: gdb.arch/powerpc-d128-regs.exp: checking for PPC arch
> FAIL: gdb.arch/powerpc-disassembler-options.exp: set architecture powerpc:common64
> FAIL: gdb.arch/powerpc-disassembler-options.exp: set architecture rs6000:6000
> FAIL: gdb.arch/ppc64-symtab-cordic.exp: show architecture
> 
> I also verified that arm-linuxeabi and s390x-linux cross-builds now
> pass their disassembler-options.exp tests.
> 
> OK to apply?
> 
> 	* testsuite/gdb.arch/arm-disassembler-options.exp: Adjust expected
> 	"target architecture" output.
> 	* testsuite/gdb.arch/powerpc-d128-regs.exp: Likewise.
> 	* testsuite/gdb.arch/powerpc-disassembler-options.exp: Likewise.
> 	* testsuite/gdb.arch/ppc64-symtab-cordic.exp: Likewise.
> 	* testsuite/gdb.arch/s390-disassembler-options.exp: Likewise.

Remember these entries should be in gdb/testsuite/ChangeLog, and
should not have 'testsuite/' at the start.

Thanks,
Andrew


> 
> diff --git a/gdb/testsuite/gdb.arch/arm-disassembler-options.exp b/gdb/testsuite/gdb.arch/arm-disassembler-options.exp
> index ac1d8a8bda..a3c0c0e5f8 100644
> --- a/gdb/testsuite/gdb.arch/arm-disassembler-options.exp
> +++ b/gdb/testsuite/gdb.arch/arm-disassembler-options.exp
> @@ -31,7 +31,7 @@ set arch1 "armv2"
>  set arch2 "armv5"
>  
>  gdb_test "set architecture $arch1" \
> -	"The target architecture is set to \"$arch1\"" \
> +	"The target architecture is set to \"$arch1\"\." \
>  	"set architecture $arch1"
>  
>  gdb_test_no_output "set disassembler-options"
> @@ -47,7 +47,7 @@ gdb_test "show disassembler-options" \
>  # Change architectures and verify the disassembler options have been preserved.
>  
>  gdb_test "set architecture $arch2" \
> -	"The target architecture is set to \"$arch2\"" \
> +	"The target architecture is set to \"$arch2\"\." \
>  	"set architecture $arch2"
>  
>  gdb_test "show disassembler-options" \
> diff --git a/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp b/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp
> index e7bbccb271..cd96029fe8 100644
> --- a/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp
> +++ b/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp
> @@ -44,7 +44,7 @@ if { ![runto main] } then {
>     return
>  }
>  
> -if [gdb_test "show arch" ".*currently powerpc:common.*" "checking for PPC arch"] {
> +if [gdb_test "show arch" ".*powerpc:common.*" "checking for PPC arch"] {
>      return -1
>  }
>  
> diff --git a/gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp b/gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp
> index 68d9bf61e1..9b3f8309fe 100644
> --- a/gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp
> +++ b/gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp
> @@ -31,7 +31,7 @@ set arch1 "rs6000:6000"
>  set arch2 "powerpc:common64"
>  
>  gdb_test "set architecture $arch1" \
> -	"The target architecture is set to \"$arch1\"" \
> +	"The target architecture is set to \"$arch1\"\." \
>  	"set architecture $arch1"
>  
>  gdb_test_no_output "set disassembler-options"
> @@ -47,7 +47,7 @@ gdb_test "show disassembler-options" \
>  # Change architectures and verify the disassembler options have been preserved.
>  
>  gdb_test "set architecture $arch2" \
> -	"The target architecture is set to \"$arch2\"" \
> +	"The target architecture is set to \"$arch2\"\." \
>  	"set architecture $arch2"
>  
>  gdb_test "show disassembler-options" \
> diff --git a/gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp b/gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp
> index fa5bff9ceb..a1fa5ffabe 100644
> --- a/gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp
> +++ b/gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp
> @@ -47,10 +47,10 @@ gdb_load ${kofile}
>  
>  set test "show architecture"
>  gdb_test_multiple $test $test {
> -    -re "\r\nThe target architecture is set to \"auto\" \\(currently \"powerpc:common64\"\\)\r\n$gdb_prompt $" {
> +    -re "\r\nThe target architecture is set to \"auto\" \\(currently \"powerpc:common64\"\\)\.\r\n$gdb_prompt $" {
>  	pass $test
>      }
> -    -re "\r\nThe target architecture is set to \"auto\" \\(currently \".*\"\\)\r\n$gdb_prompt $" {
> +    -re "\r\nThe target architecture is set to \"auto\" \\(currently \".*\"\\)\.\r\n$gdb_prompt $" {
>  	untested "powerpc:common64 is not supported"
>      }
>  }
> diff --git a/gdb/testsuite/gdb.arch/s390-disassembler-options.exp b/gdb/testsuite/gdb.arch/s390-disassembler-options.exp
> index a9ae230aa0..16e7cd18d7 100644
> --- a/gdb/testsuite/gdb.arch/s390-disassembler-options.exp
> +++ b/gdb/testsuite/gdb.arch/s390-disassembler-options.exp
> @@ -31,7 +31,7 @@ set arch1 "s390:64-bit"
>  set arch2 "s390:31-bit"
>  
>  gdb_test "set architecture $arch1" \
> -	"The target architecture is set to \"$arch1\"" \
> +	"The target architecture is set to \"$arch1\"\." \
>  	"set architecture $arch1"
>  
>  gdb_test_no_output "set disassembler-options"
> @@ -47,7 +47,7 @@ gdb_test "show disassembler-options" \
>  # Change architectures and verify the disassembler options have been preserved.
>  
>  gdb_test "set architecture $arch2" \
> -	"The target architecture is set to \"$arch2\"" \
> +	"The target architecture is set to \"$arch2\"\." \
>  	"set architecture $arch2"
>  
>  gdb_test "show disassembler-options" \
> 
> -- 
> Alan Modra
> Australia Development Lab, IBM

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

* Re: gdb: Improve formatting of 'show architecture' messages
  2020-10-12 14:30 ` Andrew Burgess
@ 2020-10-12 22:11   ` Alan Modra
  0 siblings, 0 replies; 4+ messages in thread
From: Alan Modra @ 2020-10-12 22:11 UTC (permalink / raw)
  To: Andrew Burgess; +Cc: gdb-patches

On Mon, Oct 12, 2020 at 03:30:49PM +0100, Andrew Burgess wrote:
> > 	* testsuite/gdb.arch/arm-disassembler-options.exp: Adjust expected
> > 	"target architecture" output.
> > 	* testsuite/gdb.arch/powerpc-d128-regs.exp: Likewise.
> > 	* testsuite/gdb.arch/powerpc-disassembler-options.exp: Likewise.
> > 	* testsuite/gdb.arch/ppc64-symtab-cordic.exp: Likewise.
> > 	* testsuite/gdb.arch/s390-disassembler-options.exp: Likewise.
> 
> Remember these entries should be in gdb/testsuite/ChangeLog, and
> should not have 'testsuite/' at the start.

Nowadays I tend to write ChangeLog entries in my local git commit log,
and only copy to a ChangeLog file when committing.  Which I do by
opening the first file changed, and hitting Ctrl-X,4,a in emacs.  If I
was awake properly I likely would have caught the error before
committing, but thanks for the reminder, mistakes happen!  Committed.

-- 
Alan Modra
Australia Development Lab, IBM

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

end of thread, other threads:[~2020-10-12 22:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-12  7:46 gdb: Improve formatting of 'show architecture' messages Alan Modra
2020-10-12 13:53 ` Tom Tromey
2020-10-12 14:30 ` Andrew Burgess
2020-10-12 22:11   ` Alan Modra

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).