From 9d52d669cba2972545d69683e6b4db661786fd79 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 5 Oct 2018 00:27:25 +0200 Subject: [PATCH] spawn-pipe tests: Avoid test failure on native Windows. * tests/test-spawn-pipe-child.c (main): On native Windows, don't expect that fd 2 is closed. --- ChangeLog | 6 ++++++ tests/test-spawn-pipe-child.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8bed1b320f..23a27685df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2018-10-04 Bruno Haible + + spawn-pipe tests: Avoid test failure on native Windows. + * tests/test-spawn-pipe-child.c (main): On native Windows, don't expect + that fd 2 is closed. + 2018-10-04 Bruno Haible fcntl: Make it possible to namespace the defined symbol. diff --git a/tests/test-spawn-pipe-child.c b/tests/test-spawn-pipe-child.c index 14522f5af2..b5fd7cb2c3 100644 --- a/tests/test-spawn-pipe-child.c +++ b/tests/test-spawn-pipe-child.c @@ -98,9 +98,9 @@ main (int argc, char *argv[]) case 1: /* Expect fd 2 is closed. But on HP-UX 11, fd 2 gets automatically re-opened to /dev/null if it - was closed. Future POSIX will allow this, see - . */ -#if !defined __hpux + was closed. Similarly on native Windows. Future POSIX will allow + this, see . */ +#if !(defined __hpux || (defined _WIN32 && ! defined __CYGWIN__)) ASSERT (! is_open (STDERR_FILENO)); #endif break; -- 2.39.5