]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/testsuite] Fix quoting issue in gdb.base/index-cache.exp
authorTom de Vries <tdevries@suse.de>
Mon, 27 Mar 2023 11:58:09 +0000 (13:58 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 27 Mar 2023 11:58:09 +0000 (13:58 +0200)
commit0ecbda2f31962df07aaa355c9e7c8bcefb7c97d9
treecc1c0833e8586421260ab8e3d279960b0ab9c9ad
parentd0498b325e3c5d65372087fde46351b55980f111
[gdb/testsuite] Fix quoting issue in gdb.base/index-cache.exp

For test-case gdb.base/index-cache.exp and remote host, this:
...
lassign [remote_exec host sh "-c \"rm $cache_dir/*.gdb-index\""] ret
...
gives us:
...
Executing on host: sh -c rm /tmp/tmp.m3L7m2AVkL/*.gdb-index    (timeout = 300)
builtin_spawn -ignore SIGHUP sh -c rm /tmp/tmp.m3L7m2AVkL/*.gdb-index^M
rm: missing operand^M
Try 'rm --help' for more information.^M
FAIL: gdb.dwarf2/per-bfd-sharing.exp: couldn't remove files in temporary cache dir
...

Fix this using quote_for_host.  Likewise in gdb.dwarf2/per-bfd-sharing.exp.

Tested on x86_64-linux.
gdb/testsuite/gdb.base/index-cache.exp
gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp