From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id A27AC383E827 for ; Sat, 20 Jun 2020 17:44:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A27AC383E827 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Sandra_Loosemore@mentor.com IronPort-SDR: x6ieG40Duq9RYpi9MrNww0WgbAX/T8yZwXCT62mM/7NEoyRuENMfyHV8P71VVriOvhZG2SEFFp G0u1HQ9qfGCiCq3ZDfEtslq0ZHHpZGFzNc5xPkc/teBEEY6IyMzvgZpxfllCjjwSCbf+iXpspX tMjkSsTnMMPuAqsuqMjxYEWbRws8Mb2HU7tmKUiyRyA1VB4vj1qr6LcovQPGPjM/5otlTGsNLQ 8pnB4Yk+ichXKGWDwyVSyuumCNiCWxwzRPRMX5DSJjZFtaESRN9cfQNdsBlCZx9A1lltK/I7GN GR8= X-IronPort-AV: E=Sophos;i="5.75,258,1589270400"; d="scan'208";a="50144391" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 20 Jun 2020 09:44:34 -0800 IronPort-SDR: rRaik0eTCJICyO475lrLeKwPbiD6mHEG/gb8WFqQhsYPDo8fIKYe5t61SSzAP1v6HKEJkwgnuB g5DMFIze7MKyPbYLyt5EgeUPjbRm+Ham5nYqWFiC/pyeYyi0K9+Jfdocvx2kk78u9Od2sxef5u wtN56P/xIz/n2IksZUO6pdXrnpRJOW5IzIPkGMDf+l2EcBFe+kzG2SxgxC9Hs2iol95/vk8zDx axvs0iIl/g0GjB3R0HvhudvVzsqoLIeaaKMD86DmQ88Pc2d5t/uibHa1XLwNlcUUopukJmdB/E nug= To: "gdb-patches@sourceware.org" From: Sandra Loosemore Subject: [patch] testsuite: Disable parts of gdb.base/source-dir.exp on remote host. Message-ID: <6ac784c5-25e4-c2b5-06e1-9fd527533e4d@codesourcery.com> Date: Sat, 20 Jun 2020 11:44:27 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------6ED2D9A0F66447C798EADB63" Content-Language: en-US X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Jun 2020 17:44:37 -0000 --------------6ED2D9A0F66447C798EADB63 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit One set of tests in gdb.base/source-dir.exp does a lot of complicated directory manipulations to force a specific DW_AT_comp_dir format and gdb directory search path. As it's written, everything assumes host == build, and it does not seem to me that there is any obvious way to rewrite this so it will work in general on remote host. For instance, our harness for testing on remote Windows host normally does all compilation and GDB execution in $cwd using relative pathnames and I'm not sure all these directory tricks would set up the scenario it's trying to test even if they were correctly performed on host rather than build. So I think it's reasonable just to disable this on remote host instead. I also noted that it's using the wrong search path syntax for Windows host in the "set directories" command and conditionalized that while I was looking at it. That's a necessary fix to make this work in a situation where host == build and it's Windows, but I'm not actually set up to test that it's sufficient, too. OK to check this in? -Sandra --------------6ED2D9A0F66447C798EADB63 Content-Type: text/x-patch; charset="UTF-8"; name="source-dir.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="source-dir.patch" commit 2b5545b90c0d22953ce8cf1906f4ee40c0cf820b Author: Sandra Loosemore Date: Sat Jun 20 10:23:55 2020 -0700 Disable parts of gdb.base/source-dir.exp on remote host. 2020-06-20 Sandra Loosemore gdb/testsuite/ * gdb.base/source-dir.exp (test_truncated_comp_dir): Skip on remote host. Fix search path syntax on Windows host. diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 36662f9..01cba32 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-06-20 Sandra Loosemore + + * gdb.base/source-dir.exp (test_truncated_comp_dir): Skip on + remote host. Fix search path syntax on Windows host. + 2020-06-19 Sandra Loosemore Hafiz Abid Qadeer diff --git a/gdb/testsuite/gdb.base/source-dir.exp b/gdb/testsuite/gdb.base/source-dir.exp index 8f70352..093dda7 100644 --- a/gdb/testsuite/gdb.base/source-dir.exp +++ b/gdb/testsuite/gdb.base/source-dir.exp @@ -81,6 +81,12 @@ proc test_truncated_comp_dir {} { # find the source file no matter what we added to the directory # search path, this should now be fixed. + # All of these pathname and directory manipulations assume + # host == build, so do not attempt this set of tests on remote host. + if [is_remote host] { + return + } + set original_dir [pwd] set working_dir [standard_output_file ""] cd ${working_dir} @@ -108,7 +114,11 @@ proc test_truncated_comp_dir {} { clean_restart ${binfile} - gdb_test_no_output "set directories \$cdir:\$cwd" + if { [ishost *-*-mingw*] } { + gdb_test_no_output "set directories \$cdir;\$cwd" + } else { + gdb_test_no_output "set directories \$cdir:\$cwd" + } gdb_test "show directories" \ "\r\nSource directories searched: \\\$cdir\[:;\]\\\$cwd" --------------6ED2D9A0F66447C798EADB63--