With a testsuite setup modified to make expect wait a little bit longer for
gdb output (see PR27957), I reliably run into:
...
(gdb) FAIL: gdb.base/sect-cmd.exp: set section .text to original \
address (timeout)
...
The problem is a too greedy regexp:
...
-re ".*$address1 \- $address2 is $section_name.*" {
...
which ends up consuming the gdb prompt with the terminating ".*".