From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id D903E3857C4E; Fri, 15 Apr 2022 14:53:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D903E3857C4E Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom de Vries To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Fix gdb.go/methods.exp with check-readmore X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: 64bc82adf32f74d2d11aff6c8bf8690775491e91 X-Git-Newrev: 552a161c8d9305aa1b6017de5bd5d9a4da55ea02 Message-Id: <20220415145312.D903E3857C4E@sourceware.org> Date: Fri, 15 Apr 2022 14:53:12 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2022 14:53:13 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D552a161c8d93= 05aa1b6017de5bd5d9a4da55ea02 commit 552a161c8d9305aa1b6017de5bd5d9a4da55ea02 Author: Tom de Vries Date: Fri Apr 15 16:53:08 2022 +0200 [gdb/testsuite] Fix gdb.go/methods.exp with check-readmore =20 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 ... =20 This happens because this gdb_test_multiple "maintenance print symbols" regexp: ... -re "\r\n$gdb_prompt $" { ... matches the entire command output. =20 Fix this by adding the missing ^ at the regexp start. =20 Tested on x86_64-linux. =20 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29064 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/method= s.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\]*(?=3D\r\n)" { exp_continue } - -re "\r\n$gdb_prompt $" { + -re "^\r\n$gdb_prompt $" { pass $gdb_test_name } -re "\r\n\[^\r\n\]*(?=3D\r\n)" {