[gdb/testsuite] Fix gdb.arch/amd64-stap-special-operands.exp for remote host
authorTom de Vries <tdevries@suse.de>
Wed, 15 Mar 2023 15:38:03 +0000 (16:38 +0100)
committerTom de Vries <tdevries@suse.de>
Wed, 15 Mar 2023 15:38:03 +0000 (16:38 +0100)
With test-case gdb.arch/amd64-stap-special-operands.exp and host board
local-remote-host-notty and target board native-gdbserver I run into:
...
(gdb) break -pstap three_arg^M
No probe matching objfile=`<any>', provider=`<any>', name=`three_arg'^M
Make breakpoint pending on future shared library load? (y or [n]) n^M
(gdb) FAIL: gdb.arch/amd64-stap-special-operands.exp: probe: three_arg: \
  gdb_breakpoint: set breakpoint at -pstap three_arg
...
due to compiling two executables with the same name, and when uploading the
second one from host to build, we run into:
...
Upload from 127.0.0.1 failed, \
  $outputs/gdb.arch/amd64-stap-special-operands/amd64-stap-special-operands: \
  Text file busy.
...

Fix this by making the executable names unique.

Tested on x86_64-linux.

gdb/testsuite/gdb.arch/amd64-stap-special-operands.exp

index 147d0ff40b2610848495c7db0c079309d08e5f85..4773074ce3cde5bcd848db77a5dddf3c34fb7e0f 100644 (file)
@@ -28,7 +28,7 @@ proc test_probe { probe_name } {
 
 standard_testfile amd64-stap-triplet.S
 
-if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
+if { [prepare_for_testing "failed to prepare" $testfile-triplet $srcfile] } {
     return -1
 }
 
@@ -36,7 +36,8 @@ test_probe "triplet"
 
 standard_testfile amd64-stap-three-arg-disp.S
 
-if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
+if { [prepare_for_testing "failed to prepare" $testfile-three-arg-displ \
+         $srcfile] } {
     return -1
 }