public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Fix gdb.go/methods.exp with check-readmore
@ 2022-04-15 14:53 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2022-04-15 14:53 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=552a161c8d9305aa1b6017de5bd5d9a4da55ea02

commit 552a161c8d9305aa1b6017de5bd5d9a4da55ea02
Author: Tom de Vries <tdevries@suse.de>
Date:   Fri Apr 15 16:53:08 2022 +0200

    [gdb/testsuite] Fix gdb.go/methods.exp with check-readmore
    
    When running test-case gdb.go/methods.exp with make check we have:
    ...
    (gdb) break main.T.Foo^M
    Function "main.T.Foo" not defined.^M
    Make breakpoint pending on future shared library load? (y or [n]) n^M
    (gdb) XFAIL: gdb.go/methods.exp: gdb_breakpoint: set breakpoint at main.T.Foo
    ...
    but with make check-readmore the XFAIL fails to trigger:
    ...
    (gdb) break main.T.Foo^M
    Function "main.T.Foo" not defined.^M
    Make breakpoint pending on future shared library load? (y or [n]) n^M
    (gdb) FAIL: gdb.go/methods.exp: gdb_breakpoint: set breakpoint at main.T.Foo
    ...
    
    This happens because this gdb_test_multiple "maintenance print symbols"
    regexp:
    ...
        -re "\r\n$gdb_prompt $" {
    ...
    matches the entire command output.
    
    Fix this by adding the missing ^ at the regexp start.
    
    Tested on x86_64-linux.
    
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29064

Diff:
---
 gdb/testsuite/gdb.go/methods.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.go/methods.exp b/gdb/testsuite/gdb.go/methods.exp
index aabf1fa5e09..d50fbde122c 100644
--- a/gdb/testsuite/gdb.go/methods.exp
+++ b/gdb/testsuite/gdb.go/methods.exp
@@ -49,7 +49,7 @@ gdb_test_multiple "maintenance print symbols" "" {
     -re "^\r\n void main.T.Bar\[^\r\n\]*(?=\r\n)" {
 	exp_continue
     }
-    -re "\r\n$gdb_prompt $" {
+    -re "^\r\n$gdb_prompt $" {
 	pass $gdb_test_name
     }
     -re "\r\n\[^\r\n\]*(?=\r\n)" {


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-15 14:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-15 14:53 [binutils-gdb] [gdb/testsuite] Fix gdb.go/methods.exp with check-readmore Tom de Vries

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