From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BEFF73851158; Fri, 28 Oct 2022 14:07:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BEFF73851158 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666966037; bh=xApEzJ5+u+r9TtL26u94u1rxKmyawfpVAvJPxtyX/3U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jZzDEd5X2HtnhjwZMUm6DNpE7yHd+9ucecsO+g6h5BQvQIpP4GVyonRHHeLxFmQhl IvtMCG9AKhkOcK+qj8THxXZMR2qEGtxdf4p1w8L0yvo0C2Z3Z+VWyKrviTQkVcuDfr sIMcW6tbgtiIYGgJDQTukgxWxzjS0fvM2eNAXXqo= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug testsuite/29697] [gdb/testsuite, local-remote-host] FAIL: gdb.base/callfuncs.exp: noproto: p ((int (*) ()) t_float_values2)(3.14159,float_val2) Date: Fri, 28 Oct 2022 14:07:16 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: testsuite X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29697 --- Comment #1 from Tom de Vries --- (In reply to Tom de Vries from comment #0) > I managed to make things work by removing ${board}_download from the host > board file, but that fills my home dir with temp files... And that breaks down once (test-case gdb.dwarf2/dwz.exp) you want to compil= e an exec using -o ~/dwz, and you already have a directory ~/dwz. I tried to get that test-case to work by removing ${board}_download and ${board}_file and using a REMOTE_HOST_DIR, like so: ... if { ![info exists REMOTE_HOST_DIR] } { set REMOTE_HOST_DIR [file join [pwd] "remote-host-dir"] } if { ![file exists $REMOTE_HOST_DIR] } { file mkdir $REMOTE_HOST_DIR } set_board_info remotedir $REMOTE_HOST_DIR ... I got to: ... diff --git a/gdb/testsuite/boards/local-remote-host.exp b/gdb/testsuite/boards/local-remote-host.exp # Like standard_spawn, but force pseudo-tty allocation, with 'ssh -t'. proc ${board}_spawn { board cmd } { - global board_info + global board_info REMOTE_HOST_DIR set remote [board_info $board hostname] set username [board_info $board username] set RSH [board_info $board rsh_prog] - spawn $RSH -t -l $username $remote $cmd + spawn $RSH -t -l $username $remote "cd $REMOTE_HOST_DIR; $cmd" set board_info($board,fileid) $spawn_id return $spawn_id } diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index e2cda30b95a..5f1f2fa0fbf 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -2099,7 +2099,15 @@ proc gdb_file_cmd { arg } { set gdb_file_cmd_debug_info "fail" if [is_remote host] { - set arg [remote_download host $arg] + set pre_arg $arg + set arg [remote_upload host $arg] + if { $arg =3D=3D "" } { + perror "upload failed: remote_upload host $pre_arg" + return -1 + } + } + if [is_remote target] { + set arg [remote_download target $arg] if { $arg =3D=3D "" } { perror "download failed" return -1 @@ -6217,6 +6225,9 @@ proc standard_output_file_with_gdb_instance {basename= } { # Return the name of a file in our standard temporary directory. proc standard_temp_file {basename} { + if { [is_remote host] } { + return $basename + } # Since a particular runtest invocation is only executing a single test # file at any given time, we can use the runtest pid to build the # path of the temp directory. ... And I'm at the point that AFAICT, the gdb_default_target_compile_1 proc doe= s: ... set compiler_flags $opts if {[is_remote host]} { remote_upload host [file tail $destfile] $destfile remote_file host delete [file tail $destfile] } ... and the remote_upload fails, the exec is deleted and execution fails. I seems that remote_upload indeed does not take remotedir into account. --=20 You are receiving this mail because: You are on the CC list for the bug.=