From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id D13343896C17; Tue, 15 Nov 2022 14:25:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D13343896C17 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668522335; bh=pVo5hfRWrixBll3ZKjTIVfGS3vDOEIDcLWaB5d6yQNw=; h=From:To:Subject:Date:From; b=VyQRe7DjFhK++iEc12YMCjLn1Fc0XESfT4FdKXJE+zjFIWW1mMzQkAtkT2ogrzQf3 U2V48iiJK8FiVCYjplokr7rxdMgSxCPAeA40a96rdt7WZ9DIR4XIQ3FnzGSDiOnAlH HOLE1J1PS9Eqa001iNnGCcf3O3kxetDTOMp2lyvc= 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/jit-reader-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: e27e0e5d4147af715d479fda7583d74cf6a17266 X-Git-Newrev: 32e0d36918d0acaafba8940327a2ba12c96ac534 Message-Id: <20221115142535.D13343896C17@sourceware.org> Date: Tue, 15 Nov 2022 14:25:35 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D32e0d36918d0= acaafba8940327a2ba12c96ac534 commit 32e0d36918d0acaafba8940327a2ba12c96ac534 Author: Tom de Vries Date: Tue Nov 15 15:24:54 2022 +0100 [gdb/testsuite] Fix gdb.base/jit-reader-exec.exp for remote target =20 With test-case gdb.base/jit-reader-exec.exp and target board remote-gdbserver-on-localhost (using REMOTE_TARGET_USERNAME) we run int= o some failures. =20 Fix this by adding the missing gdb_remote_download. =20 Tested on x86_64-linux. =20 Co-Authored-by: Ivan Tetyushkin Diff: --- gdb/testsuite/gdb.base/jit-reader-exec.exp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/gdb.base/jit-reader-exec.exp b/gdb/testsuite/gdb= .base/jit-reader-exec.exp index c5ee8ef89a3..ad47c5a9610 100644 --- a/gdb/testsuite/gdb.base/jit-reader-exec.exp +++ b/gdb/testsuite/gdb.base/jit-reader-exec.exp @@ -27,15 +27,19 @@ set testfile2 "jit-reader-execd" set srcfile2 ${testfile2}.c set binfile2 [standard_output_file ${testfile2}] =20 -set compile_options [list debug additional_flags=3D-DPROGRAM=3D\"$binfile2= \"] - -if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ - executable $compile_options] !=3D ""} { +if {[gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" \ + executable {debug}] !=3D ""} { untested "failed to compile" return -1 } =20 -if {[gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" \ +if { [is_remote target] } { + set binfile2 [gdb_remote_download target $binfile2] +} + +set compile_options [list debug additional_flags=3D-DPROGRAM=3D\"$binfile2= \"] + +if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ executable $compile_options] !=3D ""} { untested "failed to compile" return -1