[gdb/testsuite] Fix gdb.debuginfod/fetch_src_and_symbols.exp with check-read1
authorTom de Vries <tdevries@suse.de>
Thu, 20 Oct 2022 07:50:04 +0000 (09:50 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 20 Oct 2022 07:50:04 +0000 (09:50 +0200)
commit15ede33bfa86fd2dfd2d088e01ac2d20cdba46c9
tree282cdc8eda25e6f29776e31e777fe7857f2c75c8
parent9c1c98cc632a7f4721e0b19edcb8f6bcd9347942
[gdb/testsuite] Fix gdb.debuginfod/fetch_src_and_symbols.exp with check-read1

With test-case gdb.debuginfod/fetch_src_and_symbols.exp and check-read1, I run
into:
...
(gdb) FAIL: gdb.debuginfod/fetch_src_and_symbols.exp: local_url: \
  file fetch_src_and_symbols (got interactive prompt)
...

The problem is that this output:
...
Enable debuginfod for this session? (y or [n]) y^M
...
is matched using regexp "Enable debuginfod?.*" with matches only the first two
words of the output, after which an implicit clause in gdb_test_multiple triggers
on the second part containing the interactive prompt.

Fix this by included the interactive prompt in the regexp.

Tested on x86_64-linux.
gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp