[gdb/testsuite] Fix -prompt handling in gdb_test
authorTom de Vries <tdevries@suse.de>
Mon, 23 May 2022 12:50:02 +0000 (14:50 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 23 May 2022 12:50:02 +0000 (14:50 +0200)
commit01a62a6d5fa99cffe25d35721c16e9bc81ed7389
treed270156d622a70f8e43073d1e440023c61b825e8
parent735dfe028c93f20026339f3eeeadacac82fe7963
[gdb/testsuite] Fix -prompt handling in gdb_test

With check-read1 I run into:
...
   [infrun] maybe_set_commit_resumed_all_targets: not requesting
commit-resumed for target native, no resumed threads^M
(gdb) FAIL: gdb.base/ui-redirect.exp: debugging: continue
[infrun] fetch_inferior_event: exit^M
...

The problem is that proc gdb_test doesn't pass down the -prompt option to proc
gdb_test_multiple, due to a typo making this lappend without effect:
...
    set opts {}
    lappend "-prompt $prompt"
...

Fix this by actually appending to opts.

Tested on x86_64-linux.
gdb/testsuite/lib/gdb.exp