Fix for mi-reverse.exp

Message ID 26afe00657c3b4d44f1c9d858bcc0163000603aa.camel@us.ibm.com
State New
Headers show
Series
  • Fix for mi-reverse.exp
Related show

Commit Message

Tom de Vries via Gdb-patches July 21, 2021, 5:10 p.m.
GDB maintainers:

This test fails on PPC64 because PPC64 prints the value of 3.5 with
more signigicant digits than on Intel. The patch updates the regular
expression to allow for more significant digits on the constant.

This patch was tested on Power 9 and Intel without any regression
errors.

Please let me know if it is acceptable.

                            Carl Love
----------------------------------------------------

On PPC64 prints more significant digits.

gdb/testsuite/ChangeLog
2021-07-20  Carl Love  <cel@us.ibm.com>

	* gdb.mi/gi-reverse.exp: mi_execute_to exec-step reverse add check
	for additional digits.
---
 gdb/testsuite/gdb.mi/mi-reverse.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.17.1

Comments

Andrew Burgess July 21, 2021, 5:46 p.m. | #1
* Carl Love via Gdb-patches <gdb-patches@sourceware.org> [2021-07-21 10:10:54 -0700]:

> 

> GDB maintainers:

> 

> This test fails on PPC64 because PPC64 prints the value of 3.5 with

> more signigicant digits than on Intel. The patch updates the regular

> expression to allow for more significant digits on the constant.

> 

> This patch was tested on Power 9 and Intel without any regression

> errors.

> 

> Please let me know if it is acceptable.

> 

>                             Carl Love

> ----------------------------------------------------

> 

> On PPC64 prints more significant digits.

> 

> gdb/testsuite/ChangeLog

> 2021-07-20  Carl Love  <cel@us.ibm.com>

> 

> 	* gdb.mi/gi-reverse.exp: mi_execute_to exec-step reverse add check

> 	for additional digits.


This makes sense to me.

We're no longer applying ChangeLog entries to the ChangeLog file,
though I believe you are welcome to leave the ChangeLog entry in the
commit message if you like.

If you do, then note you have a type 'gi' -> 'mi' in the above.

I would prefer you use the fuller description (above the -----) as the
commit message instead of the shorter description below the line.

Thanks,
Andrew

> ---

>  gdb/testsuite/gdb.mi/mi-reverse.exp | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/gdb/testsuite/gdb.mi/mi-reverse.exp b/gdb/testsuite/gdb.mi/mi-reverse.exp

> index 0bd126912dc..311a3a433b1 100644

> --- a/gdb/testsuite/gdb.mi/mi-reverse.exp

> +++ b/gdb/testsuite/gdb.mi/mi-reverse.exp

> @@ -111,7 +111,7 @@ proc test_controlled_execution_reverse {} {

>  

>      mi_execute_to "exec-step --reverse" \

>   	"end-stepping-range" "callee1" \

> -	"\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument\.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}" \

> +	"\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument\.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\[0-9\]*\"\}" \

>   	"basics.c" $line_callee1_close "" \

>   	"reverse step to callee1"

>  

> -- 

> 2.17.1

> 

>
Tom de Vries via Gdb-patches July 21, 2021, 6:20 p.m. | #2
Andrew:

OK, I updated the commit message as requested and fixed the typo.

Let me know what you think of the patch now.  Thanks.

                  Carl 
------------------------------------------------------------
Fix for mi-reverse.exp

This test fails on PPC64 because PPC64 prints the value of 3.5 with
more signigicant digits than on Intel. The patch updates the regular
expression to allow for more significant digits on the constant.

gdb/testsuite/ChangeLog
2021-07-20  Carl Love  <cel@us.ibm.com>

	* gdb.mi/mi-reverse.exp: mi_execute_to exec-step reverse add check
	for additional digits.
---
 gdb/testsuite/gdb.mi/mi-reverse.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.mi/mi-reverse.exp b/gdb/testsuite/gdb.mi/mi-reverse.exp
index 0bd126912dc..311a3a433b1 100644
--- a/gdb/testsuite/gdb.mi/mi-reverse.exp
+++ b/gdb/testsuite/gdb.mi/mi-reverse.exp
@@ -111,7 +111,7 @@ proc test_controlled_execution_reverse {} {
 
     mi_execute_to "exec-step --reverse" \
  	"end-stepping-range" "callee1" \
-	"\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument\.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}" \
+	"\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument\.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\[0-9\]*\"\}" \
  	"basics.c" $line_callee1_close "" \
  	"reverse step to callee1"
 
-- 
2.17.1
Andrew Burgess July 26, 2021, 11:26 a.m. | #3
* Carl Love <cel@us.ibm.com> [2021-07-21 11:20:22 -0700]:

> Andrew:

> 

> OK, I updated the commit message as requested and fixed the typo.

> 

> Let me know what you think of the patch now.  Thanks.

> 

>                   Carl 

> ------------------------------------------------------------

> Fix for mi-reverse.exp

> 

> This test fails on PPC64 because PPC64 prints the value of 3.5 with

> more signigicant digits than on Intel. The patch updates the regular

> expression to allow for more significant digits on the constant.

> 

> gdb/testsuite/ChangeLog

> 2021-07-20  Carl Love  <cel@us.ibm.com>

> 

> 	* gdb.mi/mi-reverse.exp: mi_execute_to exec-step reverse add check

> 	for additional digits.

> ---

>  gdb/testsuite/gdb.mi/mi-reverse.exp | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/gdb/testsuite/gdb.mi/mi-reverse.exp b/gdb/testsuite/gdb.mi/mi-reverse.exp

> index 0bd126912dc..311a3a433b1 100644

> --- a/gdb/testsuite/gdb.mi/mi-reverse.exp

> +++ b/gdb/testsuite/gdb.mi/mi-reverse.exp

> @@ -111,7 +111,7 @@ proc test_controlled_execution_reverse {} {

>  

>      mi_execute_to "exec-step --reverse" \

>   	"end-stepping-range" "callee1" \

> -	"\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument\.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}" \

> +	"\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument\.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\[0-9\]*\"\}" \

>   	"basics.c" $line_callee1_close "" \

>   	"reverse step to callee1"


LGTM.

Thanks,
Andrew

Patch

diff --git a/gdb/testsuite/gdb.mi/mi-reverse.exp b/gdb/testsuite/gdb.mi/mi-reverse.exp
index 0bd126912dc..311a3a433b1 100644
--- a/gdb/testsuite/gdb.mi/mi-reverse.exp
+++ b/gdb/testsuite/gdb.mi/mi-reverse.exp
@@ -111,7 +111,7 @@  proc test_controlled_execution_reverse {} {
 
     mi_execute_to "exec-step --reverse" \
  	"end-stepping-range" "callee1" \
-	"\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument\.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}" \
+	"\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument\.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\[0-9\]*\"\}" \
  	"basics.c" $line_callee1_close "" \
  	"reverse step to callee1"