In test-case gdb.opencl/callfuncs.exp I noticed:
...
clean_restart [standard_testfile $testfile]
...
This doesn't have the desired effect of starting gdb with $testfile because
standard_testfile doesn't return anything.
Fix this by using "clean_restart $testfile".
While we're at it:
- move standard_testfile to the start of the file
- drop the redundant 'set testfile "callfuncs"'
- use standard_testfile .cl to properly define $srcfile
- use $srcfile instead of $testfile.cl
Tested on x86_64-linux, using the demonstrator patch in PR testsuite/33363.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33363
require allow_opencl_tests
-set testfile "callfuncs"
-set clprogram [remote_download target ${srcdir}/${subdir}/${testfile}.cl]
+standard_testfile .cl
+
+set clprogram [remote_download target $srcdir/$subdir/$srcfile]
# Compile the generic OpenCL host app
if { [gdb_compile_opencl_hostapp "${clprogram}" "${testfile}" "" ] != "" } {
return -1
}
-clean_restart [standard_testfile $testfile]
+clean_restart $testfile
# Set breakpoint at the OpenCL kernel
gdb_test "tbreak testkernel" \