From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1726) id 767DA3858405; Mon, 9 May 2022 15:57:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 767DA3858405 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Andrew Burgess To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: fix occasional failure in gdb.mi/mi-multi-commands.exp X-Act-Checkin: binutils-gdb X-Git-Author: Andrew Burgess X-Git-Refname: refs/heads/master X-Git-Oldrev: f3c75b2cbe88aa1f637d08317614bbeb2cbeecea X-Git-Newrev: 77399b529808626f764bcc347be0d6e8b6b167ce Message-Id: <20220509155739.767DA3858405@sourceware.org> Date: Mon, 9 May 2022 15:57:39 +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: Mon, 09 May 2022 15:57:39 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D77399b529808= 626f764bcc347be0d6e8b6b167ce commit 77399b529808626f764bcc347be0d6e8b6b167ce Author: Andrew Burgess Date: Mon May 9 16:49:03 2022 +0100 gdb/testsuite: fix occasional failure in gdb.mi/mi-multi-commands.exp =20 In bug PR gdb/29036, another failure was reported for the test gdb.mi/mi-multi-commands.exp. This test sends two commands to GDB as a single write, and then checks that both commands are executed. =20 The problem that was encountered here is that the output of the first command, which looks like this: =20 ^done,value=3D"\"FIRST COMMAND\"" =20 Is actually produced in parts, first the '^done' is printed, then the ',value=3D"\"FIRST COMMAND\"" is printed. =20 What was happening is that some characters from the second command were being echoed after the '^done' had been printed, but before the value part had been printed. To avoid this issue I've relaxed the pattern that checks for the first command a little. With this fix in place the occasional failure in this test is no longer showing up. =20 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29036 Diff: --- gdb/testsuite/gdb.mi/mi-multi-commands.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.mi/mi-multi-commands.exp b/gdb/testsuite/gdb= .mi/mi-multi-commands.exp index d00e0aaea8b..58187b15815 100644 --- a/gdb/testsuite/gdb.mi/mi-multi-commands.exp +++ b/gdb/testsuite/gdb.mi/mi-multi-commands.exp @@ -100,7 +100,7 @@ proc run_test { args } { set seen_second_message false =20 gdb_test_multiple "" "look for first command output, command length $i" -= prompt "$mi_gdb_prompt" { - -re "\\^done,value=3D\"\\\\\"FIRST COMMAND\\\\\"\"" { + -re "\\^done.*,value=3D\"\\\\\"FIRST COMMAND\\\\\"\"" { set seen_first_message true exp_continue }