[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
spawn-pipe tests: Avoid test failure on native Windows
From: |
Bruno Haible |
Subject: |
spawn-pipe tests: Avoid test failure on native Windows |
Date: |
Fri, 05 Oct 2018 00:27:49 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-137-generic; KDE/5.18.0; x86_64; ; ) |
On mingw, I see a test failure of test-spawn-pipe.sh. This patch fixes it.
2018-10-04 Bruno Haible <address@hidden>
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.
diff --git a/tests/test-spawn-pipe-child.c b/tests/test-spawn-pipe-child.c
index 14522f5..b5fd7cb 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
- <http://austingroupbugs.net/view.php?id=173>. */
-#if !defined __hpux
+ was closed. Similarly on native Windows. Future POSIX will allow
+ this, see <http://austingroupbugs.net/view.php?id=173>. */
+#if !(defined __hpux || (defined _WIN32 && ! defined __CYGWIN__))
ASSERT (! is_open (STDERR_FILENO));
#endif
break;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- spawn-pipe tests: Avoid test failure on native Windows,
Bruno Haible <=