Discussion:
nonblocking-socket: fix test failure on OpenBSD
(too old to reply)
Bruno Haible
2017-08-16 09:04:53 UTC
Permalink
Raw Message
On OpenBSD 6.0, I'm seeing a test failure:

FAIL: test-nonblocking-socket.sh
================================

main:1: spent_time = 0.000992, data_block_size too small
FAIL test-nonblocking-socket.sh (exit status: 1)


This fixes it.


2017-08-16 Bruno Haible <***@clisp.org>

nonblocking-socket tests: Fix failure on OpenBSD 6.0.
* tests/test-nonblocking-socket.h (SOCKET_DATA_BLOCK_SIZE): Increase
value for OpenBSD.

diff --git a/tests/test-nonblocking-socket.h b/tests/test-nonblocking-socket.h
index 2c0a1d3..837d4ef 100644
--- a/tests/test-nonblocking-socket.h
+++ b/tests/test-nonblocking-socket.h
@@ -22,7 +22,7 @@

Linux >= 7350000 (depends on circumstances)
FreeBSD >= 107521
- OpenBSD >= 28673
+ OpenBSD >= 106430 (depends on circumstances)
Mac OS X >= 680000 (depends on circumstances)
AIX 5.1 >= 125713
AIX 7.1 >= 200000 (depends on circumstances)
@@ -38,11 +38,7 @@
Cygwin 1.7.x >= 163838 (depends on circumstances)
native Windows >= 66294401
*/
-#if defined __OpenBSD__
-# define SOCKET_DATA_BLOCK_SIZE 100000
-#else
-# define SOCKET_DATA_BLOCK_SIZE 1000000
-#endif
+#define SOCKET_DATA_BLOCK_SIZE 1000000

/* On Linux, Mac OS X, Cygwin 1.5.x, native Windows,
sockets have very large buffers in the kernel, so that write() calls
Loading...