Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] gdb/testsuite: fix gdb.base/ui-redirect.exp pattern (gdb/26532)
@ 2020-08-25 13:27 Simon Marchi
  2020-08-25 14:35 ` Tom de Vries
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Marchi @ 2020-08-25 13:27 UTC (permalink / raw)
  To: gdb-patches; +Cc: tdevries, Simon Marchi

Commit 1eb8556f5a8b ("gdb: add infrun_debug_printf macro") changed the
debug output format for `set debug infrun 1`.  It broke test
gdb.base/ui-redirect.exp, which I missed:

    FAIL: gdb.base/ui-redirect.exp: debugging: continue

Fix it by adjusting the pattern in the test to the new reality.

gdb/testsuite/ChangeLog:

	PR gdb/26532
	* gdb.base/ui-redirect.exp: Update pattern.

Change-Id: Ie8a8f6675e35a0cab55109b1534b44eb51baec9d
---
 gdb/testsuite/gdb.base/ui-redirect.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.base/ui-redirect.exp b/gdb/testsuite/gdb.base/ui-redirect.exp
index e1e6a7b0a08..ef0a79178c7 100644
--- a/gdb/testsuite/gdb.base/ui-redirect.exp
+++ b/gdb/testsuite/gdb.base/ui-redirect.exp
@@ -117,7 +117,7 @@ with_test_prefix "debugging" {
     gdb_test "set debug infrun 1"
     gdb_test "set logging on" \
     "Copying output to /dev/null.*Copying debug output to /dev/null\\."
-    gdb_test "continue" "Continuing.*infrun:.*infrun:.*Breakpoint \[0-9\]+, foo.*"
+    gdb_test "continue" {Continuing.*\[infrun\] .*\[infrun\] .*Breakpoint [0-9]+, foo.*}
     gdb_test "set debug infrun 0"
     gdb_test "set logging off" "Done logging to /dev/null\\."
     gdb_test "help" "List of classes of commands:.*"
-- 
2.28.0



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

* Re: [PATCH] gdb/testsuite: fix gdb.base/ui-redirect.exp pattern (gdb/26532)
  2020-08-25 13:27 [PATCH] gdb/testsuite: fix gdb.base/ui-redirect.exp pattern (gdb/26532) Simon Marchi
@ 2020-08-25 14:35 ` Tom de Vries
  2020-08-25 14:49   ` Simon Marchi
  0 siblings, 1 reply; 5+ messages in thread
From: Tom de Vries @ 2020-08-25 14:35 UTC (permalink / raw)
  To: Simon Marchi, gdb-patches

On 8/25/20 3:27 PM, Simon Marchi wrote:
> Commit 1eb8556f5a8b ("gdb: add infrun_debug_printf macro") changed the
> debug output format for `set debug infrun 1`.  It broke test
> gdb.base/ui-redirect.exp, which I missed:
> 
>     FAIL: gdb.base/ui-redirect.exp: debugging: continue
> 

How about the other fail:
...
FAIL: gdb.threads/stepi-random-signal.exp: stepi (no random signal)
...

?

Thanks,
- Tom

> Fix it by adjusting the pattern in the test to the new reality.
> 
> gdb/testsuite/ChangeLog:
> 
> 	PR gdb/26532
> 	* gdb.base/ui-redirect.exp: Update pattern.
> 
> Change-Id: Ie8a8f6675e35a0cab55109b1534b44eb51baec9d
> ---
>  gdb/testsuite/gdb.base/ui-redirect.exp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gdb/testsuite/gdb.base/ui-redirect.exp b/gdb/testsuite/gdb.base/ui-redirect.exp
> index e1e6a7b0a08..ef0a79178c7 100644
> --- a/gdb/testsuite/gdb.base/ui-redirect.exp
> +++ b/gdb/testsuite/gdb.base/ui-redirect.exp
> @@ -117,7 +117,7 @@ with_test_prefix "debugging" {
>      gdb_test "set debug infrun 1"
>      gdb_test "set logging on" \
>      "Copying output to /dev/null.*Copying debug output to /dev/null\\."
> -    gdb_test "continue" "Continuing.*infrun:.*infrun:.*Breakpoint \[0-9\]+, foo.*"
> +    gdb_test "continue" {Continuing.*\[infrun\] .*\[infrun\] .*Breakpoint [0-9]+, foo.*}
>      gdb_test "set debug infrun 0"
>      gdb_test "set logging off" "Done logging to /dev/null\\."
>      gdb_test "help" "List of classes of commands:.*"
> 


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

* Re: [PATCH] gdb/testsuite: fix gdb.base/ui-redirect.exp pattern (gdb/26532)
  2020-08-25 14:35 ` Tom de Vries
