diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2021-05-14 14:53:19 +0200 |
---|---|---|
committer | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2021-05-14 17:49:25 +0200 |
commit | f8eec398fb705d6d6f76451288abd5d38f9d07fc (patch) | |
tree | 207b327d61ac00a9419c7ab6bc5eea96cca78b11 | |
parent | 55789354fcbaf879f3ca8475b647b2747dec486e (diff) | |
download | gdb-f8eec398fb705d6d6f76451288abd5d38f9d07fc.zip gdb-f8eec398fb705d6d6f76451288abd5d38f9d07fc.tar.gz gdb-f8eec398fb705d6d6f76451288abd5d38f9d07fc.tar.bz2 |
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 <bernd.edlinger@hotmail.de>
* gdb.base/index-cache.exp: Cleanup $cache_dir/*.gdb-index and
remove the directory.
* gdb.dwarf2/per-bfd-sharing.exp: Likewise.
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/index-cache.exp | 11 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp | 12 |
3 files changed, 29 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index fbe2d21..c723a9a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2021-05-14 Bernd Edlinger <bernd.edlinger@hotmail.de> + + * gdb.base/index-cache.exp: Cleanup $cache_dir/*.gdb-index and + remove the directory. + * gdb.dwarf2/per-bfd-sharing.exp: Likewise. + 2021-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> * gdb.python/py-inferior.exp: Add test cases for 'connection_num'. diff --git a/gdb/testsuite/gdb.base/index-cache.exp b/gdb/testsuite/gdb.base/index-cache.exp index 13d5532..0daf7bb 100644 --- a/gdb/testsuite/gdb.base/index-cache.exp +++ b/gdb/testsuite/gdb.base/index-cache.exp @@ -226,3 +226,14 @@ 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 +if { $ret != 0 } { + fail "couldn't remove files in temporary cache dir" + return +} + +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..081088a 100644 --- a/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp +++ b/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp @@ -91,3 +91,15 @@ foreach_with_prefix first $methods { } } } + +lassign [remote_exec host sh "-c \"rm $cache_dir/*.gdb-index\""] ret +if { $ret != 0 } { + fail "couldn't remove files in temporary cache dir" + return +} + +lassign [remote_exec host rmdir "$cache_dir"] ret +if { $ret != 0 } { + fail "couldn't remove temporary cache dir" + return +} |