From: Bruno Haible Date: Thu, 9 Jun 2011 09:37:58 +0000 (+0200) Subject: spawn-pipe tests: Avoid test failure on HP-UX 11. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0080d2fdb5038992f9e7e36fdbc5ebc1631ed36;p=pspp spawn-pipe tests: Avoid test failure on HP-UX 11. * tests/test-spawn-pipe-child.c (main) [HP-UX]: Don't assert that fd 2 is closed. --- diff --git a/ChangeLog b/ChangeLog index a7c9ecc12b..016a558690 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-06-09 Bruno Haible + + spawn-pipe tests: Avoid test failure on HP-UX 11. + * tests/test-spawn-pipe-child.c (main) [HP-UX]: Don't assert that fd 2 + is closed. + 2011-06-09 Bruno Haible acl tests: Fix compilation error on HP-UX 11. diff --git a/tests/test-spawn-pipe-child.c b/tests/test-spawn-pipe-child.c index eefecf9c10..cf6689dba9 100644 --- a/tests/test-spawn-pipe-child.c +++ b/tests/test-spawn-pipe-child.c @@ -95,8 +95,12 @@ main (int argc, char *argv[]) ASSERT (is_open (STDERR_FILENO)); break; case 1: - /* Expect fd 2 is closed. */ + /* Expect fd 2 is closed. + But on HP-UX 11, fd 2 gets automatically re-opened to /dev/null if it + was closed. */ +#if !defined __hpux ASSERT (! is_open (STDERR_FILENO)); +#endif break; default: ASSERT (0);