From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114936 invoked by alias); 13 Apr 2016 14:23:22 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 114922 invoked by uid 89); 13 Apr 2016 14:23:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: usplmg20.ericsson.net Received: from usplmg20.ericsson.net (HELO usplmg20.ericsson.net) (198.24.6.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 13 Apr 2016 14:23:20 +0000 Received: from EUSAAHC007.ericsson.se (Unknown_Domain [147.117.188.93]) by usplmg20.ericsson.net (Symantec Mail Security) with SMTP id 42.A9.09012.BCF4E075; Wed, 13 Apr 2016 15:55:23 +0200 (CEST) Received: from elxcz23q12-y4.dyn.mo.ca.am.ericsson.se (147.117.188.8) by smtps-am.internal.ericsson.com (147.117.188.93) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 13 Apr 2016 10:23:17 -0400 From: Simon Marchi To: CC: Simon Marchi Subject: [PATCH] Fix and improve comment in gdb_remote_download Date: Wed, 13 Apr 2016 14:23:00 -0000 Message-ID: <1460557393-12354-1-git-send-email-simon.marchi@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00280.txt.bz2 This patch fixes the current comment in gdb_remote_download, which is false (the "except if that's already where it is" part). It also improves it, by explaining why pass TOFILE through standard_output_file, even it is an absolute path. gdb/testsuite/ChangeLog: * lib/gdb.exp (gdb_remote_download): Fix and extend comment. --- gdb/testsuite/lib/gdb.exp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 1ef6a96..0d8a3b0 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -4211,8 +4211,13 @@ proc gdb_remote_download {dest fromfile {tofile {}}} { return $destname } else { - # When the DEST is local, we copy the file to the test directory - # (where the executable is), except if that's already where it is. + # When the DEST is local, we copy the file to the test directory (where + # the executable is). + # + # Note that we pass TOFILE through standard_output_file, regardless of + # whether it is absolute or relative, because we don't want the tests + # to be able to write outside their standard output directory. + set tofile [standard_output_file $tofile] file copy -force $fromfile $tofile -- 2.8.1