Luca Boccassi
4cb15ec638
Merge pull request #2994 from sigiesec/migrate-to-unity
...
Migrate further tests to unity, and split up into individual test cases
2018-03-15 16:55:05 +00:00
Simon Giesecke
7bd57ba83b
Problem: test case tests multiple aspects
...
Solution: split test case
2018-03-15 16:43:34 +01:00
Simon Giesecke
3e374d98f1
Problem: test case tests multiple aspects
...
Solution: split test case
2018-03-15 16:43:33 +01:00
Simon Giesecke
eb0307a9a6
Problem: test case tests multiple aspects
...
Solution: split test case
2018-03-15 16:43:32 +01:00
Simon Giesecke
10dae6e830
Problem: test_poller not using unity
...
Solution: migrate to unity, and split test cases
2018-03-15 16:43:30 +01:00
Simon Giesecke
991b2336e4
Problem: test_thread_safe not using unity
...
Solution: migrate to unity, and split test cases
2018-03-15 16:43:27 +01:00
Simon Giesecke
5d32828bbf
Problem: test_reconnect_ivl not using unity
...
Solution: migrate to unity, and reduce code duplication
2018-03-15 16:43:26 +01:00
Luca Boccassi
e388774737
Merge pull request #2981 from eponsko/master
...
Problem: no support for ZMTP 3.1 application metadata
2018-03-15 12:57:40 +00:00
Simon Giesecke
1e217ac063
Problem: unity built with unnecessary float but without command line argument support
...
Solution: add appropriate definitions to build
2018-03-15 11:28:50 +01:00
Simon Giesecke
f92cdf9470
Problem: test_ctx_destroy not using unity, and mixing test cases
...
Solution: migrate to unit and split up test cases
2018-03-15 10:58:56 +01:00
Simon Giesecke
9553a1f33e
Problem: test_connect_resolve not yet using unity
...
Solution: migrate to unity
2018-03-14 22:40:24 +01:00
Simon Giesecke
6f9459e3fb
Migrate tests/test_conflate.cpp to unity
2018-03-14 19:05:19 +01:00
Simon Giesecke
d318c95bc2
Problem: different aspects mixed in one test case
...
Solution: split up test case
2018-03-14 18:59:36 +01:00
Simon Giesecke
dbcd42c58d
Migrate tests/test_client_server.cpp to unity
2018-03-14 18:45:26 +01:00
Simon Giesecke
0114572ce6
Migrate tests/test_bind_src_address.cpp to unity
2018-03-14 18:45:25 +01:00
Simon Giesecke
be33dce68e
Migrate tests/test_bind_after_connect_tcp.cpp to unity
2018-03-14 18:45:25 +01:00
Simon Giesecke
631de94563
Problem: test_router_hangover not yet using unity
...
Solution: migrate to unity
2018-03-14 15:09:13 +01:00
Pontus Sköldström
dd5eec35be
Support application metadata through ZMQ_METADATA
...
Lets the application set per-connection metadata.
Metadata is specified as "X-key:value" and set using zmq_setsockopt, eg:
zmq_setsockopt (s, ZMQ_METADATA, "X-key:value", 11);
The peer can then obtain the metadata from a received message:
char *data = zmq_msg_gets(msg, "X-key");
2018-03-14 12:56:15 +01:00
Simon Giesecke
59157f0e2f
Problem: missing guidelines on proper test cleanup
...
Solution: add guidelines to tests/README.md
2018-03-14 12:26:06 +01:00
Simon Giesecke
9e3932b46b
Problem: test assertion failures do not clean up properly
...
Solution: provide test_context and manage sockets of test_context via setup and teardown
2018-03-14 12:24:21 +01:00
Simon Giesecke
437e9f4f59
Problem: tests readme outdated
...
Solution: fixed description for building tests, added references to unity and unittests
2018-03-14 08:22:23 +01:00
Simon Giesecke
ae558706bf
Problem: test_hwm and test_router_mandatory not yet using unity
...
Solution: migrate to unity
2018-03-14 08:22:23 +01:00
Luca Boccassi
19060345e4
Problem: TIPC availability check is too strict ( #2977 )
...
* Problem: TIPC availability check is too strict
Solution: at build time only check if the API is available. In the tests
do a first check and a skip if the functionality is not available.
TIPC needs an in-tree but not loaded by default kernel module, tipc.ko
to be loaded, which requires root, so it is unlikely to be available on
any build system by default.
This will allow most distributions to ship with TIPC support built in,
and to avoid tests failure if the module is not there.
* Problem: no Travis tests for TIPC
Solution: mark one job with sudo: required and load the kernel module
* Problem: CMake fails when test returns 77 (skip)
Solution: set property to let it mark the test as skipped as intended
2018-03-09 17:47:42 +01:00
Pontus.Skoeldstroem
7abb8388d6
Problem: Tests for different TIPC address types missing ( #2956 )
...
* Tests for different TIPC address types and code cleanup
* Adds tests for binding/connecting with different TIPC address types
using Unity
* Adds error checking for address type misuse
2018-03-07 17:31:26 +00:00
Stefan Kaes
fcbd2a5710
Problem: enormous memory increase due to zero copy decoding
...
The zero copy decoding strategy implemented for 4.2.0 can lead to a large
increase of main memory usage in some cases (I have seen one program go up to
40G from 10G after upgrading from 4.1.4). This commit adds a new option to
contexts, called ZMQ_ZERO_COPY_RECV, which allows one to switch to the old
decoding strategy.
2018-03-05 18:13:28 +01:00
Luca Boccassi
354491ddf2
Problem: no test for ZMQ_XPUB_VERBOSE(R)
...
Solution: add test_xpub_verbose to cover those APIs
2018-03-02 13:42:44 +01:00
Simon Giesecke
0458b85dec
Problem: Some tests timeout on appveyor for POLLER=poll
...
Solution: Increase test timeouts for poll poller under Windows
2018-02-13 18:38:26 +01:00
Simon Giesecke
922053237f
Problem: test_sockopt_hwm not using unity
...
Solution: migrate test_sockopt_hwm to unity
2018-02-13 18:38:23 +01:00
Simon Giesecke
9ec95f9d46
Problem: build failure with VS <2015, has no snprintf
...
Solution: use _snprintf when snprintf is not available
2018-02-11 17:33:13 +00:00
sigiesec
5f854a31b7
Problem: test_security_curve not using test framework
...
Solution: use unity in test_security_curve
2018-02-11 17:25:36 +00:00
sigiesec
21879abb5b
Problem: test_socket_null not using test framework
...
Solution: rewrite test_socket_null to use unity
2018-02-11 17:25:36 +00:00
sigiesec
61a28a26cc
Problem: no test framework
...
Solution: add unity test framework, and integrate into cmake build
2018-02-11 17:25:36 +00:00
Luca Boccassi
9b1ce59719
Problem: DRAFT build broken with GCC 4.7
...
Solution: change variable type in test_timers to match public API
2018-02-10 17:08:01 +00:00
Simon Giesecke
a5e763039d
Problem: use of TCP loopback fastpath not available for user sockets
...
Solution: add socket option
2018-02-09 14:22:42 +01:00
sigiesec
50d80d0835
Problem: test_timeo frequently fails on travis, probably because of slow
...
execution
Solution: relax test assertion to what can be guaranteed
2018-02-09 09:56:38 +01:00
sigiesec
88d8c768d1
Problem: test_timers frequently fails on travis-ci
...
Solution: relaxed test assertions, based on the actual time passed,
instead of assuming that this equals to the time slept
2018-02-09 09:55:40 +01:00
sigiesec
41f459e1dc
Problem: formatting inconsistent
...
Solution: applied clang-format
2018-02-02 15:47:43 +01:00
Luca Boccassi
0298d037d0
Problem: CMake rebuilds everything twice
...
Solution: build all the objects separately before the link step, to
avoid rebuilding when doing both static and shared builds
2017-11-20 15:55:35 +00:00
Luca Boccassi
5264d49eab
Problem: duplicate definition in CMake tweetnacl builds
...
Solution: don't redefine preprocessor macro if it's already defined in
platform.hpp
2017-11-19 12:47:05 +00:00
Luca Boccassi
de8f14adf5
Problem: test_security_{zap|curve} often hangs
...
Solution: set 0 linger on the sockets immediately after creating them
rather than immediately before closing them.
Running through helgrind/drd highlights a few race conditions, one of
which is the setting of linger vs checking it when closing the socket.
Work around it by setting it immediately to fix the test hangs.
2017-11-16 00:44:29 +00:00
Luca Boccassi
498c6bbb67
Problem: test_stream_exceeds_buffer cannot be ran in parallel
...
Solution: bind to wildcard and let the OS pick a free port instead
of using an hard-coded 12345 TCP port
2017-11-10 09:49:54 +00:00
Rolf Timmermans
c8592dfbc3
Problem: REQ socket with ZMQ_REQ_RELAXED does not report ZMQ_POLLOUT when queried for events after first message.
...
Solution: Check for strictness before returning false if no reply has been received.
2017-11-08 09:55:14 +01:00
f18m
2aa0e6fd4d
Change ZMQ_THREAD_AFFINITY to ZMQ_THREAD_AFFINITY_CPU_ADD/ZMQ_THREAD_AFFINITY_CPU_REMOVE. Avoid prefix thread names when no prefix was set.
2017-10-25 09:55:47 +02:00
Luca Boccassi
bd2ff7fbf8
Problem: DRAFT build broken with old GCC due to missing SIZE_MAX
...
Solution: define __STDC_LIMIT_MACROS in test_timers.cpp before
including testutil.hpp so that the definitions are included
2017-10-17 14:13:28 +01:00
Luca Boccassi
2e2c22dd5b
Problem: DRAFT build broken with old GCC due to GNU modifier
...
Solution: print unsigned integers instead of size_t to avoid the error:
error: ISO C++ does not support the 'z' gnu_printf length modifier
due to very old version of GCC.
2017-10-17 13:36:10 +01:00
f18m
f25cd6e7be
Background thread names ( #2784 )
...
* Add ZMQ_THREAD_NAME_PREFIX ctx option
2017-10-17 12:06:50 +01:00
Luca Boccassi
4c2a95eab2
Problem: test_ctx_options only checks global DRAFT flag
...
Solution: this will break once the tested APIs move from DRAFT to STABLE
so instead check for the specific macros.
2017-10-16 12:34:13 +01:00
f18m
bfbb4ff2e9
Background threads enhancements ( #2778 )
...
* Background thread scheduling
- add ZMQ_THREAD_AFFINITY ctx option; set all thread scheduling options
from the context of the secondary thread instead of using the main
process thread context!
- change ZMQ_THREAD_PRIORITY to support setting NICE of the background
thread when using SCHED_OTHER
2017-10-16 12:29:03 +01:00
Luca Boccassi
b6aee51691
Problem: strict ZAP protocol adherence is backward incompatible
...
Solution: add ZMQ_ZAP_ENFORCE_DOMAIN to hide backward incompatible
change and make it disabled by default.
In a future release that breaks API compatibility we can then switch
the default to enabled in order to achieve full RFC compatibility.
Fixes #2762
2017-10-09 17:48:33 +01:00
Luca Boccassi
ed64585e93
Problem: test_rebind_ipc might not see race condition on fast envs
...
Solution: pre-create the second socket to save a few cycles between
closing the old one and binding the new one
2017-10-06 11:32:14 +01:00