From patchwork Sat Jul 12 21:05:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kratochvil X-Patchwork-Id: 2046 Received: (qmail 19705 invoked by alias); 12 Jul 2014 21:05:41 -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 19691 invoked by uid 89); 12 Jul 2014 21:05:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.4 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 12 Jul 2014 21:05:38 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6CL5ava026869 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sat, 12 Jul 2014 17:05:36 -0400 Received: from host2.jankratochvil.net (ovpn-116-54.ams2.redhat.com [10.36.116.54]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s6CL5WsC031431 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO) for ; Sat, 12 Jul 2014 17:05:35 -0400 Date: Sat, 12 Jul 2014 23:05:32 +0200 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [patch+7.8] PR testsuite/16602 runtest deletes files in-src-tree Message-ID: <20140712210532.GA8417@host2.jankratochvil.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes Hi, this affects testsuite run with GDB built in source tree, that is: ./configure; make; cd gdb/testsuite; runtest gdb.*/*.exp This is rejected for GCC but so far GDB always permitted this mode of build. https://sourceware.org/bugzilla/show_bug.cgi?id=16602 ------------------------------------------------------------------------------ cd .../gdb/testsuite.unix.-m64; runtest gdb.python/*.exp = OK cd .../gdb/testsuite; runtest gdb.python/*.exp [...] Running ./gdb.python/py-prettyprint.exp ... ERROR: remote_download to host of ./gdb.python/py-prettyprint.py to /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.python/py-prettyprint.py: cp: cannot stat './gdb.python/py-prettyprint.py': No such file or directory [...] Running ./gdb.python/py-mi.exp ... ERROR: remote_download to host of ./gdb.python/py-prettyprint.py to /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.python/py-prettyprint.py: cp: cannot stat './gdb.python/py-prettyprint.py': No such file or directory [...] git status deleted: gdb.python/py-frame-args.py deleted: gdb.python/py-framefilter.py deleted: gdb.python/py-pp-integral.py deleted: gdb.python/py-prettyprint.py deleted: gdb.python/py-section-script.py deleted: gdb.python/py-typeprint.py ------------------------------------------------------------------------------ I have tested every changed file in its unpatched version deletes one file. I have tested runtest gdb.*/*.exp on patched tree no longer deletes anything. I have not tested testsuite run with remote host. I have run normal regression test on {x86_64,x86_64-m32,i686}-fedora20-linux-gnu with and without gdbserver mode. Thanks, Jan gdb/testsuite/ 2014-07-12 Jan Kratochvil PR testsuite/16602 * gdb.base/step-line.exp: Wrap "remote_file host delete" into [is_remote host] conditional. * 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-framefilter.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. diff --git a/gdb/testsuite/gdb.base/step-line.exp b/gdb/testsuite/gdb.base/step-line.exp index 94799f8..1de77b3 100644 --- a/gdb/testsuite/gdb.base/step-line.exp +++ b/gdb/testsuite/gdb.base/step-line.exp @@ -82,6 +82,8 @@ gdb_test "next" \ ".*RETURN \\(j\\);.*" \ "next over dummy 10" -remote_file host delete ${remote_linefile} +if [is_remote host] { + 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..3ee795d 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp @@ -36,4 +36,6 @@ set remote_dwarf_srcfile [gdb_remote_download host \ # 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} +if [is_remote host] { + 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..16a0b6a 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-basic.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-basic.exp @@ -36,4 +36,6 @@ 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} +if [is_remote host] { + 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..9160316 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp @@ -38,4 +38,6 @@ 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} +if [is_remote host] { + 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 c9ead97..8eed1e4 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-filename.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-filename.exp @@ -43,4 +43,6 @@ 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} +if [is_remote host] { + 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..8367928 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp @@ -43,4 +43,6 @@ 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} +if [is_remote host] { + 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..dc91a0e 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp @@ -36,4 +36,6 @@ 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} +if [is_remote host] { + 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..65ecb9e 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-producer.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-producer.exp @@ -34,4 +34,6 @@ 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} +if [is_remote host] { + 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..6f57ce5 100644 --- a/gdb/testsuite/gdb.dwarf2/mac-fileno.exp +++ b/gdb/testsuite/gdb.dwarf2/mac-fileno.exp @@ -37,4 +37,6 @@ 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} +if [is_remote host] { + 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..dcaf711 100644 --- a/gdb/testsuite/gdb.python/py-frame-args.exp +++ b/gdb/testsuite/gdb.python/py-frame-args.exp @@ -69,4 +69,6 @@ gdb_test "frame" \ ".*foo \\(x=42, ss={a = {m = 1}, b = {m = 2}}\\).*" \ "frame raw,all" -remote_file host delete ${remote_python_file} +if [is_remote host] { + remote_file host delete ${remote_python_file} +} diff --git a/gdb/testsuite/gdb.python/py-framefilter.exp b/gdb/testsuite/gdb.python/py-framefilter.exp index 948ae94..33c8742 100644 --- a/gdb/testsuite/gdb.python/py-framefilter.exp +++ b/gdb/testsuite/gdb.python/py-framefilter.exp @@ -188,7 +188,9 @@ gdb_test_multiple "bt 1" $test { } } -remote_file host delete ${remote_python_file} +if [is_remote host] { + remote_file host delete ${remote_python_file} +} # Test with no debuginfo diff --git a/gdb/testsuite/gdb.python/py-mi.exp b/gdb/testsuite/gdb.python/py-mi.exp index 5959175..1c7a86b 100644 --- a/gdb/testsuite/gdb.python/py-mi.exp +++ b/gdb/testsuite/gdb.python/py-mi.exp @@ -357,4 +357,6 @@ 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} +if [is_remote host] { + 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..189f79c 100644 --- a/gdb/testsuite/gdb.python/py-pp-integral.exp +++ b/gdb/testsuite/gdb.python/py-pp-integral.exp @@ -36,4 +36,6 @@ 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} +if [is_remote host] { + 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..189f79c 100644 --- a/gdb/testsuite/gdb.python/py-pp-re-notag.exp +++ b/gdb/testsuite/gdb.python/py-pp-re-notag.exp @@ -36,4 +36,6 @@ 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} +if [is_remote host] { + 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 491b52d..0a41864 100644 --- a/gdb/testsuite/gdb.python/py-prettyprint.exp +++ b/gdb/testsuite/gdb.python/py-prettyprint.exp @@ -106,7 +106,9 @@ proc run_lang_tests {exefile lang} { gdb_continue_to_end - remote_file host delete ${remote_python_file} + if [is_remote host] { + remote_file host delete ${remote_python_file} + } } run_lang_tests "${binfile}" "c" @@ -153,4 +155,6 @@ 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} +if [is_remote host] { + 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..32e43f4 100644 --- a/gdb/testsuite/gdb.python/py-section-script.exp +++ b/gdb/testsuite/gdb.python/py-section-script.exp @@ -73,4 +73,6 @@ gdb_test "continue" ".*Breakpoint.*" gdb_test "print ss" " = a=<1> b=<2>" -remote_file host delete ${remote_python_file} +if [is_remote host] { + 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..e2f68d7 100644 --- a/gdb/testsuite/gdb.python/py-typeprint.exp +++ b/gdb/testsuite/gdb.python/py-typeprint.exp @@ -52,4 +52,6 @@ gdb_test "whatis bs" "string" "whatis with enabled printer" gdb_test "whatis s" "templ" -remote_file host delete ${remote_python_file} +if [is_remote host] { + 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..5501528 100644 --- a/gdb/testsuite/gdb.python/py-xmethods.exp +++ b/gdb/testsuite/gdb.python/py-xmethods.exp @@ -150,4 +150,6 @@ gdb_test_no_output "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} +if [is_remote host] { + remote_file host delete ${xmethods_script} +}