* [patch] testsuite: Disable parts of gdb.base/source-dir.exp on remote host.
@ 2020-06-20 17:44 Sandra Loosemore
2020-06-20 17:54 ` Pedro Alves
0 siblings, 1 reply; 2+ messages in thread
From: Sandra Loosemore @ 2020-06-20 17:44 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 1074 bytes --]
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
[-- Attachment #2: source-dir.patch --]
[-- Type: text/x-patch, Size: 1947 bytes --]
commit 2b5545b90c0d22953ce8cf1906f4ee40c0cf820b
Author: Sandra Loosemore <sandra@codesourcery.com>
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 <sandra@codesourcery.com>
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 <sandra@codesourcery.com>
+
+ * 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 <sandra@codesourcery.com>
Hafiz Abid Qadeer <abidh@codesourcery.com>
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"
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [patch] testsuite: Disable parts of gdb.base/source-dir.exp on remote host.
2020-06-20 17:44 [patch] testsuite: Disable parts of gdb.base/source-dir.exp on remote host Sandra Loosemore
@ 2020-06-20 17:54 ` Pedro Alves
0 siblings, 0 replies; 2+ messages in thread
From: Pedro Alves @ 2020-06-20 17:54 UTC (permalink / raw)
To: Sandra Loosemore, gdb-patches
On 6/20/20 6:44 PM, Sandra Loosemore wrote:
> 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?
This is OK, but please make sure that the info above ends up
in the commit log as well (wrapped at 72-character columns per
standard git convention).
(Nit -- convention is to not end the subject line with a period.)
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-20 17:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-20 17:44 [patch] testsuite: Disable parts of gdb.base/source-dir.exp on remote host Sandra Loosemore
2020-06-20 17:54 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox