Commit Graph

607 Commits

Author SHA1 Message Date
Luca Boccassi
272d340c1f Problem: no mixed FD and zmq socket zmq_poll test
Solution: add one
2016-12-15 12:03:48 +00:00
Luca Boccassi
dcec022358 Problem: test_stream_exceeds_buffer does not build on AIX
Solution: add missing includes
2016-12-06 20:34:10 +00:00
Luca Boccassi
8325355d73 Problem: test_stream_exceeds_buffer has redundant includes
Solution: remove them as they are already in testutil.hpp
2016-12-06 20:33:46 +00:00
Luca Boccassi
670bec56d8 Problem: size of zmq_msg_t is not known to FFI wrappers
Solution: add a ZMQ_MSG_T_SIZE context read-only option so that
wrappers can call zmq_ctx_get (ctx, ZMQ_MSG_T_SIZE) to get the
size at runtime.
2016-11-20 12:24:03 +00:00
Harald
6f597d0bd3 Problem: CMake build rejects to build with openpgm enabled
Solution: add optional lookup for openpgm via pkg-config
2016-11-01 12:31:40 +01:00
Luca Boccassi
25bf30bebe Problem: 2 connects with same sourceip:port to different destip:port fail
Solution: during a connect with a TCP endpoint if a source address is
passed set the SO_REUSEADDR flag on the socket before the bind system
call.
Add unit test to cover this case for both IPv4 and IPv6.
2016-10-23 22:31:45 +01:00
Nick Guiffrida
ffdb44ad2c Fix zmq_poll return code assert in tests/test_radio_dish.cpp 2016-09-30 21:50:31 -07:00
Min RK
bdcaa935b9 zmq_poll calls zmq_poller if available
enables zmq_poll on threadsafe sockets only supported in zmq_poller (radio, dish, etc.)
2016-09-28 13:53:57 +02:00
Luca Boccassi
fab846a5e5 Problem: zmq_ctx_term asserts with connect-before-bind and sockets with identity over inproc transport
Solution: check if the connecting inproc socket has been closed
before trying to send the identity.
Otherwise the pipe will be in waiting_for_delimiter state causing
writes to fail and the connect to assert when the context is being
torn down and the pending inproc connects are resolved.
Add test case that covers this behaviour.
2016-09-24 18:59:29 +01:00
Luca Boccassi
25402335fd Problem: no bind-after-connect TCP test
Solution: add one to increase coverage
2016-09-24 18:27:19 +01:00
Luca Boccassi
53e5a9a6f9 Problem: zmq_connect with IPv6 "source:port;dest:port" format is broken
Solution: allow for '[' character when doing the basic sanity check
on the TCP endpoint.
Also add unit tests for both IPv4 and IPv6 source;dest format.
2016-09-17 20:04:40 +01:00
Luca Boccassi
c1d07c6cd6 Problem: test_reqrep_tcp does not have IPv6 tests
Solution: add them
2016-09-17 20:04:40 +01:00
Luca Boccassi
896192ff42 Problem: test_reqrep_tcp does not test multiple endpoints
Solution: add a test for this use case
2016-09-17 19:30:59 +01:00
Luca Boccassi
75219e33a7 Problem: test_reqrep_tcp does not test disconnect/unbind
Solution: add disconnect and unbind calls to the test
2016-09-17 19:30:35 +01:00
Luca Boccassi
8d723fee3d Problem: test_reqrep_tcp is too limited
Solution: refactor it to allow for multiple functionalities to be
tested
2016-09-17 19:30:22 +01:00
Thomas Braun
c9c49f3e9f Problem: Missing newline in printf statement
Solution: Add "\n" at end of format string.
2016-09-12 19:45:31 +02:00
Luca Boccassi
a9343dbbc3 Problem: testutil.hpp fails to build on Windows XP
Solution: ifdef is_ipv6_available to always return false if building
on Windows XP, as it doesn't support the needed standard libc
functions
2016-08-27 16:48:38 +01:00
Luca Boccassi
0002824fc0 Problem: is_ipv6_available needs context to work on Windows
Solution: call the function after the zmq_ctx has been created, not
before, so that the relevant Windows system calls have been setup.
2016-08-23 21:48:57 +01:00
Luca Boccassi
f486176741 Revert "is_ipv6_available: Create a fake zmq context on windows"
This reverts commit 9adf20aaeb.
2016-08-23 21:46:43 +01:00
Thomas Braun
9adf20aaeb is_ipv6_available: Create a fake zmq context on windows
This is required as zmq_ctx_new calls WSAStartup. Without that the IPV6
socket creation always fails.
2016-08-23 21:52:16 +02:00
Giuseppe Corbelli
7fdb167732 [tests/testutil.hpp] Problem: wrong windows.hpp path
Solution: correct path is ../src/windows.hpp. Also added automatic linking
of iphlpapi library if required and using MSVC
2016-07-12 15:58:17 +02:00
Giuseppe Corbelli
0b01cc1ebc [tests/CMakeLists.txt] Problem: The libzmq.lib search path should be set
only if the library is found at a specific path

