# HG changeset patch # User Bruno Haible # Date 1316633318 -7200 # Node ID 8a33129afa20bee6abfe81b3937b251f1910d33a # Parent 7adcf631d56bf258a8e938cc5ad27c84116de335 select tests: Avoid test failures on OSF/1 5.1 and mingw. * tests/test-select.h (test_bad_fd): Disable all tests on OSF/1 and native Windows. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-09-21 Bruno Haible + + select tests: Avoid test failures on OSF/1 5.1 and mingw. + * tests/test-select.h (test_bad_fd): Disable all tests on OSF/1 and + native Windows. + 2011-09-21 Bruno Haible New module 'fdopen'. diff --git a/tests/test-select.h b/tests/test-select.h --- a/tests/test-select.h +++ b/tests/test-select.h @@ -261,16 +261,18 @@ static void test_bad_fd (select_fn my_select) { + /* This tests fails on OSF/1 and native Windows, even with fd = 16. */ +#if !(defined __osf__ || defined WIN32_NATIVE) int fd; - /* On Linux, MacOS X, *BSD, and OSF/1, values of fd like 99 or 399 are - discarded by the kernel early and therefore do *not* lead to EBADF, - as required by POSIX. */ -#if defined __linux__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined __NetBSD__ || defined __osf__ + /* On Linux, MacOS X, *BSD, values of fd like 99 or 399 are discarded + by the kernel early and therefore do *not* lead to EBADF, as required + by POSIX. */ +# if defined __linux__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined __NetBSD__ fd = 16; -#else +# else fd = 99; -#endif +# endif if (do_select_bad_fd_nowait (fd, SEL_IN, my_select) == 0 || errno != EBADF) failed ("invalid fd among rfds"); @@ -278,6 +280,7 @@ failed ("invalid fd among wfds"); if (do_select_bad_fd_nowait (fd, SEL_EXC, my_select) == 0 || errno != EBADF) failed ("invalid fd among xfds"); +#endif }