public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH, GDB/ARM] Expect prompt after no FPU warning
@ 2017-05-17  9:13 Thomas Preudhomme
  2017-05-17 12:10 ` Yao Qi
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Preudhomme @ 2017-05-17  9:13 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 678 bytes --]

Hi,

The expected output for info float when the ARM target has no FPU does
not include the GDB prompt. This occasionally cause a test failure in
the following "finish" test when the prompt happens after the test has been
marked as PASSed, since it does not match the expected output.

This patch adds the GDB prompt to the expected output of the no FPU
regular expression.

ChangeLog entry is as follows:

*** gdb/testsuite/ChangeLog ***

2017-04-27  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* gdb.base/float.exp (info float): Expect GDB prompt for ARM
	targets without FPU.

Testing: test PASSes with that patch.

Is this ok for master branch?

Best regards,

Thomas

[-- Attachment #2: nofloat_gdb_tests_expect_prompt.patch --]
[-- Type: text/x-patch, Size: 577 bytes --]

diff --git a/gdb/testsuite/gdb.base/float.exp b/gdb/testsuite/gdb.base/float.exp
index a4762c9742682391074f0707e56a6eae4cd70c6e..4f928c19491f55b235aaf68a4c9351531440aa4e 100644
--- a/gdb/testsuite/gdb.base/float.exp
+++ b/gdb/testsuite/gdb.base/float.exp
@@ -50,7 +50,7 @@ if { [is_aarch64_target] } then {
 	    # if we have NEON.
 	    pass "info float (VFP)"
 	}
-        -re "No floating.point info available for this processor.*" {
+        -re "No floating.point info available for this processor.*$gdb_prompt $" {
             pass "info float (without FPU)"
 	}
     }

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

* Re: [PATCH, GDB/ARM] Expect prompt after no FPU warning
  2017-05-17  9:13 [PATCH, GDB/ARM] Expect prompt after no FPU warning Thomas Preudhomme
@ 2017-05-17 12:10 ` Yao Qi
  2017-05-17 12:20   ` Thomas Preudhomme
  0 siblings, 1 reply; 7+ messages in thread
From: Yao Qi @ 2017-05-17 12:10 UTC (permalink / raw)
  To: Thomas Preudhomme; +Cc: gdb-patches

Thomas Preudhomme <thomas.preudhomme@foss.arm.com> writes:

> 2017-04-27  Thomas Preud'homme  <thomas.preudhomme@arm.com>
>
> 	* gdb.base/float.exp (info float): Expect GDB prompt for ARM

Remove " (info float)".

> 	targets without FPU.
>


> @@ -50,7 +50,7 @@ if { [is_aarch64_target] } then {
>  	    # if we have NEON.
>  	    pass "info float (VFP)"
>  	}
> -        -re "No floating.point info available for this processor.*" {
> +        -re "No floating.point info available for this processor.*$gdb_prompt $" {

The fix is right but it can be applied to all archs which may not have
FPU.  If you search "N floating.point info", you can find multiple hits.
$gdb_prompt is needed for all of them.

-- 
Yao (齐尧)

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

* Re: [PATCH, GDB/ARM] Expect prompt after no FPU warning
  2017-05-17 12:10 ` Yao Qi
@ 2017-05-17 12:20   ` Thomas Preudhomme
  2017-05-17 12:53     ` [PATCH, GDB] " Thomas Preudhomme
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Preudhomme @ 2017-05-17 12:20 UTC (permalink / raw)
  To: Yao Qi; +Cc: gdb-patches



On 17/05/17 13:10, Yao Qi wrote:
> Thomas Preudhomme <thomas.preudhomme@foss.arm.com> writes:
>
>> 2017-04-27  Thomas Preud'homme  <thomas.preudhomme@arm.com>
>>
>> 	* gdb.base/float.exp (info float): Expect GDB prompt for ARM
>
> Remove " (info float)".
>
>> 	targets without FPU.
>>
>
>
>> @@ -50,7 +50,7 @@ if { [is_aarch64_target] } then {
>>  	    # if we have NEON.
>>  	    pass "info float (VFP)"
>>  	}
>> -        -re "No floating.point info available for this processor.*" {
>> +        -re "No floating.point info available for this processor.*$gdb_prompt $" {
>
> The fix is right but it can be applied to all archs which may not have
> FPU.  If you search "N floating.point info", you can find multiple hits.
> $gdb_prompt is needed for all of them.

Err yes sorry, I didn't add it because I only tested on ARM. I'll update the 
patch. Thanks!

Best regards,

Thomas

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

* Re: [PATCH, GDB] Expect prompt after no FPU warning
  2017-05-17 12:20   ` Thomas Preudhomme
@ 2017-05-17 12:53     ` Thomas Preudhomme
  2017-05-17 13:34       ` Yao Qi
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Preudhomme @ 2017-05-17 12:53 UTC (permalink / raw)
  To: Yao Qi; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 1697 bytes --]

Hi,

The expected output for info float when the target has no FPU does
not include the GDB prompt. This occasionally cause a test failure in
the following "finish" test when the prompt happens after the test has been
marked as PASSed, since it does not match the expected output.

This patch adds the GDB prompt to the expected output of the no FPU
regular expression.

ChangeLog entry is as follows:

*** gdb/testsuite/ChangeLog ***

2017-04-27  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* gdb.base/float.exp: Expect GDB prompt for targets without FPU.

Testing: test PASSes with that patch on arm-none-eabi target.

Is this ok for master branch and GDB 8 (after a 1 week period)?

Best regards,

Thomas

On 17/05/17 13:20, Thomas Preudhomme wrote:
>
>
> On 17/05/17 13:10, Yao Qi wrote:
>> Thomas Preudhomme <thomas.preudhomme@foss.arm.com> writes:
>>
>>> 2017-04-27  Thomas Preud'homme  <thomas.preudhomme@arm.com>
>>>
>>>     * gdb.base/float.exp (info float): Expect GDB prompt for ARM
>>
>> Remove " (info float)".
>>
>>>     targets without FPU.
>>>
>>
>>
>>> @@ -50,7 +50,7 @@ if { [is_aarch64_target] } then {
>>>          # if we have NEON.
>>>          pass "info float (VFP)"
>>>      }
>>> -        -re "No floating.point info available for this processor.*" {
>>> +        -re "No floating.point info available for this
>>> processor.*$gdb_prompt $" {
>>
>> The fix is right but it can be applied to all archs which may not have
>> FPU.  If you search "N floating.point info", you can find multiple hits.
>> $gdb_prompt is needed for all of them.
>
> Err yes sorry, I didn't add it because I only tested on ARM. I'll update the
> patch. Thanks!
>
> Best regards,
>
> Thomas

[-- Attachment #2: nofloat_gdb_tests_expect_prompt.patch --]
[-- Type: text/x-patch, Size: 2414 bytes --]

diff --git a/gdb/testsuite/gdb.base/float.exp b/gdb/testsuite/gdb.base/float.exp
index a4762c9742682391074f0707e56a6eae4cd70c6e..956bbf752b72e105f36cbfbda369c77a71979708 100644
--- a/gdb/testsuite/gdb.base/float.exp
+++ b/gdb/testsuite/gdb.base/float.exp
@@ -50,7 +50,7 @@ if { [is_aarch64_target] } then {
 	    # if we have NEON.
 	    pass "info float (VFP)"
 	}
-        -re "No floating.point info available for this processor.*" {
+        -re "No floating.point info available for this processor.*$gdb_prompt $" {
             pass "info float (without FPU)"
 	}
     }
@@ -63,7 +63,7 @@ if { [is_aarch64_target] } then {
         -re "fp0.*fp1.*fp7.*$gdb_prompt $" {
             pass "info float (with FPU)"
 	}
-        -re "No floating.point info available for this processor.*" {
+        -re "No floating.point info available for this processor.*$gdb_prompt $" {
             pass "info float (without FPU)"
 	}
     }
@@ -81,7 +81,7 @@ if { [is_aarch64_target] } then {
         -re "fd0.*fd3.*$gdb_prompt $" {
             pass "info float (with FPU)"
 	}
-        -re "No floating.point info available for this processor.*" {
+        -re "No floating.point info available for this processor.*$gdb_prompt $" {
             pass "info float (without FPU)"
 	}
     }
@@ -90,7 +90,7 @@ if { [is_aarch64_target] } then {
         -re "f0.*f1.*f31.*fpscr.*$gdb_prompt $" {
             pass "info float (with FPU)"
 	}
-        -re "No floating.point info available for this processor.*" {
+        -re "No floating.point info available for this processor.*$gdb_prompt $" {
             pass "info float (without FPU)"
 	}
     }
@@ -102,7 +102,7 @@ if { [is_aarch64_target] } then {
 	-re "fpul.*fr0.*fr1.*fr15.*$gdb_prompt $" {
 	      pass "info float (with FPU)"
 	  }
-	-re "No floating.point info available for this processor.*" {
+        -re "No floating.point info available for this processor.*$gdb_prompt $" {
 	      pass "info float (without FPU)"
 	}
     }
@@ -111,7 +111,7 @@ if { [is_aarch64_target] } then {
 } elseif [istarget "sparc*-*-*"] then {
     gdb_test "info float" "f0.*f1.*f31.*d0.*d30.*" "info float"
 } else {
-    gdb_test "info float" "No floating.point info available for this processor." "info float (unknown target)"
+    gdb_test "info float" "No floating.point info available for this processor.*$gdb_prompt $" "info float (unknown target)"
 }
 
 gdb_test "step"

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

* Re: [PATCH, GDB] Expect prompt after no FPU warning
  2017-05-17 12:53     ` [PATCH, GDB] " Thomas Preudhomme
@ 2017-05-17 13:34       ` Yao Qi
  2017-05-17 14:49         ` Thomas Preudhomme
  2017-05-18 15:46         ` Thomas Preudhomme
  0 siblings, 2 replies; 7+ messages in thread
From: Yao Qi @ 2017-05-17 13:34 UTC (permalink / raw)
  To: Thomas Preudhomme; +Cc: gdb-patches

Thomas Preudhomme <thomas.preudhomme@foss.arm.com> writes:

> Is this ok for master branch and GDB 8 (after a 1 week period)?
>

Patch is good to me, one comment below.

GDB 8 will be released soon, so it is good to have this patch in 8.0.
This patch is about test case, so it should be safe to merge it to 8.0
branch now.

> -    gdb_test "info float" "No floating.point info available for this processor." "info float (unknown target)"
> +    gdb_test "info float" "No floating.point info available for this processor.*$gdb_prompt $" "info float (unknown target)"
>  }

This change is not needed, because $gdb_prompt is appended in the
pattern inside of gdb_test.

-- 
Yao (齐尧)

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

* Re: [PATCH, GDB] Expect prompt after no FPU warning
  2017-05-17 13:34       ` Yao Qi
@ 2017-05-17 14:49         ` Thomas Preudhomme
  2017-05-18 15:46         ` Thomas Preudhomme
  1 sibling, 0 replies; 7+ messages in thread
From: Thomas Preudhomme @ 2017-05-17 14:49 UTC (permalink / raw)
  To: Yao Qi; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 786 bytes --]

Ok to apply the attached patch then?

Best regards,

Thomas

On 17/05/17 14:34, Yao Qi wrote:
> Thomas Preudhomme <thomas.preudhomme@foss.arm.com> writes:
>
>> Is this ok for master branch and GDB 8 (after a 1 week period)?
>>
>
> Patch is good to me, one comment below.
>
> GDB 8 will be released soon, so it is good to have this patch in 8.0.
> This patch is about test case, so it should be safe to merge it to 8.0
> branch now.
>
>> -    gdb_test "info float" "No floating.point info available for this processor." "info float (unknown target)"
>> +    gdb_test "info float" "No floating.point info available for this processor.*$gdb_prompt $" "info float (unknown target)"
>>  }
>
> This change is not needed, because $gdb_prompt is appended in the
> pattern inside of gdb_test.
>

