[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
nonblocking-pipe tests: Fix test failure on MSVC
From: |
Bruno Haible |
Subject: |
nonblocking-pipe tests: Fix test failure on MSVC |
Date: |
Tue, 02 Jul 2019 20:35:50 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-151-generic; KDE/5.18.0; x86_64; ; ) |
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 <address@hidden>
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- nonblocking-pipe tests: Fix test failure on MSVC,
Bruno Haible <=