> test-unlockpt.c:34: assertion failed > FAIL: test-unlockpt This is also seen on NetBSD 5.1. They have an unlockpt() that does nothing; it just returns 0.
I'm not inclined to add a replacement just for this. Instead, modify the test: 2011-09-21 Bruno Haible <[email protected]> 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. --- doc/posix-functions/unlockpt.texi.orig Wed Sep 21 12:41:48 2011 +++ doc/posix-functions/unlockpt.texi Wed Sep 21 12:28:15 2011 @@ -17,5 +17,5 @@ @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 --- tests/test-unlockpt.c.orig Wed Sep 21 12:41:48 2011 +++ tests/test-unlockpt.c Wed Sep 21 12:40:46 2011 @@ -29,6 +29,7 @@ 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 @@ || errno == EINVAL /* seen on FreeBSD 6.4 */ ); } +#endif return 0; } -- In memoriam Orlando Letelier <http://en.wikipedia.org/wiki/Orlando_Letelier>
