]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/testsuite/ChangeLog
gdb.base/interrupt.exp: Fix race
authorPedro Alves <palves@redhat.com>
Tue, 7 Apr 2015 17:19:29 +0000 (18:19 +0100)
committerPedro Alves <palves@redhat.com>
Tue, 7 Apr 2015 17:19:29 +0000 (18:19 +0100)
commit508a3ddf630dfc6e1fe67e2b117152bd64232226
treefb5cffc281646ba8ab37c997b7f9e6adcb66f0e3
parenta97902de74aba337b2ba28ff8f322f5b4a3602bf
gdb.base/interrupt.exp: Fix race

Working on splitting gdb and inferior output handling in this test, I
noticed a race that happens to be masked out today.

The test sends "a\n" to the inferior, and then inferior echoes back
"a\n".

If expect manages to read only the first "a\r\n" into its buffer, then
this matches:

    -re "^a\r\n(|a\r\n)$" {

and leaves the second "a\r\n" in output.

Then the next test that processes inferior I/O sends "data\n", and expects:

    -re "^(\r\n|)data\r\n(|data\r\n)$"

which fails given the anchor and given "a\r\n" is still in the buffer.

This is masked today because the test relies on inferior I/O being
done on GDB's terminal, and there are tested GDB commands in between,
which consume the "a\r\n" that was left in the output.

We don't support SunOS4 anymore, so just remove the workaround.

gdb/testsuite/ChangeLog
2015-04-07  Pedro Alves  <palves@redhat.com>

* gdb.base/interrupt.exp: Don't handle the case of the inferior
output appearing once only.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/interrupt.exp