diff options
author | Tom de Vries <tdevries@suse.de> | 2023-03-23 14:54:28 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-03-23 14:54:28 +0100 |
commit | 91ffa03af1cc32515190c3b52d7b964f5abead5f (patch) | |
tree | 53efc0d0fece7a2977d59b2d1087e59286dfc066 /gdb/testsuite/lib | |
parent | 5834f36d93cabf1a8bcc7dd7654141aed3d296bc (diff) | |
download | gdb-91ffa03af1cc32515190c3b52d7b964f5abead5f.zip gdb-91ffa03af1cc32515190c3b52d7b964f5abead5f.tar.gz gdb-91ffa03af1cc32515190c3b52d7b964f5abead5f.tar.bz2 |
[gdb/testsuite] Use gdb_remote_download in allow_opencl_tests
Simon reported that doing:
...
$ while make check-parallel TESTS='gdb.opencl/*.exp' -j 100; do true; done
...
could run into:
...
ERROR: remote_download to target of \
/data/vries/gdb/src/gdb/testsuite/lib/opencl_kernel.cl to opencl_kernel.cl: \
cp: cannot create regular file 'opencl_kernel.cl': File exists
...
Fix this by using gdb_remote_download (instead of plain remote_download) in
allow_opencl_test, which takes care of:
- downloading to a location which is safe for parallel testing, by
using standard_output_file, and
- cleaning up the downloaded file, meaning we can remove the corresponding
"remote_file target delete ${clprogram}" lines in allow_opencl_test.
Tested on x86_64-linux.
Reported-by: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r-- | gdb/testsuite/lib/opencl.exp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/gdb/testsuite/lib/opencl.exp b/gdb/testsuite/lib/opencl.exp index dc79664..e878c4e 100644 --- a/gdb/testsuite/lib/opencl.exp +++ b/gdb/testsuite/lib/opencl.exp @@ -38,14 +38,13 @@ gdb_caching_proc allow_opencl_tests {} { # Set up, compile, and execute an OpenCL program. Include the current # process ID in the file name of the executable to prevent conflicts with # invocations for multiple testsuites. - set clprogram [remote_download target ${srcdir}/lib/opencl_kernel.cl] + set clprogram [gdb_remote_download target ${srcdir}/lib/opencl_kernel.cl] set executable opencltest[pid].x verbose "$me: compiling OpenCL test app" 2 set compile_flags {debug nowarnings quiet} if { [gdb_compile_opencl_hostapp "${clprogram}" "${executable}" "${compile_flags}" ] != "" } { - remote_file target delete ${clprogram} verbose "$me: compiling OpenCL binary failed, returning 0" 2 return 0 } @@ -70,9 +69,6 @@ gdb_caching_proc allow_opencl_tests {} { gdb_exit remote_file build delete $executable - # Delete the OpenCL program source file. - remote_file target delete ${clprogram} - verbose "$me: returning $result" 2 return $result } |