@ 2020-08-25 14:49   ` Simon Marchi
  2020-08-25 14:55     ` Tom de Vries
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Marchi @ 2020-08-25 14:49 UTC (permalink / raw)
  To: Tom de Vries, gdb-patches

On 2020-08-25 10:35 a.m., Tom de Vries wrote:
> On 8/25/20 3:27 PM, Simon Marchi wrote:
>> Commit 1eb8556f5a8b ("gdb: add infrun_debug_printf macro") changed the
>> debug output format for `set debug infrun 1`.  It broke test
>> gdb.base/ui-redirect.exp, which I missed:
>>
>>     FAIL: gdb.base/ui-redirect.exp: debugging: continue
>>
> 
> How about the other fail:
> ...
> FAIL: gdb.threads/stepi-random-signal.exp: stepi (no random signal)
> ...
> 
> ?

Oh, I missed your second message.  Damn, I updated this test, changed the output format
later and forgot to update the test again.  See patch below.


From fc6c77211da34d18c2285347b6e400a3cd055b9f Mon Sep 17 00:00:00 2001
From: Simon Marchi <simon.marchi@polymtl.ca>
Date: Tue, 25 Aug 2020 10:41:56 -0400
Subject: [PATCH] gdb/testsuite: fix gdb.threads/stepi-random-signal.exp
 pattern

Commit 1eb8556f5a8b ("gdb: add infrun_debug_printf macro") changed the
debug output format for `set debug infrun 1`.  The test
gdb.threads/stepi-random-signal.exp uses that debug output, and was
updated, but not correctly.  It results in this failure:

    FAIL: gdb.threads/stepi-random-signal.exp: stepi (no random signal)

Fix it by adjusting the pattern in the test.

gdb/testsuite/ChangeLog:

	* gdb.threads/stepi-random-signal.exp: Update pattern.

Change-Id: If5fa525e9545e32a286effe6a6184358374bd37c
---
 gdb/testsuite/gdb.threads/stepi-random-signal.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.threads/stepi-random-signal.exp b/gdb/testsuite/gdb.threads/stepi-random-signal.exp
index fa20f38ba61e..9a8b38c2acf5 100644
--- a/gdb/testsuite/gdb.threads/stepi-random-signal.exp
+++ b/gdb/testsuite/gdb.threads/stepi-random-signal.exp
@@ -87,7 +87,7 @@ set seen 0

 set test "stepi"
 if {[gdb_test_multiple "stepi" "$test" {
-    -re "infrun: handle_signal_stop: random signal" {
+    -re {\[infrun\] handle_signal_stop: random signal} {
 	set seen 1
 	exp_continue
     }
-- 
2.28.0




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

* Re: [PATCH] gdb/testsuite: fix gdb.base/ui-redirect.exp pattern (gdb/26532)
  2020-08-25 14:49   ` Simon Marchi
@ 2020-08-25 14:55     ` Tom de Vries
  2020-08-25 15:01       ` Simon Marchi
  0 siblings, 1 reply; 5+ messages in thread
From: Tom de Vries @ 2020-08-25 14:55 UTC (permalink / raw)
  To: Simon Marchi, gdb-patches

On 8/25/20 4:49 PM, Simon Marchi wrote:
> On 2020-08-25 10:35 a.m., Tom de Vries wrote:
>> On 8/25/20 3:27 PM, Simon Marchi wrote:
>>> Commit 1eb8556f5a8b ("gdb: add infrun_debug_printf macro") changed the
>>> debug output format for `set debug infrun 1`.  It broke test
>>> gdb.base/ui-redirect.exp, which I missed:
>>>
>>>     FAIL: gdb.base/ui-redirect.exp: debugging: continue
>>>
>>
>> How about the other fail:
>> ...
>> FAIL: gdb.threads/stepi-random-signal.exp: stepi (no random signal)
>> ...
>>
>> ?
> 
> Oh, I missed your second message.  Damn, I updated this test, changed the output format
> later and forgot to update the test again.>  See patch below.
> 
> 
> From fc6c77211da34d18c2285347b6e400a3cd055b9f Mon Sep 17 00:00:00 2001
> From: Simon Marchi <simon.marchi@polymtl.ca>
> Date: Tue, 25 Aug 2020 10:41:56 -0400
> Subject: [PATCH] gdb/testsuite: fix gdb.threads/stepi-random-signal.exp
>  pattern
> 
> Commit 1eb8556f5a8b ("gdb: add infrun_debug_printf macro") changed the
> debug output format for `set debug infrun 1`.  The test
> gdb.threads/stepi-random-signal.exp uses that debug output, and was
> updated, but not correctly.  It results in this failure:
> 
>     FAIL: gdb.threads/stepi-random-signal.exp: stepi (no random signal)
> 
> Fix it by adjusting the pattern in the test.
> 

Ack, I've tested both patches, and the FAILs are gone.

This patch could also use the PR line, not sure if you want to commit it
separately.

Anyway, LGTM.

Thanks,
- Tom

> gdb/testsuite/ChangeLog:
> 
> 	* gdb.threads/stepi-random-signal.exp: Update pattern.
> 
> Change-Id: If5fa525e9545e32a286effe6a6184358374bd37c
> ---
>  gdb/testsuite/gdb.threads/stepi-random-signal.exp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gdb/testsuite/gdb.threads/stepi-random-signal.exp b/gdb/testsuite/gdb.threads/stepi-random-signal.exp
> index fa20f38ba61e..9a8b38c2acf5 100644
> --- a/gdb/testsuite/gdb.threads/stepi-random-signal.exp
> +++ b/gdb/testsuite/gdb.threads/stepi-random-signal.exp
> @@ -87,7 +87,7 @@ set seen 0
> 
>  set test "stepi"
>  if {[gdb_test_multiple "stepi" "$test" {
> -    -re "infrun: handle_signal_stop: random signal" {
> +    -re {\[infrun\] handle_signal_stop: random signal} {
>  	set seen 1
>  	exp_continue
>      }
> 


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

* Re: [PATCH] gdb/testsuite: fix gdb.base/ui-redirect.exp pattern (gdb/26532)
  2020-08-25 14:55     ` Tom de Vries
@ 2020-08-25 15:01       ` Simon Marchi
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Marchi @ 2020-08-25 15:01 UTC (permalink / raw)
  To: Tom de Vries, Simon Marchi, gdb-patches

On 2020-08-25 10:55 a.m., Tom de Vries wrote:
> Ack, I've tested both patches, and the FAILs are gone.
> 
> This patch could also use the PR line, not sure if you want to commit it
> separately.
> 
> Anyway, LGTM.
> 
> Thanks,
> - Tom

Thanks.  Right, I'll put the PR number too.

Simon


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

end of thread, other threads:[~2020-08-25 15:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-25 13:27 [PATCH] gdb/testsuite: fix gdb.base/ui-redirect.exp pattern (gdb/26532) Simon Marchi
2020-08-25 14:35 ` Tom de Vries
2020-08-25 14:49   ` Simon Marchi
2020-08-25 14:55     ` Tom de Vries
2020-08-25 15:01       ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox