From patchwork Thu Aug 21 00:31:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 2474 Received: (qmail 6766 invoked by alias); 21 Aug 2014 00:35:35 -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 6755 invoked by uid 89); 21 Aug 2014 00:35:34 -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; Thu, 21 Aug 2014 00:35:33 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1XKGLh-0001kb-EU from Yao_Qi@mentor.com ; Wed, 20 Aug 2014 17:35:29 -0700 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 20 Aug 2014 17:35:29 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.2.247.3; Wed, 20 Aug 2014 17:35:28 -0700 Message-ID: <53F53DE9.3070702@codesourcery.com> Date: Thu, 21 Aug 2014 08:31:37 +0800 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: Doug Evans CC: gdb-patches Subject: Re: [PATCH 0/3] Keep track of files copied to host and target References: <1408075184-25947-1-git-send-email-yao@codesourcery.com> <53EDA303.90701@codesourcery.com> <53F4452E.9070902@codesourcery.com> <21492.50006.332014.650387@ruffy2.mtv.corp.google.com> In-Reply-To: <21492.50006.332014.650387@ruffy2.mtv.corp.google.com> X-IsSubscribed: yes On 08/20/2014 11:48 PM, Doug Evans wrote: > How about separating out 3/3 from the rest of the patch set. > We can fix this part now, and unblock that from the discussion of > the rest of the patch set. That sounds good to me. In fact patch 3/3 is independent and can be used as-is. I update commit log a little bit to explain why *.py files are not removed on host. Is it OK? diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp index 43d0d81..b30dccc 100644 --- a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp +++ b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp @@ -53,9 +53,6 @@ if { $gdb_py_is_py24 == 1 } { return 0 } -set python_file ${srcdir}/${subdir}/${testfile}.py - - # Skip all tests if Python scripting is not enabled. if { [skip_python_tests] } { continue } @@ -71,6 +68,9 @@ if ![runto_main] then { return 0 } +set python_file [gdb_remote_download host \ + ${srcdir}/${subdir}/${testfile}.py] + gdb_test_no_output "set confirm off" "disable confirmation" gdb_test "source $python_file" "Python script imported.*" \ "import python scripts" diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp index 95f55b7..203fc99 100644 --- a/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp +++ b/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp @@ -19,7 +19,6 @@ load_lib gdb-python.exp standard_testfile .cc -set pyfile ${srcdir}/${subdir}/${testfile}.py if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} { return -1 @@ -33,6 +32,9 @@ if ![runto_main] then { return 0 } +set pyfile [gdb_remote_download host \ + ${srcdir}/${subdir}/${testfile}.py] + # # Check FinishBreakpoints against C++ exceptions # diff --git a/gdb/testsuite/gdb.python/python.exp b/gdb/testsuite/gdb.python/python.exp index c03c284..49f6e88 100644 --- a/gdb/testsuite/gdb.python/python.exp +++ b/gdb/testsuite/gdb.python/python.exp @@ -30,6 +30,9 @@ gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir +set remote_source2_py [gdb_remote_download host \ + ${srcdir}/${subdir}/source2.py] + # Do this instead of the skip_python_check. # We want to do some tests when Python is not present. gdb_test_multiple "python print (23)" "verify python support" { @@ -38,7 +41,7 @@ gdb_test_multiple "python print (23)" "verify python support" { # If Python is not supported, verify that sourcing a python script # causes an error. - gdb_test "source $srcdir/$subdir/source2.py" \ + gdb_test "source $remote_source2_py" \ "Error in sourced command file:.*" \ "source source2.py when python disabled" @@ -73,7 +76,7 @@ gdb_py_test_multiple "indented multi-line python command" \ "foo ()" "" \ "end" "hello, world!" -gdb_test "source $srcdir/$subdir/source2.py" "yes" "source source2.py" +gdb_test "source $remote_source2_py" "yes" "source source2.py" gdb_test "source -s source2.py" "yes" "source -s source2.py"