aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-03-22 10:23:26 +0000
committerAndrew Burgess <aburgess@redhat.com>2022-03-23 14:47:35 +0000
commitb24ae11cd432684feb5ed73f215a36ac89023085 (patch)
treee04a2d0d89f5b31dd38d3aeee1b16b88cda9d21f /bfd
parentfaf5e6ace8c6f82e11ad40393f531123515ce3e6 (diff)
downloadgdb-b24ae11cd432684feb5ed73f215a36ac89023085.zip
gdb-b24ae11cd432684feb5ed73f215a36ac89023085.tar.gz
gdb-b24ae11cd432684feb5ed73f215a36ac89023085.tar.bz2
gdb/testsuite: address test failures in gdb.mi/mi-multi-commands.exp
The gdb.mi/mi-multi-commands.exp test was added in commit: commit d08cbc5d3203118da5583296e49273cf82378042 Date: Wed Dec 22 12:57:44 2021 +0000 gdb: unbuffer all input streams when not using readline And then tweaked in commit: commit 144459531dd68a1287905079aaa131b777a8cc82 Date: Mon Feb 7 20:35:58 2022 +0000 gdb/testsuite: relax pattern in new gdb.mi/mi-multi-commands.exp test The second of these commits was intended to address periodic test failures that I was seeing, and this change did fix some problems, but, unfortunately, introduced other issues. The problem is that the test relies on sending two commands to GDB in a single write. As the characters that make these two commands arrive they are echoed to GDB's console. However, there is a race between how quickly the characters are echoed and how quickly GDB decides to act on the incoming commands. Usually, both commands are echoed in full before GDB acts on the first command, but sometimes this is not the case, and GDB can execute the first command before both commands are fully echoed to the console. In this case, the output of the first command will be mixed in with the echoing of the second command. This mixing of the command echoing and the first command output is what was causing failures in the original version of the test. The second commit relaxed the expected output pattern a little, but was still susceptible to failures, so this commit further relaxes the pattern. Now, we look for the first command output with no regard to what is before, or after the command. Then we look for the first mi prompt to indicate that the first command has completed. I believe that this change should make the test more stable than it was before.
Diffstat (limited to 'bfd')
0 files changed, 0 insertions, 0 deletions