From: Tom de Vries Date: Sun, 1 Aug 2021 17:53:42 +0000 (+0200) Subject: [gdb/testsuite] Fix gdb.base/index-cache.exp with cc-with-gdb-index X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=af51804103a08cd1e12edc4f4a30eec2c5c4f9e8;p=binutils-gdb.git [gdb/testsuite] Fix gdb.base/index-cache.exp with cc-with-gdb-index With target board cc-with-gdb-index we run into: ... FAIL: gdb.base/index-cache.exp: couldn't remove files in temporary cache dir ... The problem is that there are no files to remove, because the index cache isn't used, as indicated by $expecting_index_cache_use. Fix this by only FAILing when $expecting_index_cache_use. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2021-08-01 Tom de Vries * gdb.base/index-cache.exp: --- diff --git a/gdb/testsuite/gdb.base/index-cache.exp b/gdb/testsuite/gdb.base/index-cache.exp index 0daf7bbb086..496145ed8fc 100644 --- a/gdb/testsuite/gdb.base/index-cache.exp +++ b/gdb/testsuite/gdb.base/index-cache.exp @@ -227,7 +227,7 @@ test_cache_enabled_hit $cache_dir test_cache_disabled $cache_dir "after populate" lassign [remote_exec host sh "-c \"rm $cache_dir/*.gdb-index\""] ret -if { $ret != 0 } { +if { $ret != 0 && $expecting_index_cache_use } { fail "couldn't remove files in temporary cache dir" return }