aboutsummaryrefslogtreecommitdiff
path: root/gdb/ser-unix.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2014-03-19 15:22:45 +0000
committerPedro Alves <palves@redhat.com>2014-03-19 15:53:00 +0000
commit8bcfb00a77f64a4496de90355f8c46b0da643e84 (patch)
treecc4621eaa37e90ee7ade41f3dfcc6c6a5a74d41f /gdb/ser-unix.c
parent884e37dceb64daa1c6d33f007fb294e809c47847 (diff)
downloadgdb-8bcfb00a77f64a4496de90355f8c46b0da643e84.zip
gdb-8bcfb00a77f64a4496de90355f8c46b0da643e84.tar.gz
gdb-8bcfb00a77f64a4496de90355f8c46b0da643e84.tar.bz2
gdb.base/async.exp: Fix races.
This test is currently racy: PASS: gdb.base/async.exp: step& stepi& (gdb) 0x0000000000400547 14 x = 5; x = 5; completed. PASS: gdb.base/async.exp: stepi& nexti& (gdb) 15 y = 3; completed.FAIL: gdb.base/async.exp: nexti& The problem is here: -re "^$command\r\n${before_prompt}${gdb_prompt}${after_prompt}completed\.\r\n" { pass "$command" } -re "$gdb_prompt.*completed\.$" { fail "$command" } Note how the fail pattern is a subset of the pass pattern. If the expect buffer happens to end up with: "^$command\r\n${before_prompt}${gdb_prompt}${after_prompt}completed\." that is, the final "\r\n" has't reached the expect buffer yet, but "completed." has, then the fail pattern matches... gdb/testsuite/ 2014-03-19 Pedro Alves <palves@redhat.com> * gdb.base/async.exp (test_background): Expect \r\n after "completed." in the fail pattern.
Diffstat (limited to 'gdb/ser-unix.c')
0 files changed, 0 insertions, 0 deletions