diff options
author | Bruno Haible <bruno@clisp.org> | 2011-09-21 21:28:38 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-09-21 21:28:38 +0200 |
commit | 8979051a468586f7b9674009398648b06229dcf9 (patch) | |
tree | 90d1c6430e9f5cf9014c3947568f0bbe288d916e /tests/test-select.h | |
parent | 5f12d9389f0d0597c4996dfb15c0a5c64808774a (diff) | |
download | gnulib-8979051a468586f7b9674009398648b06229dcf9.tar.gz |
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.
Diffstat (limited to 'tests/test-select.h')
-rw-r--r-- | tests/test-select.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/test-select.h b/tests/test-select.h index 85c561a45f..4612dfc719 100644 --- a/tests/test-select.h +++ b/tests/test-select.h @@ -261,16 +261,18 @@ do_select_bad_fd_nowait (int fd, int ev, select_fn my_select) 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 @@ test_bad_fd (select_fn my_select) 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 } |