From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id 510503895FF0; Tue, 15 Nov 2022 14:25:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 510503895FF0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668522300; bh=onM3+/oCDNK1Lvl7TrDvfXB9iVYMavYhU7A6fctchdM=; h=From:To:Subject:Date:From; b=Yo+NR6nocVdN6X141WUwXyX5XWFI4whH3Pc8fiBx/CH6g2qeRSSwmOrPFueCy4/1E ZyB454HqI6vtkd3mu577YcKxCIuzxbaSA7B7FxY2T2F6QkJGUEymWxPL3emBUmPg0i 7T2AwJB1ikW4ow0bZIpzScd544fE7ZATQ9ENcrLU= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom de Vries To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Fix gdb.base/foll-exec.exp for remote target X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: 08d237dd4ebdcc0a13cac1dc57cd73de067d2f98 X-Git-Newrev: b108c563f0f8a74813cae6b8e0e2b0089de32ba1 Message-Id: <20221115142500.510503895FF0@sourceware.org> Date: Tue, 15 Nov 2022 14:25:00 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Db108c563f0f8= a74813cae6b8e0e2b0089de32ba1 commit b108c563f0f8a74813cae6b8e0e2b0089de32ba1 Author: Tom de Vries Date: Tue Nov 15 15:24:54 2022 +0100 [gdb/testsuite] Fix gdb.base/foll-exec.exp for remote target =20 When running test-case gdb.base/foll-exec.exp with target board remote-gdbserver-on-localhost.exp, I run into: ... (gdb) PASS: gdb.base/foll-exec.exp: insert first exec catchpoint continue^M Continuing.^M [Inferior 1 (process 4476) exited normally]^M (gdb) FAIL: gdb.base/foll-exec.exp: continue to first exec catchpoint (= the program e\ xited) ... =20 The problem is that the foll-exec executable expects the exec-ed execut= able execd-prog alongside it, but it's missing. =20 Fix this by adding the missing gdb_remote_download. =20 Likewise in a few other test-cases. =20 Tested on x86_64-linux. Diff: --- gdb/testsuite/gdb.base/exec-invalid-sysroot.exp | 4 ++++ gdb/testsuite/gdb.base/foll-exec.exp | 4 ++++ gdb/testsuite/gdb.base/foll-vfork.exp | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/gdb/testsuite/gdb.base/exec-invalid-sysroot.exp b/gdb/testsuit= e/gdb.base/exec-invalid-sysroot.exp index cacd5a092a2..7f7599cbf86 100644 --- a/gdb/testsuite/gdb.base/exec-invalid-sysroot.exp +++ b/gdb/testsuite/gdb.base/exec-invalid-sysroot.exp @@ -33,6 +33,10 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${= binfile2}" executable $c return -1 } =20 +if { [is_remote target] } { + gdb_remote_download target $binfile2 +} + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executabl= e $compile_options] !=3D "" } { untested "failed to compile main testcase" return -1 diff --git a/gdb/testsuite/gdb.base/foll-exec.exp b/gdb/testsuite/gdb.base/= foll-exec.exp index 8cddfa52c3b..a3d1a8781e9 100644 --- a/gdb/testsuite/gdb.base/foll-exec.exp +++ b/gdb/testsuite/gdb.base/foll-exec.exp @@ -36,6 +36,10 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${= binfile2}" executable $c return -1 } =20 +if { [is_remote target] } { + gdb_remote_download target $binfile2 +} + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executabl= e $compile_options] !=3D "" } { untested "failed to compile" return -1 diff --git a/gdb/testsuite/gdb.base/foll-vfork.exp b/gdb/testsuite/gdb.base= /foll-vfork.exp index e4f75728600..9627a177896 100644 --- a/gdb/testsuite/gdb.base/foll-vfork.exp +++ b/gdb/testsuite/gdb.base/foll-vfork.exp @@ -42,6 +42,10 @@ if {[build_executable $testfile.exp $testfile2 $srcfile2= $compile_options] =3D=3D -1 return -1 } =20 +if { [is_remote target] } { + gdb_remote_download target [standard_output_file $testfile2] +} + # A few of these tests require a little more time than the standard # timeout allows. set oldtimeout $timeout