From 03f0d3e22b969990f3a55f2540a9f82680028602 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 21 Sep 2011 12:43:20 +0200 Subject: [PATCH] unlockpt tests: Avoid test failure on NetBSD 5.1. * tests/test-unlockpt.c (main): Skip the EBADF tests on NetBSD. * doc/posix-functions/unlockpt.texi: Mention the bug on NetBSD. --- ChangeLog | 6 ++++++ doc/posix-functions/unlockpt.texi | 2 +- tests/test-unlockpt.c | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f03898566..d808c871a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2011-09-21 Bruno Haible + unlockpt tests: Avoid test failure on NetBSD 5.1. + * tests/test-unlockpt.c (main): Skip the EBADF tests on NetBSD. + * doc/posix-functions/unlockpt.texi: Mention the bug on NetBSD. + +2011-09-21 Bruno Haible + getlogin, getlogin_r tests: Avoid test failure on Linux/SPARC. * tests/test-getlogin.c (main): Allow a failure with EINVAL. * tests/test-getlogin_r.c (main): Likewise. diff --git a/doc/posix-functions/unlockpt.texi b/doc/posix-functions/unlockpt.texi index 254566006..898754d91 100644 --- a/doc/posix-functions/unlockpt.texi +++ b/doc/posix-functions/unlockpt.texi @@ -17,5 +17,5 @@ Portability problems not fixed by Gnulib: @itemize @item This function reports success for invalid file descriptors on some platforms: -Cygwin 1.7.9. +NetBSD 5.1, Cygwin 1.7.9. @end itemize diff --git a/tests/test-unlockpt.c b/tests/test-unlockpt.c index e7861ea75..4717e7d83 100644 --- a/tests/test-unlockpt.c +++ b/tests/test-unlockpt.c @@ -29,6 +29,7 @@ int main (void) { /* Test behaviour for invalid file descriptors. */ +#if !defined __NetBSD__ /* known bug on NetBSD 5.1 */ { errno = 0; ASSERT (unlockpt (-1) == -1); @@ -43,6 +44,7 @@ main (void) || errno == EINVAL /* seen on FreeBSD 6.4 */ ); } +#endif return 0; } -- 2.11.0