bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* nonblocking-socket-tests: Fix test failure on Android 4.3
@ 2019-01-26 17:56 Bruno Haible
  0 siblings, 0 replies; only message in thread
From: Bruno Haible @ 2019-01-26 17:56 UTC (permalink / raw)
  To: bug-gnulib

On Android 4.3, I'm seeing this test failure:

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

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


This patch fixes it.


2019-01-26  Bruno Haible  <bruno@clisp.org>

	nonblocking-socket-tests: Fix test failure on Android 4.3.
	* tests/test-nonblocking-socket.h (SOCKET_HAS_LARGE_BUFFER): Define to 1
	also on Android.

diff --git a/tests/test-nonblocking-socket.h b/tests/test-nonblocking-socket.h
index f049300..c3f9f54 100644
--- a/tests/test-nonblocking-socket.h
+++ b/tests/test-nonblocking-socket.h
@@ -21,6 +21,7 @@
      Platform                        SOCKET_DATA_BLOCK_SIZE
 
      Linux                           >= 7350000 (depends on circumstances)
+     Linux/Android                   >= 1700000 (approx.)
      FreeBSD                         >= 107521
      OpenBSD                         >= 106430 (depends on circumstances)
      Mac OS X                        >= 680000 (depends on circumstances)
@@ -44,7 +45,7 @@
    sockets have very large buffers in the kernel, so that write() calls
    succeed before the reader has started reading, even if fd is blocking
    and the amount of data is larger than 1 MB.  */
-#if defined __linux__ || (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __CYGWIN__
+#if defined __linux__ || defined __ANDROID__ || (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __CYGWIN__
 # define SOCKET_HAS_LARGE_BUFFER 1
 #else
 # define SOCKET_HAS_LARGE_BUFFER 0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-01-26 17:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-26 17:56 nonblocking-socket-tests: Fix test failure on Android 4.3 Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).