diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2021-06-02 19:18:04 +0200 |
---|---|---|
committer | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2021-06-02 21:24:45 +0200 |
commit | 60be64b396c29a06a00bfef56758cee3a141bf22 (patch) | |
tree | 58cc9cfe6cde57131da1a79685d526d2a20f86f7 /gdb | |
parent | ea6197bf5fbef07a75309fd9876c798229f7abc2 (diff) | |
download | gdb-60be64b396c29a06a00bfef56758cee3a141bf22.zip gdb-60be64b396c29a06a00bfef56758cee3a141bf22.tar.gz gdb-60be64b396c29a06a00bfef56758cee3a141bf22.tar.bz2 |
Fix temp-dir leakage in per-bfd-sharing.exp
Whan using clang as compiler this compile step fails due to the
unknown option "-Wl,--build-id". This leaks the already created
temp-dir.
Fixed by compiling first, and creating the temp-dir only when the
compile succeeded.
2021-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
* gdb.dwarf2/per-bfd-sharing.exp: Fix temp-dir leakage.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index a0469c8..7959f58 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2021-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de> + + * gdb.dwarf2/per-bfd-sharing.exp: Fix temp-dir leakage. + 2021-06-02 Carl Love <cel@us.ibm.com> * gdb.threads/threadapply.c: Add global mybarrier. diff --git a/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp b/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp index 081088a..48a30fa 100644 --- a/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp +++ b/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp @@ -18,6 +18,11 @@ standard_testfile +if { [build_executable "failed to prepare" $testfile $srcfile \ + {debug additional_flags=-Wl,--build-id}] == -1 } { + return +} + lassign [remote_exec host mktemp -d] ret cache_dir # The output of mktemp contains an end of line, remove it. @@ -30,11 +35,6 @@ if { $ret != 0 } { verbose -log "Index cache dir: $cache_dir" -if { [build_executable "failed to prepare" $testfile $srcfile \ - {debug additional_flags=-Wl,--build-id}] == -1 } { - return -} - # Populate the index-cache. with_test_prefix "populate index cache" { clean_restart |