From: Tom de Vries Date: Sat, 4 May 2024 08:41:09 +0000 (+0200) Subject: [gdb/testsuite] Move gpu-parallel.lock to cache dir X-Git-Tag: gdb-15-branchpoint~187 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a0a6e110198c4f7fb4b5baa1f8d158ebf225f7e2;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite] Move gpu-parallel.lock to cache dir The lock directory returned by lock_dir is currently $objdir. It seems possible to leave a stale lock file that blocks progress in a following run. Fix this by using a directory that is guaranteed to be initially empty when using GDB_PARALLEL, like temp or cache. In gdb/testsuite/README I found: ... cache in particular is used to share data across invocations of runtest ... which seems appropriate, so let's use cache for this. Tested on aarch64-linux. Approved-By: Tom Tromey --- diff --git a/gdb/testsuite/lib/gdb-utils.exp b/gdb/testsuite/lib/gdb-utils.exp index c0b96d3c2bf..1f30d807ff0 100644 --- a/gdb/testsuite/lib/gdb-utils.exp +++ b/gdb/testsuite/lib/gdb-utils.exp @@ -180,7 +180,7 @@ proc lock_file_release {info} { # Return directory where we keep lock files. proc lock_dir {} { - return $objdir + return [make_gdb_parallel_path cache] } # Run body under lock LOCK_FILE.