* nonblocking-pipe tests: Fix test failure on MSVC
@ 2019-07-02 18:35 Bruno Haible
0 siblings, 0 replies; only message in thread
From: Bruno Haible @ 2019-07-02 18:35 UTC (permalink / raw)
To: bug-gnulib
On MSVC, I'm seeing this test failure:
FAIL: test-nonblocking-pipe.sh
==============================
c:\testdir-posix-msvc\gltests\test-nonblocking-reader.h:179: assertion 'spent_time < 1.5' failed
FAIL test-nonblocking-pipe.sh (exit status: 1)
The comment says:
/* This assertion fails if data_block_size is much larger than needed
and SMALL_DELAY is too large, or if data_block_size is very large and
ENABLE_DEBUGGING is 1. */
And indeed, SMALL_DELAY was 1 second (due to the suboptimal usleep()), and
PIPE_DATA_BLOCK_SIZE was 70000. Improving usleep - done in the previous commit -
and reducing PIPE_DATA_BLOCK_SIZE fixes the test failure.
2019-07-02 Bruno Haible <bruno@clisp.org>
nonblocking-pipe tests: Fix test failure on MSVC.
* tests/test-nonblocking-pipe.h (PIPE_DATA_BLOCK_SIZE): Set to 10000 on
native Windows.
diff --git a/tests/test-nonblocking-pipe.h b/tests/test-nonblocking-pipe.h
index fd101c5..7edb64e 100644
--- a/tests/test-nonblocking-pipe.h
+++ b/tests/test-nonblocking-pipe.h
@@ -41,6 +41,8 @@
# define PIPE_DATA_BLOCK_SIZE 140000
#elif defined __linux__ && defined __powerpc__
# define PIPE_DATA_BLOCK_SIZE 1100000
+#elif defined _WIN32 && !defined __CYGWIN__
+# define PIPE_DATA_BLOCK_SIZE 10000
#else
# define PIPE_DATA_BLOCK_SIZE 70000
#endif
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-07-02 19:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-02 18:35 nonblocking-pipe tests: Fix test failure on MSVC 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).