public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb/testsuite: fix occasional failure in gdb.mi/mi-multi-commands.exp
@ 2022-05-09 15:57 Andrew Burgess
  0 siblings, 0 replies; only message in thread
From: Andrew Burgess @ 2022-05-09 15:57 UTC (permalink / raw)
  To: gdb-cvs

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

commit 77399b529808626f764bcc347be0d6e8b6b167ce
Author: Andrew Burgess <aburgess@redhat.com>
Date:   Mon May 9 16:49:03 2022 +0100

    gdb/testsuite: fix occasional failure in gdb.mi/mi-multi-commands.exp
    
    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.
    
    The problem that was encountered here is that the output of the first
    command, which looks like this:
    
      ^done,value="\"FIRST COMMAND\""
    
    Is actually produced in parts, first the '^done' is printed, then the
    ',value="\"FIRST COMMAND\"" is printed.
    
    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.
    
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29036

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
 
 	gdb_test_multiple "" "look for first command output, command length $i" -prompt "$mi_gdb_prompt" {
-	    -re "\\^done,value=\"\\\\\"FIRST COMMAND\\\\\"\"" {
+	    -re "\\^done.*,value=\"\\\\\"FIRST COMMAND\\\\\"\"" {
 		set seen_first_message true
 		exp_continue
 	    }


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

only message in thread, other threads:[~2022-05-09 15:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-09 15:57 [binutils-gdb] gdb/testsuite: fix occasional failure in gdb.mi/mi-multi-commands.exp Andrew Burgess

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