From patchwork Mon Jun 16 17:35:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janis Johnson X-Patchwork-Id: 1513 Received: (qmail 22011 invoked by alias); 16 Jun 2014 17:35:24 -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 21988 invoked by uid 89); 16 Jun 2014 17:35:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 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; Mon, 16 Jun 2014 17:35:20 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1WwaoP-0003SB-Kp from Janis_Johnson@mentor.com for gdb-patches@sourceware.org; Mon, 16 Jun 2014 10:35:17 -0700 Received: from SVR-ORW-FEM-06.mgc.mentorg.com ([147.34.97.120]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 16 Jun 2014 10:35:17 -0700 Received: from [127.0.0.1] (147.34.91.1) by SVR-ORW-FEM-06.mgc.mentorg.com (147.34.97.120) with Microsoft SMTP Server id 14.2.247.3; Mon, 16 Jun 2014 10:35:16 -0700 Message-ID: <539F2AD5.4020007@mentor.com> Date: Mon, 16 Jun 2014 10:35:17 -0700 From: Janis Johnson Reply-To: User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Subject: re: [patch] skip tests that use cd for remote hosts > Several GDB tests change directory before compiling the test program in > order to test source file names that include directories. This doesn't > work on a remote host because default_target_compile in DejaGnu's > target.exp copies each source file with "[remote_download host $x]" > which uses "[file tail $file] to strip off the directory of each file. > If the source directory is remote mounted on the host, this also leaves > copied files in the source directory. > > A similar skip is already used in gdb.test/fullname.exp: > > # We rely on being able to copy things around. > > if { [is_remote host] } { > untested "setting breakpoints by full path" > return -1 > } > > This patch causes three GDB tests that use "cd" to be skipped for a > remote host. For gdb.base/fullpath-expand.exp this eliminates two > failures and prevents the test from leaving files fullpath-expand.c > and fullpath-expand-func.c in gdb/testsuite. For > gdb.base/realname-expand.exp it eliminates two failures. For > gdb.linespec/macro-relative.exp it prevents file macro-relative.c from > being left in gdb/testsuite/gdb.linespec/base/two. > > I'm not set up to test this with a build of upstream gdb but have tested > it with a remote host using arm-none-gnueabi with relavent DejaGnu and > GDB tests that are the same as in upstream. OK? > > Janis Johnson > CodeSourcery / Mentor Graphics Sorry, I forgot the patch and I'm not subscribed to the list and couldn't reply properly. Here's the patch. Janis 2014-06-16 Janis Johnson * gdb.base/fullpath-expand.exp: Skip for a remote host. * gdb.base/realname-expand.exp: Likewise. * gdb.linespec/macro-relative.exp: Likewise. Index: gdb/testsuite/gdb.base/fullpath-expand.exp =================================================================== --- gdb/testsuite/gdb.base/fullpath-expand.exp (revision 433970) +++ gdb/testsuite/gdb.base/fullpath-expand.exp (working copy) @@ -15,6 +15,11 @@ standard_testfile .c fullpath-expand-func.c +if [is_remote host] { + unsupported "Compiling on a remote host does not support a filename with directory." + return 0 +} + if { [file pathtype $objdir] != "absolute" } { untested "objdir $objdir is not absolute" return -1 Index: gdb/testsuite/gdb.base/realname-expand.exp =================================================================== --- gdb/testsuite/gdb.base/realname-expand.exp (revision 433970) +++ gdb/testsuite/gdb.base/realname-expand.exp (working copy) @@ -15,6 +15,11 @@ standard_testfile .c realname-expand-real.c +if [is_remote host] { + unsupported "Compiling on a remote host does not support a filename with directory." + return 0 +} + set srcdirabs [file join [pwd] $srcdir] set srcfilelink [standard_output_file realname-expand-link.c] Index: gdb/testsuite/gdb.linespec/macro-relative.exp =================================================================== --- gdb/testsuite/gdb.linespec/macro-relative.exp (revision 433970) +++ gdb/testsuite/gdb.linespec/macro-relative.exp (working copy) @@ -15,6 +15,11 @@ standard_testfile +if [is_remote host] { + unsupported "Compiling on a remote host does not support a filename with directory." + return 0 +} + set opts {debug additional_flags=-I.} get_compiler_info