public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [patch, testsuite] Skip batch-preserve-term-settings.exp tests that cannot work on Windows
@ 2019-08-13 22:18 Sandra Loosemore
  2019-08-15  3:09 ` Simon Marchi
  0 siblings, 1 reply; 2+ messages in thread
From: Sandra Loosemore @ 2019-08-13 22:18 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 113 bytes --]

Here's another in my series of patches to clean up test results on 
remote Windows host.  OK to commit?

-Sandra

[-- Attachment #2: batch-preserve-term-settings.patch --]
[-- Type: text/x-patch, Size: 1914 bytes --]

commit 9d18683821f58c98722626aa2b2672876b6f513a
Author: Sandra Loosemore <sandra@codesourcery.com>
Date:   Tue Aug 13 14:43:59 2019 -0700

    Skip batch-preserve-term-settings.exp tests that cannot work on Windows.
    
    This group of tests assume that the gdb "shell" command launches a
    POSIX-compliant shell supporting the PPID environment variable, which
    is used to get gdb's pid for killing it from a remote_exec shell.  But
    on Windows host "shell" launches cmd.exe, which doesn't have an
    equivalent query.
    
    2019-08-13  Sandra Loosemore  <sandra@codesourcery.com>
    
    	gdb/testsuite
    	* gdb.base/batch-preserve-term-settings.exp
    	(test_terminal_settings_preserved_after_sigterm): Skip on Windows.

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index e4b9616..38689c1 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-08-13  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.base/batch-preserve-term-settings.exp
+	(test_terminal_settings_preserved_after_sigterm): Skip on Windows.
+
 2019-08-13  Tom de Vries  <tdevries@suse.de>
 
 	* gdb.gdb/selftest.exp (send ^C to child process again): Accept also
diff --git a/gdb/testsuite/gdb.base/batch-preserve-term-settings.exp b/gdb/testsuite/gdb.base/batch-preserve-term-settings.exp
index ebb494b..27b7a7a 100644
--- a/gdb/testsuite/gdb.base/batch-preserve-term-settings.exp
+++ b/gdb/testsuite/gdb.base/batch-preserve-term-settings.exp
@@ -273,6 +273,13 @@ proc test_terminal_settings_preserved_after_sigterm { } {
     global gdb_prompt
     global shell_prompt_re
 
+    # On Windows, GDB's "shell" command spawns cmd.exe, which does not
+    # understand PPID.  So we're out of luck even if the test harness
+    # uses a remote_exec shell with a working "kill" command.
+    if [ishost *-*-mingw*] {
+	return
+    }
+
     if ![spawn_shell] {
 	return
     }

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

* Re: [patch, testsuite] Skip batch-preserve-term-settings.exp tests that cannot work on Windows
  2019-08-13 22:18 [patch, testsuite] Skip batch-preserve-term-settings.exp tests that cannot work on Windows Sandra Loosemore
@ 2019-08-15  3:09 ` Simon Marchi
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Marchi @ 2019-08-15  3:09 UTC (permalink / raw)
  To: Sandra Loosemore, gdb-patches

On 2019-08-13 6:18 p.m., Sandra Loosemore wrote:
> Here's another in my series of patches to clean up test results on 
> remote Windows host.  OK to commit?
> 
> -Sandra
> 

Thanks, this LGTM.

Simon

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

end of thread, other threads:[~2019-08-15  3:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-13 22:18 [patch, testsuite] Skip batch-preserve-term-settings.exp tests that cannot work on Windows Sandra Loosemore
2019-08-15  3:09 ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).