Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 3/3] Copy .py files to remote host
  2014-08-15  4:04 [PATCH 0/3] Keep track of files copied to host and target Yao Qi
@ 2014-08-15  4:04 ` Yao Qi
  2014-08-15  4:04 ` [PATCH 1/3] Extend cleanfiles for multiple hosts Yao Qi
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 13+ messages in thread
From: Yao Qi @ 2014-08-15  4:04 UTC (permalink / raw)
  To: gdb-patches

Some gdb.python/*.exp tests fail because the .py files aren't copied
to the (remote) host.  This patch is to copy needed .py files to host.
Most of gdb.python/*.exp tests do this.

gdb/testsuite:

2014-08-14  Yao Qi  <yao@codesourcery.com>

	* gdb.python/py-finish-breakpoint.exp: Copy .py file to host.
	* gdb.python/py-finish-breakpoint2.exp: Likewise.
	* gdb.python/python.exp: Likewise.  Use .py file on the host
	instead of the build.
---
 gdb/testsuite/gdb.python/py-finish-breakpoint.exp  | 6 +++---
 gdb/testsuite/gdb.python/py-finish-breakpoint2.exp | 4 +++-
 gdb/testsuite/gdb.python/python.exp                | 7 +++++--
 3 files changed, 11 insertions(+), 6 deletions(-)

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"
 
-- 
1.9.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 0/3] Keep track of files copied to host and target
@ 2014-08-15  4:04 Yao Qi
  2014-08-15  4:04 ` [PATCH 3/3] Copy .py files to remote host Yao Qi
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Yao Qi @ 2014-08-15  4:04 UTC (permalink / raw)
  To: gdb-patches

In current GDB testsuite, .py files (in gdb.python), file1.txt (in
gdb.dwarf2), and .xml files (in gdb.xml) are copied to host at
the beginning of the tests, and removed at the end of the test.
However, GDB testsuite also copies files to target, but automatically
track them in gdb.exp:cleanfiles, and remove them from target when
each test is finished.

This patch series is teach GDB testsuite to keep track of files copied
to host and remove them when test is finished, the same as what we
did for files copied to target.  The files copied to both target and
host are tracked in an unified way.

Patch #1 is to extend existing cleanfiles for not only target but also
host.  In patch #2, we start to keep track of files copied to host in
cleanfiles, so that each test doesn't have to remove them at the end.
Patch #3 is to copy some needed .py files to host, to fix some fails
in remote host testing.

The patch series is tested in native and gdbserver on x86_64-linux.
I also test it with my local board file to emulate gdb native testing
in a remote host (host == target != build), result looks good.  I'll
tweak it a little and post it shortly.  I also find some tests don't
copy needed file to host, and I'll fix them separately.

*** BLURB HERE ***

Yao Qi (3):
  Extend cleanfiles for multiple hosts
  Keep track of downloaded file in gdb_remote_download
  Copy .py files to remote host

 gdb/testsuite/gdb.base/checkpoint.exp              |  2 --
 gdb/testsuite/gdb.base/step-line.exp               |  2 --
 gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp    |  5 +----
 gdb/testsuite/gdb.dwarf2/dw2-basic.exp             |  5 +----
 gdb/testsuite/gdb.dwarf2/dw2-compressed.exp        |  5 +----
 gdb/testsuite/gdb.dwarf2/dw2-filename.exp          |  5 +----
 gdb/testsuite/gdb.dwarf2/dw2-intercu.exp           |  2 --
 gdb/testsuite/gdb.dwarf2/dw2-intermix.exp          |  6 ++----
 gdb/testsuite/gdb.dwarf2/dw2-producer.exp          |  5 +----
 gdb/testsuite/gdb.dwarf2/mac-fileno.exp            |  5 +----
 gdb/testsuite/gdb.python/py-finish-breakpoint.exp  |  6 +++---
 gdb/testsuite/gdb.python/py-finish-breakpoint2.exp |  4 +++-
 gdb/testsuite/gdb.python/py-frame-args.exp         |  2 --
 gdb/testsuite/gdb.python/py-mi.exp                 |  2 --
 gdb/testsuite/gdb.python/py-pp-integral.exp        |  2 --
 gdb/testsuite/gdb.python/py-pp-re-notag.exp        |  2 --
 gdb/testsuite/gdb.python/py-prettyprint.exp        |  4 ----
 gdb/testsuite/gdb.python/py-section-script.exp     |  2 --
 gdb/testsuite/gdb.python/py-typeprint.exp          |  2 --
 gdb/testsuite/gdb.python/py-xmethods.exp           |  2 --
 gdb/testsuite/gdb.python/python.exp                |  7 ++++--
 gdb/testsuite/gdb.stabs/weird.exp                  |  2 --
 gdb/testsuite/gdb.xml/tdesc-regs.exp               |  4 ----
 gdb/testsuite/lib/gdb.exp                          | 25 ++++++++++++++++------
 24 files changed, 37 insertions(+), 71 deletions(-)

-- 
1.9.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 2/3] Keep track of downloaded file in gdb_remote_download
  2014-08-15  4:04 [PATCH 0/3] Keep track of files copied to host and target Yao Qi
  2014-08-15  4:04 ` [PATCH 3/3] Copy .py files to remote host Yao Qi
  2014-08-15  4:04 ` [PATCH 1/3] Extend cleanfiles for multiple hosts Yao Qi
@ 2014-08-15  4:04 ` Yao Qi
  2014-08-15  5:00 ` [PATCH 0/3] Keep track of files copied to host and target Doug Evans
  3 siblings, 0 replies; 13+ messages in thread
From: Yao Qi @ 2014-08-15  4:04 UTC (permalink / raw)
  To: gdb-patches

This patch is to teach gdb_remote_download to keep track of downloaded
files, so that they can be deleted on gdb_finish, so we don't have to
manually delete downloaded files in each test.

gdb/testsuite:

2014-08-14  Yao Qi  <yao@codesourcery.com>

	* lib/gdb.exp (gdb_remote_download): Record $destname in
	cleanfiles.
	* gdb.base/checkpoint.exp: Don't explicitly remove file copied on host.
	* gdb.base/step-line.exp: Likewise.
	* gdb.dwarf2/dw2-anonymous-func.exp: Likewise.
	* gdb.dwarf2/dw2-basic.exp: Likewise.
	* gdb.dwarf2/dw2-compressed.exp: Likewise.
	* gdb.dwarf2/dw2-filename.exp: Likewise.
	* gdb.dwarf2/dw2-intercu.exp: Likewise.
	* gdb.dwarf2/dw2-intermix.exp: Likewise.
	* gdb.dwarf2/dw2-producer.exp: Likewise.
	* gdb.dwarf2/mac-fileno.exp: Likewise.
	* gdb.python/py-frame-args.exp: Likewise.
	* gdb.python/py-mi.exp: Likewise.
	* gdb.python/py-pp-integral.exp: Likewise.
	* gdb.python/py-pp-re-notag.exp: Likewise.
	* gdb.python/py-prettyprint.exp: Likewise.
	* gdb.python/py-section-script.exp: Likewise.
	* gdb.python/py-typeprint.exp: Likewise.
	* gdb.python/py-xmethods.exp: Likewise.
	* gdb.stabs/weird.exp: Likewise.
	* gdb.xml/tdesc-regs.exp: Likewise.
---
 gdb/testsuite/gdb.base/checkpoint.exp           |  2 --
 gdb/testsuite/gdb.base/step-line.exp            |  2 --
 gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp |  5 +----
 gdb/testsuite/gdb.dwarf2/dw2-basic.exp          |  5 +----
 gdb/testsuite/gdb.dwarf2/dw2-compressed.exp     |  5 +----
 gdb/testsuite/gdb.dwarf2/dw2-filename.exp       |  5 +----
 gdb/testsuite/gdb.dwarf2/dw2-intercu.exp        |  2 --
 gdb/testsuite/gdb.dwarf2/dw2-intermix.exp       |  6 ++----
 gdb/testsuite/gdb.dwarf2/dw2-producer.exp       |  5 +----
 gdb/testsuite/gdb.dwarf2/mac-fileno.exp         |  5 +----
 gdb/testsuite/gdb.python/py-frame-args.exp      |  2 --
 gdb/testsuite/gdb.python/py-mi.exp              |  2 --
 gdb/testsuite/gdb.python/py-pp-integral.exp     |  2 --
 gdb/testsuite/gdb.python/py-pp-re-notag.exp     |  2 --
 gdb/testsuite/gdb.python/py-prettyprint.exp     |  4 ----
 gdb/testsuite/gdb.python/py-section-script.exp  |  2 --
 gdb/testsuite/gdb.python/py-typeprint.exp       |  2 --
 gdb/testsuite/gdb.python/py-xmethods.exp        |  2 --
 gdb/testsuite/gdb.stabs/weird.exp               |  2 --
 gdb/testsuite/gdb.xml/tdesc-regs.exp            |  4 ----
 gdb/testsuite/lib/gdb.exp                       | 10 ++++++++--
 21 files changed, 16 insertions(+), 60 deletions(-)

diff --git a/gdb/testsuite/gdb.base/checkpoint.exp b/gdb/testsuite/gdb.base/checkpoint.exp
index b5ed1d3..2de2439 100644
--- a/gdb/testsuite/gdb.base/checkpoint.exp
+++ b/gdb/testsuite/gdb.base/checkpoint.exp
@@ -371,5 +371,3 @@ verbose "Timeout now $timeout sec."
 #
 # Finished: cleanup
 #
-
-remote_exec host "rm -f $pi_txt"
diff --git a/gdb/testsuite/gdb.base/step-line.exp b/gdb/testsuite/gdb.base/step-line.exp
index 94799f8..7f51565 100644
--- a/gdb/testsuite/gdb.base/step-line.exp
+++ b/gdb/testsuite/gdb.base/step-line.exp
@@ -82,6 +82,4 @@ gdb_test "next" \
          ".*RETURN \\(j\\);.*" \
 	 "next over dummy 10"
 
-remote_file host delete ${remote_linefile}
-
 return 0
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
index 029104b..817c988 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
@@ -29,11 +29,8 @@ if {[prepare_for_testing_full $testfile.exp \
     return -1
 }
 
-set remote_dwarf_srcfile [gdb_remote_download host \
-			      ${srcdir}/${subdir}/${dwarf_srcfile}]
+gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}
 
 # Force the debugger to create the file1.txt symtab, to make sure that
 # the debugger does not crash doing so.
 gdb_test "list file1.txt:1" "File 1 Line 1.*File 1 Line 8" "list file1.txt"
-
-remote_file host delete ${remote_dwarf_srcfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-basic.exp b/gdb/testsuite/gdb.dwarf2/dw2-basic.exp
index 7823eaa..c5d5b0a 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-basic.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-basic.exp
@@ -29,11 +29,8 @@ if {[prepare_for_testing_full $testfile.exp \
     return -1
 }
 
-set remote_dwarf_srcfile [gdb_remote_download host \
-			      ${srcdir}/${subdir}/${dwarf_srcfile}]
+gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}
 
 gdb_test_no_output "set listsize 1"
 gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4"
 gdb_test "ptype func_cu1" "type = int \\(\\)"
-
-remote_file host delete ${remote_dwarf_srcfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp b/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
index 76009d2..7a783b7 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
@@ -31,11 +31,8 @@ if {[prepare_for_testing_full $testfile.exp \
     return -1
 }
 
-set remote_dwarf_srcfile [gdb_remote_download host \
-			      ${srcdir}/${subdir}/${dwarf_srcfile}]
+gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}
 
 gdb_test_no_output "set listsize 1"
 gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4"
 gdb_test "ptype func_cu1" "type = int \\(\\)"
-
-remote_file host delete ${remote_dwarf_srcfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-filename.exp b/gdb/testsuite/gdb.dwarf2/dw2-filename.exp
index c9ead979..95b4aeb 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-filename.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-filename.exp
@@ -28,8 +28,7 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {nodebug
     return -1
 }
 
-set remote_dwarf_srcfile [gdb_remote_download host \
-			      ${srcdir}/${subdir}/${dwarf_srcfile}]
+gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}
 
 clean_restart ${testfile}
 
@@ -42,5 +41,3 @@ gdb_test "interpreter-exec mi -file-list-exec-source-files" \
 
 # And `info sources' should return the fullname incl. the directories.
 gdb_test "info sources" {[/\\]file1\.txt}
-
-remote_file host delete ${remote_dwarf_srcfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp b/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
index 4a23c96..ce1c15f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
@@ -42,5 +42,3 @@ gdb_test_no_output "set listsize 1"
 gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4"
 
 gdb_test "ptype func_cu1" "type = int2 \\(\\)"
-
-remote_file host delete ${remote_dwarf_srcfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp b/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
index 2f95572..1d5d237 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
@@ -29,11 +29,9 @@ if {[prepare_for_testing_full $testfile.exp \
     return -1
 }
 
-set remote_dwarf_srcfile [gdb_remote_download host \
-			      ${srcdir}/${subdir}/${dwarf_srcfile}]
+gdb_remote_download host \
+    ${srcdir}/${subdir}/${dwarf_srcfile}
 
 gdb_test_no_output "set listsize 1"
 gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4"
 gdb_test "ptype func_cu1" "type = int \\(\\)"
-
-remote_file host delete ${remote_dwarf_srcfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-producer.exp b/gdb/testsuite/gdb.dwarf2/dw2-producer.exp
index 6846b17..6d786fe 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-producer.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-producer.exp
@@ -27,11 +27,8 @@ if {[prepare_for_testing_full $testfile.exp \
     return -1
 }
 
-set remote_dwarf_srcfile [gdb_remote_download host \
-			      ${srcdir}/${subdir}/${dwarf_srcfile}]
+gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}
 
 gdb_test_no_output "set listsize 1"
 gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4"
 gdb_test "ptype func_cu1" "type = int \\(\\)"
-
-remote_file host delete ${remote_dwarf_srcfile}
diff --git a/gdb/testsuite/gdb.dwarf2/mac-fileno.exp b/gdb/testsuite/gdb.dwarf2/mac-fileno.exp
index e736211..7711cb3 100644
--- a/gdb/testsuite/gdb.dwarf2/mac-fileno.exp
+++ b/gdb/testsuite/gdb.dwarf2/mac-fileno.exp
@@ -30,11 +30,8 @@ if {[prepare_for_testing_full $testfile.exp \
     return -1
 }
 
-set remote_dwarf_srcfile [gdb_remote_download host \
-			      ${srcdir}/${subdir}/${dwarf_srcfile}]
+gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}
 
 gdb_test_no_output "set listsize 1"
 gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4"
 gdb_test "ptype func_cu1" "type = int \\(\\)"
-
-remote_file host delete ${remote_dwarf_srcfile}
diff --git a/gdb/testsuite/gdb.python/py-frame-args.exp b/gdb/testsuite/gdb.python/py-frame-args.exp
index 4c50be8..de4d159 100644
--- a/gdb/testsuite/gdb.python/py-frame-args.exp
+++ b/gdb/testsuite/gdb.python/py-frame-args.exp
@@ -68,5 +68,3 @@ gdb_test_no_output "set print frame-arguments all"
 gdb_test "frame" \
     ".*foo \\(x=42, ss={a = {m = 1}, b = {m = 2}}\\).*" \
     "frame raw,all"
-
-remote_file host delete ${remote_python_file}
diff --git a/gdb/testsuite/gdb.python/py-mi.exp b/gdb/testsuite/gdb.python/py-mi.exp
index 5959175..ca02bf7 100644
--- a/gdb/testsuite/gdb.python/py-mi.exp
+++ b/gdb/testsuite/gdb.python/py-mi.exp
@@ -356,5 +356,3 @@ mi_list_varobj_children fake.private {
 
 mi_gdb_test "-var-set-visualizer fake.private gdb.default_visualizer" \
     "\\^done" "Install visualizer on a cplus_fake_child"
-
-remote_file host delete ${remote_python_file}
diff --git a/gdb/testsuite/gdb.python/py-pp-integral.exp b/gdb/testsuite/gdb.python/py-pp-integral.exp
index 8149bde..ac4403d 100644
--- a/gdb/testsuite/gdb.python/py-pp-integral.exp
+++ b/gdb/testsuite/gdb.python/py-pp-integral.exp
@@ -35,5 +35,3 @@ gdb_test_no_output "source ${remote_python_file}" \
 gdb_test "print *t" " = Thu Nov 14 02:22:23 2013 \\(1384395743\\)"
 
 gdb_test "print /r *t" "= 1384395743"
-
-remote_file host delete ${remote_python_file}
diff --git a/gdb/testsuite/gdb.python/py-pp-re-notag.exp b/gdb/testsuite/gdb.python/py-pp-re-notag.exp
index 8149bde..ac4403d 100644
--- a/gdb/testsuite/gdb.python/py-pp-re-notag.exp
+++ b/gdb/testsuite/gdb.python/py-pp-re-notag.exp
@@ -35,5 +35,3 @@ gdb_test_no_output "source ${remote_python_file}" \
 gdb_test "print *t" " = Thu Nov 14 02:22:23 2013 \\(1384395743\\)"
 
 gdb_test "print /r *t" "= 1384395743"
-
-remote_file host delete ${remote_python_file}
diff --git a/gdb/testsuite/gdb.python/py-prettyprint.exp b/gdb/testsuite/gdb.python/py-prettyprint.exp
index 1096389..ae866f0 100644
--- a/gdb/testsuite/gdb.python/py-prettyprint.exp
+++ b/gdb/testsuite/gdb.python/py-prettyprint.exp
@@ -108,8 +108,6 @@ proc run_lang_tests {exefile lang} {
 	"print nstype on one line"
 
     gdb_continue_to_end
-
-    remote_file host delete ${remote_python_file}
 }
 
 run_lang_tests "${binfile}" "c"
@@ -155,5 +153,3 @@ gdb_test_no_output "python enable_lookup_function ()"
 
 gdb_test "print ss" " = a=< a=<1> b=<$hex>> b=< a=<2> b=<$hex>>" \
     "print ss enabled #2"
-
-remote_file host delete ${remote_python_file}
diff --git a/gdb/testsuite/gdb.python/py-section-script.exp b/gdb/testsuite/gdb.python/py-section-script.exp
index 4f465cc..5c868d7 100644
--- a/gdb/testsuite/gdb.python/py-section-script.exp
+++ b/gdb/testsuite/gdb.python/py-section-script.exp
@@ -72,5 +72,3 @@ gdb_test "b [gdb_get_line_number {break to inspect} ${testfile}.c ]" \
 gdb_test "continue" ".*Breakpoint.*"
 
 gdb_test "print ss" " = a=<1> b=<2>"
-
-remote_file host delete ${remote_python_file}
diff --git a/gdb/testsuite/gdb.python/py-typeprint.exp b/gdb/testsuite/gdb.python/py-typeprint.exp
index 1de80bd..ee02091 100644
--- a/gdb/testsuite/gdb.python/py-typeprint.exp
+++ b/gdb/testsuite/gdb.python/py-typeprint.exp
@@ -51,5 +51,3 @@ gdb_test_no_output "enable type-printer string"
 gdb_test "whatis bs" "string" "whatis with enabled printer"
 
 gdb_test "whatis s" "templ<string>"
-
-remote_file host delete ${remote_python_file}
diff --git a/gdb/testsuite/gdb.python/py-xmethods.exp b/gdb/testsuite/gdb.python/py-xmethods.exp
index 8824127..093b4bc 100644
--- a/gdb/testsuite/gdb.python/py-xmethods.exp
+++ b/gdb/testsuite/gdb.python/py-xmethods.exp
@@ -149,5 +149,3 @@ gdb_test_no_output "disable xmethod progspace E_methods;method_int" \
   "disable xmethod progspace E_methods;method_int"
 gdb_test "info xmethod progspace E_methods;method_int" ".* \\\[disabled\\\]" \
   "info xmethod xmethods E_methods;method_int"
-
-remote_file host delete ${xmethods_script}
diff --git a/gdb/testsuite/gdb.stabs/weird.exp b/gdb/testsuite/gdb.stabs/weird.exp
index 5746770..b5efc68 100644
--- a/gdb/testsuite/gdb.stabs/weird.exp
+++ b/gdb/testsuite/gdb.stabs/weird.exp
@@ -325,6 +325,4 @@ gdb_expect 60 {
 
 do_tests
 
-remote_file host delete ${binfile}
-
 return 0
diff --git a/gdb/testsuite/gdb.xml/tdesc-regs.exp b/gdb/testsuite/gdb.xml/tdesc-regs.exp
index 0e4547c..b0b5c7d 100644
--- a/gdb/testsuite/gdb.xml/tdesc-regs.exp
+++ b/gdb/testsuite/gdb.xml/tdesc-regs.exp
@@ -167,7 +167,3 @@ gdb_test "ptype \$bitfields" \
 load_description "core-only.xml" ""
 # The extra register from the previous description should be gone.
 gdb_test "ptype \$extrareg" "type = void"
-
-foreach src ${core-regs} {
-    remote_file host delete $remote_filename($src)
-}
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index e175833..93b004f 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3517,15 +3517,21 @@ proc gdb_touch_execfile { binfile } {
 # standard_output_file to compute the destination.
 
 proc gdb_remote_download {dest fromfile {tofile {}}} {
+    global cleanfiles
+
     if {$dest == "host" && ![is_remote host] && $tofile == ""} {
 	set tofile [standard_output_file [file tail $fromfile]]
     }
 
     if { $tofile == "" } {
-	return [remote_download $dest $fromfile]
+	set destname [remote_download $dest $fromfile]
     } else {
-	return [remote_download $dest $fromfile $tofile]
+	set destname [remote_download $dest $fromfile $tofile]
     }
+    # Keep track of downloaded files and remove them when tests are
+    # done.
+    lappend cleanfiles($dest) $destname
+    return $destname
 }
 
 # gdb_download
-- 
1.9.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/3] Extend cleanfiles for multiple hosts
  2014-08-15  4:04 [PATCH 0/3] Keep track of files copied to host and target Yao Qi
  2014-08-15  4:04 ` [PATCH 3/3] Copy .py files to remote host Yao Qi
@ 2014-08-15  4:04 ` Yao Qi
  2014-08-15  4:04 ` [PATCH 2/3] Keep track of downloaded file in gdb_remote_download Yao Qi
  2014-08-15  5:00 ` [PATCH 0/3] Keep track of files copied to host and target Doug Evans
  3 siblings, 0 replies; 13+ messages in thread
From: Yao Qi @ 2014-08-15  4:04 UTC (permalink / raw)
  To: gdb-patches

Nowadays, GDB testsuite has a list cleanfiles which includes files copies
to target.  This patch is to extend it to an array, in which the key is
the host name, and the value is a list of file names.  In this way,
cleanfiles can be used to keep track of files copied to multiple hosts.
No functionality is changed.

gdb/testsuite:

2014-08-14  Yao Qi  <yao@codesourcery.com>

	* lib/gdb.exp (gdb_download): Find the value in 'cleanfiles' by
	key 'target' and append $destname to it.
	(default_gdb_init): Clear array cleanfiles.
	(gdb_finish): Remove all files in 'cleanfiles' and clear it.
---
 gdb/testsuite/lib/gdb.exp | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 92069c9..e175833 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3537,7 +3537,7 @@ proc gdb_download { filename } {
     global cleanfiles
 
     set destname [remote_download target $filename]
-    lappend cleanfiles $destname
+    lappend cleanfiles(target) $destname
     return $destname
 }
 
@@ -3595,7 +3595,7 @@ proc default_gdb_init { test_file_name } {
     global cleanfiles
     global pf_prefix
     
-    set cleanfiles {}
+    array unset cleanfiles
 
     gdb_clear_suppressed
 
@@ -3862,10 +3862,15 @@ proc gdb_finish { } {
     # Exit first, so that the files are no longer in use.
     gdb_exit
 
-    if { [llength $cleanfiles] > 0 } {
-	eval remote_file target delete $cleanfiles
-	set cleanfiles {}
+    # CLEANFILES is an array, in which the key is host name, such as
+    # 'target' or 'host' etc, and the value is a list of files copied
+    # to the machine represented by the key.
+    foreach dest [array names cleanfiles] {
+	foreach filename $cleanfiles($dest) {
+	    eval remote_file $dest delete $filename
+	}
     }
+    array unset cleanfiles
 
     # Unblock write access to the banned variables.  Dejagnu typically
     # resets some of them between testcases.
-- 
1.9.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/3] Keep track of files copied to host and target
  2014-08-15  4:04 [PATCH 0/3] Keep track of files copied to host and target Yao Qi
                   ` (2 preceding siblings ...)
  2014-08-15  4:04 ` [PATCH 2/3] Keep track of downloaded file in gdb_remote_download Yao Qi
@ 2014-08-15  5:00 ` Doug Evans
  2014-08-15  6:08   ` Yao Qi
  3 siblings, 1 reply; 13+ messages in thread
From: Doug Evans @ 2014-08-15  5:00 UTC (permalink / raw)
  To: Yao Qi; +Cc: gdb-patches

On Thu, Aug 14, 2014 at 8:59 PM, Yao Qi <yao@codesourcery.com> wrote:
> In current GDB testsuite, .py files (in gdb.python), file1.txt (in
> gdb.dwarf2), and .xml files (in gdb.xml) are copied to host at
> the beginning of the tests, and removed at the end of the test.
> However, GDB testsuite also copies files to target, but automatically
> track them in gdb.exp:cleanfiles, and remove them from target when
> each test is finished.
>
> This patch series is teach GDB testsuite to keep track of files copied
> to host and remove them when test is finished, the same as what we
> did for files copied to target.  The files copied to both target and
> host are tracked in an unified way.
>
> Patch #1 is to extend existing cleanfiles for not only target but also
> host.  In patch #2, we start to keep track of files copied to host in
> cleanfiles, so that each test doesn't have to remove them at the end.
> Patch #3 is to copy some needed .py files to host, to fix some fails
> in remote host testing.
>
> The patch series is tested in native and gdbserver on x86_64-linux.
> I also test it with my local board file to emulate gdb native testing
> in a remote host (host == target != build), result looks good.  I'll
> tweak it a little and post it shortly.  I also find some tests don't
> copy needed file to host, and I'll fix them separately.

Hi.

I hate to be a naysayer here, but I'm not convinced we should go down this path.

For one, I like files being left over after a test run.
I would certainly object to cleaning up test binaries in native runs
(at least without providing an easy way to not do that).  I run "make
check" and then manually play with the created binary *all the time*.
I'm quite sure I'd feel the same way if I were doing Canadian Cross
testing, or at least remote host testing.

For another, I'd like to see a patch that cleans up all the other
files (e.g., source files, object files, binaries) that dejagnu
downloads as part of building the testcases.  I could be missing
something, this is based on my experiments and maybe I missed
something. In my experiment, after "make check" had finished (at least
I think it finished) there were ~1000 files in ~30MB left on the
remote host.  If the test didn't finish it may have been because I'd
shutdown my machine too soon. :-) At any rate, it feels like what this
patch set will clean up is a drop in the bucket compared to that.
If we're not going to clean those up, I'd rather not complicate things
further but only solving part of the problem (and a relatively far
smaller part of the problem too).

Can we solve this problem differently perhaps?
Is this just an appeal to some view of cleanliness, or is there a
practical problem (running out of disk space or some such?) that the
patch set is intended to solve?


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/3] Keep track of files copied to host and target
  2014-08-15  5:00 ` [PATCH 0/3] Keep track of files copied to host and target Doug Evans
@ 2014-08-15  6:08   ` Yao Qi
  2014-08-16  0:38     ` Doug Evans
  0 siblings, 1 reply; 13+ messages in thread
From: Yao Qi @ 2014-08-15  6:08 UTC (permalink / raw)
  To: Doug Evans; +Cc: gdb-patches

On 08/15/2014 01:00 PM, Doug Evans wrote:
> I hate to be a naysayer here, but I'm not convinced we should go down this path.
> 

This patch set is to make gdb testsuite follow the convention that copy
files to machine and remove them at the end.  Nowadays, these files are
*.xml, *.py and file1.txt.  This patch set releases test writers'
burden that manually removing copied files, so it becomes easier to
write tests.

I don't know how this convention was made, but I'd like to follow it.

> For one, I like files being left over after a test run.
> I would certainly object to cleaning up test binaries in native runs
> (at least without providing an easy way to not do that).  I run "make
> check" and then manually play with the created binary *all the time*.
> I'm quite sure I'd feel the same way if I were doing Canadian Cross
> testing, or at least remote host testing.

This patch set doesn't clean up binaries nor object files.  It only
cleans up *.xml, *.py and file1.txt.

> 
> For another, I'd like to see a patch that cleans up all the other
> files (e.g., source files, object files, binaries) that dejagnu
> downloads as part of building the testcases.  I could be missing
> something, this is based on my experiments and maybe I missed
> something. In my experiment, after "make check" had finished (at least
> I think it finished) there were ~1000 files in ~30MB left on the
> remote host.  If the test didn't finish it may have been because I'd
> shutdown my machine too soon. :-) At any rate, it feels like what this
> patch set will clean up is a drop in the bucket compared to that.
> If we're not going to clean those up, I'd rather not complicate things
> further but only solving part of the problem (and a relatively far
> smaller part of the problem too).

Yes, if we don't clean files up, patch #3 should be sufficient for the
problem I encountered.  However, IMO, whether the existing convention
is good or bad, or do we want to move to "keep-everything" path, is
a separate topic and out of the scope of this patch set.

Even we get consensus in the future, this patch set won't make any
troubles to us to go to any path.  If we want to keep everything, we can
simply remove variable cleanfiles and its usages.  If we want to delete
everything, we can add extra .c and .o files to cleanfiles.  This patch
set is still useful.

> 
> Can we solve this problem differently perhaps?
> Is this just an appeal to some view of cleanliness, or is there a
> practical problem (running out of disk space or some such?) that the
> patch set is intended to solve?

The patch set is intended to follow the existing convention of copying
and deleting files.

-- 
Yao (齐尧)


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/3] Keep track of files copied to host and target
  2014-08-15  6:08   ` Yao Qi
@ 2014-08-16  0:38     ` Doug Evans
  2014-08-20  6:54       ` Yao Qi
  0 siblings, 1 reply; 13+ messages in thread
From: Doug Evans @ 2014-08-16  0:38 UTC (permalink / raw)
  To: Yao Qi; +Cc: gdb-patches

On Thu, Aug 14, 2014 at 11:04 PM, Yao Qi <yao@codesourcery.com> wrote:
> On 08/15/2014 01:00 PM, Doug Evans wrote:
>> I hate to be a naysayer here, but I'm not convinced we should go down this path.
>>
>
> This patch set is to make gdb testsuite follow the convention that copy
> files to machine and remove them at the end.  Nowadays, these files are
> *.xml, *.py and file1.txt.  This patch set releases test writers'
> burden that manually removing copied files, so it becomes easier to
> write tests.
>
> I don't know how this convention was made, but I'd like to follow it.

We could instead have a convention that we just don't bother to clean
up files downloaded to remote hosts.
That's what's already done for the majority of files downloaded to
remote hosts, so treating these files differently strikes me as
unnecessary added complexity.  Plus, when one is faced with having to
debug a failure, one isn't hampered by having to refetch whatever
files happened to get deleted.

>> For one, I like files being left over after a test run.
>> I would certainly object to cleaning up test binaries in native runs
>> (at least without providing an easy way to not do that).  I run "make
>> check" and then manually play with the created binary *all the time*.
>> I'm quite sure I'd feel the same way if I were doing Canadian Cross
>> testing, or at least remote host testing.
>
> This patch set doesn't clean up binaries nor object files.  It only
> cleans up *.xml, *.py and file1.txt.

These files can often also be required to debug failures.

>>
>> For another, I'd like to see a patch that cleans up all the other
>> files (e.g., source files, object files, binaries) that dejagnu
>> downloads as part of building the testcases.  I could be missing
>> something, this is based on my experiments and maybe I missed
>> something. In my experiment, after "make check" had finished (at least
>> I think it finished) there were ~1000 files in ~30MB left on the
>> remote host.  If the test didn't finish it may have been because I'd
>> shutdown my machine too soon. :-) At any rate, it feels like what this
>> patch set will clean up is a drop in the bucket compared to that.
>> If we're not going to clean those up, I'd rather not complicate things
>> further but only solving part of the problem (and a relatively far
>> smaller part of the problem too).
>
> Yes, if we don't clean files up, patch #3 should be sufficient for the
> problem I encountered.  However, IMO, whether the existing convention
> is good or bad, or do we want to move to "keep-everything" path, is
> a separate topic and out of the scope of this patch set.

Out of scope how?

> Even we get consensus in the future, this patch set won't make any
> troubles to us to go to any path.  If we want to keep everything, we can
> simply remove variable cleanfiles and its usages.  If we want to delete
> everything, we can add extra .c and .o files to cleanfiles.  This patch
> set is still useful.
>
>>
>> Can we solve this problem differently perhaps?
>> Is this just an appeal to some view of cleanliness, or is there a
>> practical problem (running out of disk space or some such?) that the
>> patch set is intended to solve?
>
> The patch set is intended to follow the existing convention of copying
> and deleting files.

Sure, but I'd like to get a better understanding of the technical
reasons for doing so.
There are technical reasons for not doing so (easier to debug
failures, why add complexity that solves only a small portion of the
entire problem).


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/3] Keep track of files copied to host and target
  2014-08-16  0:38     ` Doug Evans
@ 2014-08-20  6:54       ` Yao Qi
  2014-08-20 15:17         ` Pedro Alves
  2014-08-20 15:48         ` Doug Evans
  0 siblings, 2 replies; 13+ messages in thread
From: Yao Qi @ 2014-08-20  6:54 UTC (permalink / raw)
  To: Doug Evans; +Cc: gdb-patches

On 08/16/2014 08:38 AM, Doug Evans wrote:
> We could instead have a convention that we just don't bother to clean
> up files downloaded to remote hosts.

This patch https://sourceware.org/ml/gdb-patches/2009-11/msg00264.html
is the first one downloading files to remote host and deleting them when
test is finished.  After that, people just follow this convention, and
add test cases in this way.  Unfortunately, no technical reason is
mentioned in the patch about why we have to delete files on remote host.


> Sure, but I'd like to get a better understanding of the technical
> reasons for doing so.

I don't know any technical reasons either.  What I can tell from the
patch above is that "the first person did so, and the rest follow the
way he did".

Looks this patch set review is stalled.  You worried about the direction
or convention that we only delete part of files copied to host, but I
don't know the answer of your questions, which are about the convention
rather than patches.  I don't think my patch set makes it worse or
better.  It still make the effect of running testsuite unchanged, in
terms of files left on target and host.

At the same time, fails in gdb.python on remote host are still there
because patch 3/3 is pending.  My goal of this patch series is to fix
these fails, but I don't know how to move forward now.

-- 
Yao (齐尧)


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/3] Keep track of files copied to host and target
  2014-08-20  6:54       ` Yao Qi
@ 2014-08-20 15:17         ` Pedro Alves
  2014-08-20 15:48         ` Doug Evans
  1 sibling, 0 replies; 13+ messages in thread
From: Pedro Alves @ 2014-08-20 15:17 UTC (permalink / raw)
  To: Yao Qi, Doug Evans; +Cc: gdb-patches

On 08/20/2014 07:50 AM, Yao Qi wrote:
> At the same time, fails in gdb.python on remote host are still there
> because patch 3/3 is pending.  My goal of this patch series is to fix
> these fails, but I don't know how to move forward now.

Isn't that patch independent of the rest?  Or could be trivially be
made independent?

Thanks,
Pedro Alves


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/3] Keep track of files copied to host and target
  2014-08-20  6:54       ` Yao Qi
  2014-08-20 15:17         ` Pedro Alves
@ 2014-08-20 15:48         ` Doug Evans
  2014-08-21  0:35           ` Yao Qi
  1 sibling, 1 reply; 13+ messages in thread
From: Doug Evans @ 2014-08-20 15:48 UTC (permalink / raw)
  To: Yao Qi; +Cc: gdb-patches

Yao Qi writes:
 > At the same time, fails in gdb.python on remote host are still there
 > because patch 3/3 is pending.  My goal of this patch series is to fix
 > these fails, but I don't know how to move forward now.

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.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/3] Keep track of files copied to host and target
  2014-08-20 15:48         ` Doug Evans
@ 2014-08-21  0:35           ` Yao Qi
  2014-08-21 17:32             ` Doug Evans
  0 siblings, 1 reply; 13+ messages in thread
From: Yao Qi @ 2014-08-21  0:35 UTC (permalink / raw)
  To: Doug Evans; +Cc: gdb-patches

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?

-- 
Yao (齐尧)

Subject: [PATCH] Copy .py files to remote host

Some gdb.python/*.exp tests fail because the .py files aren't copied
to the (remote) host.  This patch is to copy needed .py files to host.
Most of gdb.python/*.exp tests do this.

As it is still controversial to delete *.py files on host, we don't do
that in this patch.

gdb/testsuite:

2014-08-21  Yao Qi  <yao@codesourcery.com>

	* gdb.python/py-finish-breakpoint.exp: Copy .py file to host.
	* gdb.python/py-finish-breakpoint2.exp: Likewise.
	* gdb.python/python.exp: Likewise.  Use .py file on the host
	instead of the build.
---
 gdb/testsuite/gdb.python/py-finish-breakpoint.exp  | 6 +++---
 gdb/testsuite/gdb.python/py-finish-breakpoint2.exp | 4 +++-
 gdb/testsuite/gdb.python/python.exp                | 7 +++++--
 3 files changed, 11 insertions(+), 6 deletions(-)

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"
 
-- 
1.9.3



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/3] Keep track of files copied to host and target
  2014-08-21  0:35           ` Yao Qi
@ 2014-08-21 17:32             ` Doug Evans
  2014-08-22  6:14               ` Yao Qi
  0 siblings, 1 reply; 13+ messages in thread
From: Doug Evans @ 2014-08-21 17:32 UTC (permalink / raw)
  To: Yao Qi; +Cc: gdb-patches

Yao Qi writes:
 > 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?
 > 
 > -- 
 > Yao (  )
 > 
 > Subject: [PATCH] Copy .py files to remote host
 > 
 > Some gdb.python/*.exp tests fail because the .py files aren't copied
 > to the (remote) host.  This patch is to copy needed .py files to host.
 > Most of gdb.python/*.exp tests do this.
 > 
 > As it is still controversial to delete *.py files on host, we don't do
 > that in this patch.
 > 
 > gdb/testsuite:
 > 
 > 2014-08-21  Yao Qi  <yao@codesourcery.com>
 > 
 > 	* gdb.python/py-finish-breakpoint.exp: Copy .py file to host.
 > 	* gdb.python/py-finish-breakpoint2.exp: Likewise.
 > 	* gdb.python/python.exp: Likewise.  Use .py file on the host
 > 	instead of the build.

LGTM

For reference sake,

It seems there's a roughly equal measure of usage of
remote_download versus gdb_remote_download in the testsuite
for downloading to the host
(though I didn't count which usages of gdb_remote_download
actually need its extra functionality).
Long term, if you wanted to migrate other uses of remote_download
to gdb_remote_download for nothing other than consistency's sake
that would be fine with me.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/3] Keep track of files copied to host and target
  2014-08-21 17:32             ` Doug Evans
@ 2014-08-22  6:14               ` Yao Qi
  0 siblings, 0 replies; 13+ messages in thread
From: Yao Qi @ 2014-08-22  6:14 UTC (permalink / raw)
  To: Doug Evans; +Cc: gdb-patches

Doug Evans <dje@google.com> writes:

> Yao Qi writes:
>  > 
>  > gdb/testsuite:
>  > 
>  > 2014-08-21  Yao Qi  <yao@codesourcery.com>
>  > 
>  > 	* gdb.python/py-finish-breakpoint.exp: Copy .py file to host.
>  > 	* gdb.python/py-finish-breakpoint2.exp: Likewise.
>  > 	* gdb.python/python.exp: Likewise.  Use .py file on the host
>  > 	instead of the build.
>
> LGTM
>

OK, patch is pushed in.

> For reference sake,
>
> It seems there's a roughly equal measure of usage of
> remote_download versus gdb_remote_download in the testsuite
> for downloading to the host
> (though I didn't count which usages of gdb_remote_download
> actually need its extra functionality).
> Long term, if you wanted to migrate other uses of remote_download
> to gdb_remote_download for nothing other than consistency's sake
> that would be fine with me.

Thanks for letting us know your thoughts on this.

-- 
Yao (齐尧)


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-08-22  6:14 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-15  4:04 [PATCH 0/3] Keep track of files copied to host and target Yao Qi
2014-08-15  4:04 ` [PATCH 3/3] Copy .py files to remote host Yao Qi
2014-08-15  4:04 ` [PATCH 1/3] Extend cleanfiles for multiple hosts Yao Qi
2014-08-15  4:04 ` [PATCH 2/3] Keep track of downloaded file in gdb_remote_download Yao Qi
2014-08-15  5:00 ` [PATCH 0/3] Keep track of files copied to host and target Doug Evans
2014-08-15  6:08   ` Yao Qi
2014-08-16  0:38     ` Doug Evans
2014-08-20  6:54       ` Yao Qi
2014-08-20 15:17         ` Pedro Alves
2014-08-20 15:48         ` Doug Evans
2014-08-21  0:35           ` Yao Qi
2014-08-21 17:32             ` Doug Evans
2014-08-22  6:14               ` Yao Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox