This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Skip batch-preserve-term-settings.exp tests that cannot work on Windows.


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=835b995b576d14fa9b73fb763d5186323b1365b6

commit 835b995b576d14fa9b73fb763d5186323b1365b6
Author: Sandra Loosemore <sandra@codesourcery.com>
Date:   Thu Aug 15 10:17:54 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-15  Sandra Loosemore  <sandra@codesourcery.com>
    
    	gdb/testsuite/
    	* gdb.base/batch-preserve-term-settings.exp
    	(test_terminal_settings_preserved_after_sigterm): Skip on Windows.

Diff:
---
 gdb/testsuite/ChangeLog                                 | 5 +++++
 gdb/testsuite/gdb.base/batch-preserve-term-settings.exp | 7 +++++++
 2 files changed, 12 insertions(+)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 1249115..c459bee 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-08-15  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.base/batch-preserve-term-settings.exp
+	(test_terminal_settings_preserved_after_sigterm): Skip on Windows.
+
 2019-08-15  Christian Biesinger  <cbiesinger@google.com>
 
 	* lib/gdb.exp: When running on a mingw target, replace
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
     }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]