gdb/testsuite: fix regexp in gdb.rocm/watchpoint-at-end-of-shader.exp

Message ID 20260520091346.1332979-1-tankutbaris.aktemur@amd.com
State New
Headers
Series gdb/testsuite: fix regexp in gdb.rocm/watchpoint-at-end-of-shader.exp |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 fail Patch failed to apply

Commit Message

Aktemur, Baris May 20, 2026, 9:13 a.m. UTC
  The following tests fail:

  FAIL: gdb.rocm/watchpoint-at-end-of-shader.exp: precise_memory=on: continue
  FAIL: gdb.rocm/watchpoint-at-end-of-shader.exp: precise_memory=off: continue

The reason is a difference in outputs seen in upstream and downstream
branches.  Fix the regexps to avoid the failures.
---
 gdb/testsuite/gdb.rocm/watchpoint-at-end-of-shader.exp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Lancelot SIX May 20, 2026, 11:13 a.m. UTC | #1
Hi,

Thanks for fixing this.

On 20/05/2026 10:13, Tankut Baris Aktemur wrote:
> The following tests fail:
> 
>    FAIL: gdb.rocm/watchpoint-at-end-of-shader.exp: precise_memory=on: continue
>    FAIL: gdb.rocm/watchpoint-at-end-of-shader.exp: precise_memory=off: continue
> 
> The reason is a difference in outputs seen in upstream and downstream
> branches.  Fix the regexps to avoid the failures.
> ---
>   gdb/testsuite/gdb.rocm/watchpoint-at-end-of-shader.exp | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/gdb/testsuite/gdb.rocm/watchpoint-at-end-of-shader.exp b/gdb/testsuite/gdb.rocm/watchpoint-at-end-of-shader.exp
> index ff233c8b26a..ea88c1269b7 100644
> --- a/gdb/testsuite/gdb.rocm/watchpoint-at-end-of-shader.exp
> +++ b/gdb/testsuite/gdb.rocm/watchpoint-at-end-of-shader.exp
> @@ -71,9 +71,9 @@ proc do_test {precise_memory has_xfail} {
>   	    setup_xfail "*-*-*"
>   	}
>   	gdb_test "continue" \
> -	    [multi_line "Switching to thread $::decimal, lane 0.*" \
> +	    [multi_line "Switching to \[^\r\n\]+(?=\r\n)" \

Wouldn't a simple "$" work rather than the look-ahead "(?=\r\n)"?

Anyway, both should be ok.

Best,
Lancelot.

Approved-by: Lancelot Six <lancelot.six@amd.com> (amdgpu)

>   		"" \
> -		"Thread $::decimal \".*\" hit Hardware watchpoint $::decimal: -location \\*v" \
> +		"Thread $::decimal \[^\r\n\]*hit Hardware watchpoint $::decimal: -location \\*v" \
>   		"" \
>   		"Old value = 64" \
>   		"New value = 8" \
  
Aktemur, Baris May 20, 2026, 11:26 a.m. UTC | #2
AMD General

On Wednesday, May 20, 2026 1:14 PM, Six, Lancelot wrote:
> Hi,
>
> Thanks for fixing this.
>
> On 20/05/2026 10:13, Tankut Baris Aktemur wrote:
> > The following tests fail:
> >
> >    FAIL: gdb.rocm/watchpoint-at-end-of-shader.exp: precise_memory=on: continue
> >    FAIL: gdb.rocm/watchpoint-at-end-of-shader.exp: precise_memory=off: continue
> >
> > The reason is a difference in outputs seen in upstream and downstream
> > branches.  Fix the regexps to avoid the failures.
> > ---
> >   gdb/testsuite/gdb.rocm/watchpoint-at-end-of-shader.exp | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/gdb/testsuite/gdb.rocm/watchpoint-at-end-of-shader.exp
> b/gdb/testsuite/gdb.rocm/watchpoint-at-end-of-shader.exp
> > index ff233c8b26a..ea88c1269b7 100644
> > --- a/gdb/testsuite/gdb.rocm/watchpoint-at-end-of-shader.exp
> > +++ b/gdb/testsuite/gdb.rocm/watchpoint-at-end-of-shader.exp
> > @@ -71,9 +71,9 @@ proc do_test {precise_memory has_xfail} {
> >         setup_xfail "*-*-*"
> >     }
> >     gdb_test "continue" \
> > -       [multi_line "Switching to thread $::decimal, lane 0.*" \
> > +       [multi_line "Switching to \[^\r\n\]+(?=\r\n)" \
>
> Wouldn't a simple "$" work rather than the look-ahead "(?=\r\n)"?

No, not necessarily, because the buffer has more data in it, which we
want to match with the other lines.

>
> Anyway, both should be ok.
>
> Best,
> Lancelot.
>
> Approved-by: Lancelot Six <lancelot.six@amd.com> (amdgpu)

Thank you.  Pushed.

-Baris
  

Patch

diff --git a/gdb/testsuite/gdb.rocm/watchpoint-at-end-of-shader.exp b/gdb/testsuite/gdb.rocm/watchpoint-at-end-of-shader.exp
index ff233c8b26a..ea88c1269b7 100644
--- a/gdb/testsuite/gdb.rocm/watchpoint-at-end-of-shader.exp
+++ b/gdb/testsuite/gdb.rocm/watchpoint-at-end-of-shader.exp
@@ -71,9 +71,9 @@  proc do_test {precise_memory has_xfail} {
 	    setup_xfail "*-*-*"
 	}
 	gdb_test "continue" \
-	    [multi_line "Switching to thread $::decimal, lane 0.*" \
+	    [multi_line "Switching to \[^\r\n\]+(?=\r\n)" \
 		"" \
-		"Thread $::decimal \".*\" hit Hardware watchpoint $::decimal: -location \\*v" \
+		"Thread $::decimal \[^\r\n\]*hit Hardware watchpoint $::decimal: -location \\*v" \
 		"" \
 		"Old value = 64" \
 		"New value = 8" \