[gdb/testsuite] Fix gdb.btrace/multi-inferior.exp for remote host
authorTom de Vries <tdevries@suse.de>
Tue, 28 Mar 2023 20:15:18 +0000 (22:15 +0200)
committerTom de Vries <tdevries@suse.de>
Tue, 28 Mar 2023 20:15:18 +0000 (22:15 +0200)
Fix test-case gdb.btrace/multi-inferior.exp for remote host using
gdb_remote_download.

Tested on x86_64-linux.

gdb/testsuite/gdb.btrace/multi-inferior.exp

index 79e5a1c39bff50e99d2b5410440f992f0036d6e7..2f4388e9501b0617633c8ab72b8841a370f14e95 100644 (file)
@@ -31,6 +31,8 @@ if [prepare_for_testing "failed to prepare" $testfile {} {debug}] {
     return -1
 }
 
+set host_binfile [gdb_remote_download host $binfile]
+
 with_test_prefix "inferior 1" {
     if ![runto_main] {
        return -1
@@ -38,7 +40,7 @@ with_test_prefix "inferior 1" {
 }
 
 with_test_prefix "inferior 2" {
-    gdb_test "add-inferior -exec ${binfile}" "Added inferior 2.*" \
+    gdb_test "add-inferior -exec $host_binfile" "Added inferior 2.*" \
        "add second inferior"
     gdb_test "inferior 2" "Switching to inferior 2.*"
 
@@ -57,7 +59,7 @@ with_test_prefix "inferior 1" {
 }
 
 with_test_prefix "inferior 3" {
-    gdb_test "add-inferior -exec ${binfile}" "Added inferior 3.*" \
+    gdb_test "add-inferior -exec ${host_binfile}" "Added inferior 3.*" \
        "add third inferior"
     gdb_test "inferior 3" "Switching to inferior 3.*"