diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 5c663ef3c5..fa4eecf518 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-02-16 Simon Marchi + + * lib/gdb.exp (standard_temp_file): Return a path specific to + the runtest invocation. + 2016-02-16 Simon Marchi * gdb.trace/save-trace.exp: Change relative path to be in the diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 1fb05c4178..a77bce4f39 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -4339,13 +4339,12 @@ proc standard_output_file {basename} { # Return the name of a file in our standard temporary directory. proc standard_temp_file {basename} { - global objdir GDB_PARALLEL - - if {[info exists GDB_PARALLEL]} { - return [make_gdb_parallel_path temp $basename] - } else { - return $basename - } + # Since a particular runtest invocation is only executing a single test + # file at any given time, we can use the runtest pid to build the + # path of the temp directory. + set dir [make_gdb_parallel_path temp [pid]] + file mkdir $dir + return [file join $dir $basename] } # Set 'testfile', 'srcfile', and 'binfile'.