[-- Attachment #2: nofloat_gdb_tests_expect_prompt.patch --]
[-- Type: text/x-patch, Size: 1984 bytes --]

diff --git a/gdb/testsuite/gdb.base/float.exp b/gdb/testsuite/gdb.base/float.exp
index a4762c9742682391074f0707e56a6eae4cd70c6e..a5d2ffcd4ce7ea306a24f9c6f055c2bbe43f6303 100644
--- a/gdb/testsuite/gdb.base/float.exp
+++ b/gdb/testsuite/gdb.base/float.exp
@@ -50,7 +50,7 @@ if { [is_aarch64_target] } then {
 	    # if we have NEON.
 	    pass "info float (VFP)"
 	}
-        -re "No floating.point info available for this processor.*" {
+        -re "No floating.point info available for this processor.*$gdb_prompt $" {
             pass "info float (without FPU)"
 	}
     }
@@ -63,7 +63,7 @@ if { [is_aarch64_target] } then {
         -re "fp0.*fp1.*fp7.*$gdb_prompt $" {
             pass "info float (with FPU)"
 	}
-        -re "No floating.point info available for this processor.*" {
+        -re "No floating.point info available for this processor.*$gdb_prompt $" {
             pass "info float (without FPU)"
 	}
     }
@@ -81,7 +81,7 @@ if { [is_aarch64_target] } then {
         -re "fd0.*fd3.*$gdb_prompt $" {
             pass "info float (with FPU)"
 	}
-        -re "No floating.point info available for this processor.*" {
+        -re "No floating.point info available for this processor.*$gdb_prompt $" {
             pass "info float (without FPU)"
 	}
     }
@@ -90,7 +90,7 @@ if { [is_aarch64_target] } then {
         -re "f0.*f1.*f31.*fpscr.*$gdb_prompt $" {
             pass "info float (with FPU)"
 	}
-        -re "No floating.point info available for this processor.*" {
+        -re "No floating.point info available for this processor.*$gdb_prompt $" {
             pass "info float (without FPU)"
 	}
     }
@@ -102,7 +102,7 @@ if { [is_aarch64_target] } then {
 	-re "fpul.*fr0.*fr1.*fr15.*$gdb_prompt $" {
 	      pass "info float (with FPU)"
 	  }
-	-re "No floating.point info available for this processor.*" {
+        -re "No floating.point info available for this processor.*$gdb_prompt $" {
 	      pass "info float (without FPU)"
 	}
     }

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

* Re: [PATCH, GDB] Expect prompt after no FPU warning
  2017-05-17 13:34       ` Yao Qi
  2017-05-17 14:49         ` Thomas Preudhomme
@ 2017-05-18 15:46         ` Thomas Preudhomme
  1 sibling, 0 replies; 7+ messages in thread
From: Thomas Preudhomme @ 2017-05-18 15:46 UTC (permalink / raw)
  To: Yao Qi; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 868 bytes --]

FYI

On 17/05/17 14:34, Yao Qi wrote:
> Thomas Preudhomme <thomas.preudhomme@foss.arm.com> writes:
>
>> Is this ok for master branch and GDB 8 (after a 1 week period)?
>>
>
> Patch is good to me, one comment below.
>
> GDB 8 will be released soon, so it is good to have this patch in 8.0.
> This patch is about test case, so it should be safe to merge it to 8.0
> branch now.
>
>> -    gdb_test "info float" "No floating.point info available for this processor." "info float (unknown target)"
>> +    gdb_test "info float" "No floating.point info available for this processor.*$gdb_prompt $" "info float (unknown target)"
>>  }
>
> This change is not needed, because $gdb_prompt is appended in the
> pattern inside of gdb_test.
>

Alright, pushed the attached patch which also fix a spurious codestyle change 
(tab - space) to master and GDB 8.

Best regards,

Thomas

[-- Attachment #2: nofloat_gdb_tests_expect_prompt.patch --]
[-- Type: text/x-patch, Size: 1977 bytes --]

diff --git a/gdb/testsuite/gdb.base/float.exp b/gdb/testsuite/gdb.base/float.exp
index a4762c9742682391074f0707e56a6eae4cd70c6e..e09c124b8825d687cd0bac9f363b0b61b0ed9230 100644
--- a/gdb/testsuite/gdb.base/float.exp
+++ b/gdb/testsuite/gdb.base/float.exp
@@ -50,7 +50,7 @@ if { [is_aarch64_target] } then {
 	    # if we have NEON.
 	    pass "info float (VFP)"
 	}
-        -re "No floating.point info available for this processor.*" {
+        -re "No floating.point info available for this processor.*$gdb_prompt $" {
             pass "info float (without FPU)"
 	}
     }
@@ -63,7 +63,7 @@ if { [is_aarch64_target] } then {
         -re "fp0.*fp1.*fp7.*$gdb_prompt $" {
             pass "info float (with FPU)"
 	}
-        -re "No floating.point info available for this processor.*" {
+        -re "No floating.point info available for this processor.*$gdb_prompt $" {
             pass "info float (without FPU)"
 	}
     }
@@ -81,7 +81,7 @@ if { [is_aarch64_target] } then {
         -re "fd0.*fd3.*$gdb_prompt $" {
             pass "info float (with FPU)"
 	}
-        -re "No floating.point info available for this processor.*" {
+        -re "No floating.point info available for this processor.*$gdb_prompt $" {
             pass "info float (without FPU)"
 	}
     }
@@ -90,7 +90,7 @@ if { [is_aarch64_target] } then {
         -re "f0.*f1.*f31.*fpscr.*$gdb_prompt $" {
             pass "info float (with FPU)"
 	}
-        -re "No floating.point info available for this processor.*" {
+        -re "No floating.point info available for this processor.*$gdb_prompt $" {
             pass "info float (without FPU)"
 	}
     }
@@ -102,7 +102,7 @@ if { [is_aarch64_target] } then {
 	-re "fpul.*fr0.*fr1.*fr15.*$gdb_prompt $" {
 	      pass "info float (with FPU)"
 	  }
-	-re "No floating.point info available for this processor.*" {
+	-re "No floating.point info available for this processor.*$gdb_prompt $" {
 	      pass "info float (without FPU)"
 	}
     }

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

end of thread, other threads:[~2017-05-18 15:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-17  9:13 [PATCH, GDB/ARM] Expect prompt after no FPU warning Thomas Preudhomme
2017-05-17 12:10 ` Yao Qi
2017-05-17 12:20   ` Thomas Preudhomme
2017-05-17 12:53     ` [PATCH, GDB] " Thomas Preudhomme
2017-05-17 13:34       ` Yao Qi
2017-05-17 14:49         ` Thomas Preudhomme
2017-05-18 15:46         ` Thomas Preudhomme

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