From 04569ed1ff0f2ee09352f3aaee7ce517766b2aec Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Fri, 14 May 2021 14:53:19 +0200 Subject: [PATCH] testsuite: Cleanup some temp dirs with gdb-index files After the gdb test-suite runs there are some files left in /tmp/tmp*/*.gdb-index, remove those files and the directory at the end of the test case. gdb/testsuite: 2021-05-14 Bernd Edlinger * gdb.base/index-cache.exp: Cleanup $cache_dir/*.gdb-index and remove the directory. * gdb.dwarf2/per-bfd-sharing.exp: Likewise. --- gdb/testsuite/gdb.base/index-cache.exp | 6 ++++++ gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/gdb/testsuite/gdb.base/index-cache.exp b/gdb/testsuite/gdb.base/index-cache.exp index 13d5532..de581f7 100644 --- a/gdb/testsuite/gdb.base/index-cache.exp +++ b/gdb/testsuite/gdb.base/index-cache.exp @@ -226,3 +226,9 @@ test_cache_enabled_hit $cache_dir # Test again with the cache disabled, now that it is populated. test_cache_disabled $cache_dir "after populate" +remote_exec host sh "-c \"rm -f $cache_dir/*.gdb-index\"" +lassign [remote_exec host rmdir "$cache_dir"] ret +if { $ret != 0 } { + fail "couldn't remove 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 22ab91f..3717825 100644 --- a/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp +++ b/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp @@ -91,3 +91,10 @@ foreach_with_prefix first $methods { } } } + +remote_exec host sh "-c \"rm -f $cache_dir/*.gdb-index\"" +lassign [remote_exec host rmdir "$cache_dir"] ret +if { $ret != 0 } { + fail "couldn't remove temporary cache dir" + return +} -- 1.9.1