From 835b995b576d14fa9b73fb763d5186323b1365b6 Mon Sep 17 00:00:00 2001 From: Sandra Loosemore Date: Thu, 15 Aug 2019 10:17:54 -0700 Subject: [PATCH] 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 gdb/testsuite/ * gdb.base/batch-preserve-term-settings.exp (test_terminal_settings_preserved_after_sigterm): Skip on Windows. --- 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 12491151c54..c459bee55f3 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-08-15 Sandra Loosemore + + * gdb.base/batch-preserve-term-settings.exp + (test_terminal_settings_preserved_after_sigterm): Skip on Windows. + 2019-08-15 Christian Biesinger * 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 ebb494b8d44..27b7a7a536d 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 } -- 2.30.2