Solution: Search for libzmq.lib in ../bin/Win32/Debug/v120/dynamic, don't
know how to automatically search in correct path based on current build
configuration
2016-07-12 15:54:55 +02:00
Fedor Sheremetyev
813c738137 Add test for consistent unsubscription in XPUB manual mode.
Expect custom messages on both explicit unsubscription and pipe termination.
2016-06-17 11:36:13 +01:00
evoskuil
c050d95fcd Problem: no unit tests for base85 or public curve functions. 2016-05-19 03:46:15 -07:00
hitstergtd
fed17746c6 Problem: Wrapping issue in test for SRCFD [style]
Solution:
Wrap it.
2016-05-16 20:47:47 +01:00
somdoron
c4d0146f2c problem: udp doesn't enforce correct usage of bind/connect
solution: enforce that dish and gram can only bind and radio can only
connect
2016-05-16 13:34:38 +03:00
somdoron
6db8f1e74b problem: test is using connect with dgram, dgram only support bind 2016-05-16 12:18:30 +03:00
Bitiquinho
23b3403fa5 Remove printf and add asserts on test 2016-05-15 15:37:33 -03:00
Bitiquinho
977e700893 Fix Copyright range 2016-05-15 15:37:33 -03:00
Bitiquinho
da14bb4bc2 Added ZMQ_DGRAM tests to build (Makefile.am and CMakeLists.txt) 2016-05-15 15:37:33 -03:00
Bitiquinho
94c53e541d Added test for ZMQ_DGRAM socket type (unicast and multicast) 2016-05-15 15:37:33 -03:00
Constantin Rack
bd66cfe6f8 Merge pull request #1991 from hitstergtd/x-testcov-zmq-2
Problem: zmq_poller_destroy can segfault
2016-05-14 08:17:41 +02:00
Joe Eli McIlvain
71ba7df781 Merge pull request #1987 from hitstergtd/x-reduce-cliserv-sends
Problem: test send count too high for AppVeyor CI environment
2016-05-12 20:15:08 -07:00
hitstergtd
e82e4ea13e Problem: test send count too high for AppVeyor
Solution:
Reduce send count so that the test does not timeout on AppVeyor CI
environment and older Windows boxes.
2016-05-13 04:04:08 +01:00
hitstergtd
477cc1cb12 Problem: zmq_poller_destroy parameter checking
Solution:
- Add checks for **poller_p_ to ensure that we do not segfault when either it
  or the value within it are NULL
- Add tests for the above and increase error state coverage
2016-05-12 18:09:59 +01:00
hitstergtd
4842b6bd81 Problem: No coverage for ctx termination errors
Solution:
- Add error state coverage for zmq_ctx_term(), zmq_term() and
  zmq_ctx_shutdown(); zmq_ctx_destroy() is already covered since it only
  calls zmq_ctx_term()
- Add coverage for zmq_term()
2016-05-12 17:47:08 +01:00
Erik Hugne
f81ef1bc72 tipc: add support for address domain suffix
The TIPC protocol bindings in ZeroMQ defaults to a lookup domain
of 1.0.0 to prevent 'closest first' search, and instead always
do round robin if several sockets in the network or node have
the same name published. In retrospect, this might have been a
bad idea because it won't work on standalone configurations.
We solve this by allowing an optional domain suffix to be provided
in the address, and 0.0.0 should be used in that case, or if the
TIPC address range in the cluster configuration is defined to some
other value. Domain suffixes are only relevant for connecting
addresses.

Signed-off-by: Erik Hugne <erik.hugne@gmail.com>
2016-05-11 21:54:25 +02:00
hitstergtd
206771afd2 Problem: Not all ancillary API methods tested
Solution:
- Add file for testing ancillary API methods and any misc internal machinery
- Add tests for zmq_version(3) and zmq_strerror(3)
- Add test file into gitignore, Autotools and CMake build files
- Increase test coverage

Note:
MSVC solution files have not been updated.
2016-05-08 18:25:03 +01:00
Doron Somech
be741f604a problem: timers test is flapping on windows 2016-05-05 14:24:47 +03:00
Doron Somech
a747f72450 problem:closed poller still associated with socket 2016-05-05 13:50:33 +03:00
somdoron
50c2f7af8f fix sndbuf/rcvbuf tests 2016-05-03 19:46:34 +03:00
Luca Boccassi
6de24c190a Problem: scatter/gather are not yet stable APIs
Solution: mark them as DRAFT APIs
2016-05-02 21:47:05 +01:00
Luca Boccassi
caaf66c32c Problem: radio/dish are not yet stable APIs
Solution: mark them as DRAFT APIs
2016-05-02 21:47:05 +01:00
Luca Boccassi
32a1ef85a8 Problem: zmq_timers* are not yet stable APIs
Solution: mark them as DRAFT APIs
2016-05-02 21:47:05 +01:00
Luca Boccassi
738968082b Problem: zmq_poller* are not yet stable APIs
Solution: mark them as DRAFT APIs
2016-05-02 21:47:05 +01:00
Luca Boccassi
7e700f1e73 Problem: client/server are not yet stable APIs
Solution: mark them as DRAFT APIs
2016-05-02 21:47:05 +01:00
Luca Boccassi
064cd1fbfb Problem: no support for DRAFT API in build systems
Solution: add support for --enable-drafts/ENABLE_DRAFTS=ON in
Autools and CMake.
2016-05-02 21:47:05 +01:00
Luca Boccassi
f0a34e0ff5 Problem: test_poller/use_fd_ipc/tcp use draft API
Solution: only use ZMQ_SERVER/CLIENT if the defines are available.
2016-05-02 21:46:47 +01:00
Luca Boccassi
c293618ae8 Problem: testutil.hpp includes platform.hpp last
Solution: before including internal headers, include platform.hpp
so that the build time options are correctly applied to the included
headers.
2016-05-02 20:00:53 +01:00
hitstergtd
40dbbe342e Problem: bounce() arguments reversed
Solution:
Put them in the right order to quiet Coverity.

Found by:
Coverity Scan
2016-05-01 21:40:08 +01:00