From patchwork Tue May 13 07:12:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 881 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx20.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id 9C22A36001D for ; Tue, 13 May 2014 00:15:17 -0700 (PDT) Received: by homiemail-mx20.g.dreamhost.com (Postfix, from userid 14314964) id 4362741A13016; Tue, 13 May 2014 00:15:17 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx20.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx20.g.dreamhost.com (Postfix) with ESMTPS id 20F5F41A10D14 for ; Tue, 13 May 2014 00:15:17 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; q=dns; s=default; b=Lh6imRDRpnaa218p+upD+dY+XKXyF I719sY6cZlYtzldJO9aJ+ASSfEfEQxzdZB64BKjwShGu/RJXKcLuZl/H1usy4WhL g4H1EzZIpp13tqC12Hgfyhe6U0nxteaT+n3worHleDf2kMz0hUOjMCJboIWb2iS2 T7heFVkCPMt7Ps= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; s=default; bh=qiGGccGXwKvAyvJH+HwV0G9kzm0=; b=ska MK81mTN08qmsfSVboHVu1acIw5Kz0qLAvAI5WcWZKXdVxG9IS/rLC5JNcQv0S+BC kUsLjUbs6yAMjC2Ku7MGLbJChaHc0hKTC+sdBIqnQ3dGvj/OhKUBOs2rx8idIFiz bO/sckKbs/26CpLhInSr+bZ1VbysTQiOliGCGnJI= Received: (qmail 31293 invoked by alias); 13 May 2014 07:15:14 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 31268 invoked by uid 89); 13 May 2014 07:15:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 13 May 2014 07:15:10 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1Wk6vb-00015g-19 from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Tue, 13 May 2014 00:15:07 -0700 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Tue, 13 May 2014 00:15:06 -0700 Received: from qiyao.dyndns.org.com (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.2.247.3; Tue, 13 May 2014 00:13:40 -0700 From: Yao Qi To: Subject: [PATCH OBV] Overwrite ${board}_file in local-remote-host Date: Tue, 13 May 2014 15:12:08 +0800 Message-ID: <1399965128-5603-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes X-DH-Original-To: gdb@patchwork.siddhesh.in After I run test like this, $ make check RUNTESTFLAGS='--host_board=local-remote-host dw2-basic.exp' gdb.dwarf2/file1.txt in source tree was removed. In some gdb.dwarf2/*.exp, file1.txt is copied to host and then removed at the end. However, in local-remote-host-notty.exp, ${board}_download doesn't copy the file but return the absolute path of the src file. 'remote_file host delete' at the end will remove the file in source tree. This patch is to overwrite ${board}_file, and specially make "delete" option do nothing. This approach is used in gdbserver-base.exp and remote-stdio-gdbserver.exp too. It is obvious. I'll commit it in two days if there are no objections. gdb/testsuite: 2014-05-13 Yao Qi * boards/local-remote-host-notty.exp (${board}_file): New proc. --- gdb/testsuite/boards/local-remote-host-notty.exp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gdb/testsuite/boards/local-remote-host-notty.exp b/gdb/testsuite/boards/local-remote-host-notty.exp index 6ff8f18..dd3ee5a 100644 --- a/gdb/testsuite/boards/local-remote-host-notty.exp +++ b/gdb/testsuite/boards/local-remote-host-notty.exp @@ -33,6 +33,13 @@ set_board_info rsh_prog /usr/bin/ssh set_board_info rcp_prog /usr/bin/scp set_board_info file_transfer "rsh" +proc ${board}_file { dest op args } { + if { $op == "delete" } { + return 0 + } + return [eval [list standard_file $dest $op] $args] +} + proc ${board}_download { board src dest } { # If file name is a relative, convert it to absolute, otherwise file can't