public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Fix quoting issue in gdb.base/index-cache.exp
@ 2023-03-27 11:58 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2023-03-27 11:58 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0ecbda2f31962df07aaa355c9e7c8bcefb7c97d9
commit 0ecbda2f31962df07aaa355c9e7c8bcefb7c97d9
Author: Tom de Vries <tdevries@suse.de>
Date: Mon Mar 27 13:58:09 2023 +0200
[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.
Diff:
---
gdb/testsuite/gdb.base/index-cache.exp | 2 +-
gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.base/index-cache.exp b/gdb/testsuite/gdb.base/index-cache.exp
index ec69f0f11ad..9f2f53053cb 100644
--- a/gdb/testsuite/gdb.base/index-cache.exp
+++ b/gdb/testsuite/gdb.base/index-cache.exp
@@ -245,7 +245,7 @@ test_cache_enabled_hit $cache_dir
# Test again with the cache disabled, now that it is populated.
test_cache_disabled $cache_dir "after populate"
-lassign [remote_exec host sh "-c \"rm $cache_dir/*.gdb-index\""] ret
+lassign [remote_exec host "sh -c" [quote_for_host rm $cache_dir/*.gdb-index]] ret
if { $ret != 0 && $expecting_index_cache_use } {
fail "couldn't remove files in temporary cache dir"
return
diff --git a/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp b/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp
index 46284c2b775..6574f65df91 100644
--- a/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp
+++ b/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp
@@ -96,7 +96,7 @@ foreach_with_prefix first $methods {
}
}
-lassign [remote_exec host sh "-c \"rm $cache_dir/*.gdb-index\""] ret
+lassign [remote_exec host "sh -c" [quote_for_host rm $cache_dir/*.gdb-index]] ret
if { $ret != 0 && $expecting_index_cache_use } {
fail "couldn't remove files in temporary cache dir"
return
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-27 11:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-27 11:58 [binutils-gdb] [gdb/testsuite] Fix quoting issue in gdb.base/index-cache.exp Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).