On 5/14/21 3:26 PM, Simon Marchi wrote: > On 2021-05-14 9:20 a.m., Bernd Edlinger wrote: >> Hi, >> >> I'd like to cleanup some files/directories which >> remain after the gdb testsute runs. >> >> I want to avoid using "rm -rf ..." since that can be dangerous. >> Therefore I remove the *.gdb-index files, if any, and use >> rmdir instead. I am not sure if there is a better way, >> instead of using "remote_exec host sh -c" to do the globbing. >> >> Tested on x86_64-pc-linux-gnu. >> Is it OK for trunk? >> >> >> 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. >> > > LGTM, but I have one question: if the rm or rmdir ever fails (because > there are additional files to delete, for example), would we know about > it or would it silently fail? I think it would be nice if the error > was noisy so we could fix it. > Ah Yes, good point, that would be as silent as before. So, how about this new version? Thanks Bernd.