0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-29 00:32:34 +08:00

997 Commits

Author SHA1 Message Date
Simon Giesecke
90a4d268d9 Problem: tests without test framework
Solution: migrate to Unity
2019-03-22 12:07:32 -04:00
Simon Giesecke
6ed03e9333 Problem: tests without test framework
Solution: migrate to Unity
2019-03-22 12:07:14 -04:00
Simon Giesecke
75cd23d6af Problem: tests without test framework
Solution: migrate to Unity
2019-03-22 12:06:39 -04:00
Simon Giesecke
06e713e9e0 Problem: tests without test framework
Solution: migrate to Unity
2019-03-22 12:06:39 -04:00
Simon Giesecke
4ab381436d Problem: tests without test framework
Solution: migrate to Unity
2019-03-22 12:06:12 -04:00
Simon Giesecke
6f083df5fb Problem: tests without test framework
Solution: migrate to Unity
2019-03-22 12:06:12 -04:00
Simon Giesecke
740780293a Problem: tests without test framework
Solution: migrate to Unity
2019-03-22 12:06:12 -04:00
Simon Giesecke
f083e60d8c Problem: use of extra context
Solution: use test context instead
2019-03-22 12:06:12 -04:00
Simon Giesecke
924d47f818 Problem: tests without test framework
Solution: migrate to Unity
2019-03-22 12:06:12 -04:00
Simon Giesecke
0266d4ac27 Problem: testutil_monitoring not using unity
Solution: migrate to unity and adapt users
2019-03-20 17:03:26 +01:00
Simon Giesecke
f46a96926c Problem: test_security_curve uses custom assertion macro
Solution: use standard TEST_ASSERT_SUCCESS_ERRNO macro instead
2019-03-20 16:49:46 +01:00
Simon Giesecke
efaca82bff Problem: testutil_security not using unity
Solution: migrate to unity and adapt users
2019-03-20 16:49:46 +01:00
Simon Giesecke
669fc4df5a Problem: test_security_zap not using a test framework
Solution: migrate to unity
2019-03-20 16:49:46 +01:00
Simon Giesecke
99e53698c5
Merge pull request #3456 from bluca/test_fd_port
Problem: TCP and UDP test sockets use hard-coded port
2019-03-19 17:57:09 +01:00
Luca Boccassi
98875a9ddc Problem: TCP and UDP test sockets use hard-coded port
Solution: move ephemeral port code to header and use it in both
tests
2019-03-18 23:27:01 +00:00
Andreas Hasenack
d81f3ec21c Problem: test_filter_with_supplemental_process_owner_gid fails
Solution: only set supgroup to a valid gid
2019-03-18 13:21:44 -03:00
Simon Giesecke
36a16ec7d1 Problem: test_security_plain not using a test framework
Solution: migrate to Unity
2019-03-16 17:51:25 +01:00
Simon Giesecke
223ef516b6 Problem: test_security_null not using a test framework
Solution: migrate to Unity and separate test_security_no_zap_handler
2019-03-16 17:20:19 +01:00
Luca Boccassi
0bbd38f5d4 Problem: text_xpub_nodrop sometimes fails
Solution: use XPUB and wait for the subscription message rather than
using a sleep which might or might not be enough
2019-03-08 18:26:23 +00:00
Claudio Biagi
d41ed6180b Proxy performance fix, ticket #3439
Improve performance of the proxy forwarding batch of message.
Add throughput benchmark for proxy.
Fix valgrind error reported on unitialized vars
RELICENSE: Add emtr grant
2019-03-08 15:02:58 +01:00
Simon Giesecke
73159a8fab Problem: race condition in test_hwm
Solution: wait a bit to allow connect to succeed if inproc bind preceded connect
2019-03-01 18:20:37 -05:00
Simon Giesecke
14fd7505bc Problem: race condition in test_xpub_nodrop
Solution: try to avoid race condition by increasing timeout from 0 to 250ms
2019-03-01 18:20:37 -05:00
Simon Giesecke
a95c4ab404 Problem: test_decrease_when_full is disabled for Windows
Solution: add sleep after connecting such that sending is not started before connection succeeded
2019-03-01 15:05:55 -05:00
Simon Giesecke
828ed69d63 Problem: test_decrease_when_full test case in test_sockopt_hwm does not run reliably under Windows
Solution: disable test case for the moment and mark it as FIXME
2019-03-01 05:51:45 -05:00
Simon Giesecke
21a389ca78 Problem: test_security_curve build fails with Windows targeting 8 or newer due to duplicate definition of htonll
Solution: use custom implementation only on older Windows versions
2019-02-12 03:47:26 -05:00
Luca Boccassi
feadf6d40f Problem: cannot monitor state of queues at runtime
Solution: add API and ZMQ_EVENT_PIPES_STATS event which generates 2
values, one for the egress and one for the ingress pipes respectively.
Refactor the events code to be able to send multiple values.
2019-02-10 16:33:26 +00:00
Luca Boccassi
cb73745250 Problem: cannot send more than one value per v2 event
Solution: refactor code and add extra frame with value count before the
values in v2
2019-02-07 20:42:47 +00:00
Luca Boccassi
1e26a93ce2 Problem: test_monitor fails in valgrind
Solution: expect additional events
2019-02-07 20:42:47 +00:00
Luca Boccassi
83946d5c98 Problem: testutil_monitoring does not close received messages
Solution: do it, as above 32 bytes they might be on the heap
2019-02-07 16:24:41 +00:00
Luca Boccassi
edf79dfefc Problem: test_monitor check for DRAFT has to be kept up to date
Solution: check for the available version instead
2019-02-07 16:24:41 +00:00
Luca Boccassi
e5a7f2eb56
Merge pull request #3402 from sigiesec/revert-64-bit-assertions
Revert 64 bit assertions
2019-02-07 15:58:38 +00:00
Simon Giesecke
31ff05d156 Revert "Problem: test build fails on 32 bit systems"
This reverts commit ac19d5f41ccca7acc40fb5970d6f7a0b20e0bc66.
2019-02-07 10:42:32 -05:00
Simon Giesecke
4273ffd266 Partially revert "Problem: monitor events are output as decimal in assertion messages"
This partially reverts commit 19c6aa5c9210144205b3e7f26752ebec8302a2f2.
2019-02-07 10:42:32 -05:00
Simon Giesecke
ec4ecb01ff Problem: no test for ZMQ_BINDTODEVICE
Solution: add test case run with cap_net_admin
Fixes #3397
2019-02-07 09:39:02 -05:00
Simon Giesecke
ac19d5f41c Problem: test build fails on 32 bit systems
Solution: define UNITY_SUPPORT_64 to force 64 bit support
2019-02-07 12:13:11 +01:00
Simon Giesecke
db8c26fce3 Problem: testutil_unity uses undefined names on Windows
Solution: make compilation conditional
2019-02-07 11:04:05 +01:00
Simon Giesecke
8de7e529ec Problem: no test case for tcp name resolution no longer working
Solution: add test case
2019-02-07 11:04:05 +01:00
Simon Giesecke
61e476ec89 Problem: MAX_SOCKET_STRING is too short for ipc wildcard binds
Solution: increase size to 256
2019-02-06 09:09:14 -05:00
Simon Giesecke
19c6aa5c92 Problem: monitor events are output as decimal in assertion messages
Solution: output as hex instead
2019-02-06 07:11:10 -05:00
Simon Giesecke
a86592f78c Problem: test_monitor is not run for ipc and tipc
Solution: add test cases
2019-02-06 07:11:10 -05:00
Simon Giesecke
8d784f26ab Problem: close always fails with wildcard bind, since directory is not empty
Solution: unlink the socket file first
2019-02-05 10:17:28 -05:00
Luca Boccassi
a9a5b2bde5 Problem: DRAFT build broken on old Windows
Solution: define uint64_t if not available in the system headers and
remove inclusion of inttypes.h which does not exist and is already
conditionally included in zmq.h if required, do not use PRIx64
2019-02-03 22:11:52 +01:00
Luca Boccassi
84847138a1 Problem: test_monitor fails with ipv6
Solution: correctly set the ipv6 flag in the connecting socket
2019-02-03 20:56:07 +01:00
Simon Giesecke
0e2e303b10 Problem: test_monitor is not run for ipv6
Solution: add test case using ipv6
2019-02-02 19:00:33 +01:00
Simon Giesecke
f3561f7759 Problem: no assertions for endpoint addresses on ZMQ_EVENT_MONITOR_STOPPED and ZMQ_EVENT_LISTENING events
Solution: added assertions
2019-02-02 18:29:33 +01:00
Simon Giesecke
5e2da02528 Problem: test case is leaking test socket
Solution: close test socket
2019-02-02 17:15:27 +01:00
Simon Giesecke
8f90f579f5 Problem: no assertions for local and remote addresses in monitor tests
Solution: added such assertions and extended test utilities
2019-02-02 16:34:19 +01:00
Simon Giesecke
f884fa725c Problem: get_monitor_event_internal segfaults when using address
Solution: dereference the pointer to the array before accessing the
element
2019-02-02 15:36:26 +01:00
Simon Giesecke
b18d28eec1 Problem: no tests for v2 monitor events and test_socket_monitor_versioned
Solution: add first test case
2019-02-02 15:33:27 +01:00
Simon Giesecke
30e0cbbcdc Problem: test_monitor depends on testutil_security
Solution: move general monitoring test utilities to new testutil_monitoring
2019-02-02 15:33:27 +01:00
Simon Giesecke
367246bb23 Problem: test_monitor is not using a test framework
Solution: migrate to unity
2019-02-02 15:33:27 +01:00
Simon Giesecke
ae79b41d4c Problem: bug in tipc_listener_t::set_address, random port is determined but not used
Solution: assign result to address

Fixes #3376
2019-02-01 04:30:20 -05:00
Luca Boccassi
93b3689376 Problem: ZMQ_SOCKET_LIMIT and ZMQ_THREAD_PRIORITY have the same value
Solution: remove documents and tests for ZMQ_THREAD_PRIORITY getter. It
never worked and can never work as it has the same value as a get-only
option ZMQ_SOCKET_LIMIT. It cannot be changed without breaking ABI.
Note that the setter works fine as ZMQ_SOCKET_LIMIT is get-only.
2019-01-15 19:58:42 +00:00
Luca Boccassi
4d38552445 Problem: GCC warnings about string overflows in tests
Solution: mostly false positives, but fix them
2019-01-14 23:50:56 +00:00
Luca Boccassi
d55956574d Problem: test_rebind_ipc still fails
Solution: create manually the random IPC file to reuse
2019-01-14 00:33:36 +00:00
Luca Boccassi
f64b697095 Problem: tests use hard-coded fixed IPC file path
Solution: use wildcards or random directories to avoid races when
multiple users are running the same test on the same machine
2019-01-13 14:50:54 +00:00
Luca Boccassi
4147957a5e Problem: test_security_zap fails on architectures that disallow unaligned pointer access
Solution: use memcpy instead of doing pointer arithmetics with casting
and dereferencing to fix the error on sparc64
2019-01-13 13:10:05 +00:00
Luca Boccassi
9bd9cbbeea Problem: race condition in PUSH might break atomicity
Solution: if a multi-part message cannot be delivered by a PUSH socket
because the pipe is broken mid-way, drop the rest of the frames so that
the atomicity property is not broken.
2018-12-28 17:55:19 +01:00
Simon Giesecke
88bea4fd73 Problem: tests without test framework
Solution: migrate to unity
2018-12-25 13:50:31 +01:00
Simon Giesecke
affe77280c Improved test assertion message 2018-12-16 12:28:42 -05:00
Simon Giesecke
00f4bd05be Problem: tests without test framework
Solution: migrate to unity
2018-12-16 12:28:42 -05:00
Simon Giesecke
4a48184032 Problem: tests without test framework
Solution: migrate to unity
2018-12-10 07:01:06 -05:00
Simon Giesecke
a8b2e5a617 Problem: tests without test framework
Solution: migrate to unity
2018-12-09 07:36:39 -05:00
Luca Boccassi
f1dd84c11f Problem: zmq_proxy STATISTICS eligible for stable
Solution: do it
2018-11-18 13:23:38 +00:00
Luca Boccassi
35c6985e68 Problem: zmq_stopwatch_intermediate is eligible for STABLE
Solution: do it
2018-11-18 13:23:38 +00:00
Luca Boccassi
22c3ecc458 Problem: some context options have no getter
Solution: add one so that class-based bindings can easily use them
2018-11-18 13:23:38 +00:00
Luca Boccassi
c347aef794 Problem: new DRAFT monitoring events are eligible for STABLE
Solution: do it
2018-11-18 13:23:38 +00:00
Luca Boccassi
0e01c27de5 Problem: test_router_notify cannot be ran in parallel
Solution: do not bind to an hard-coded port, use a wildcard.
2018-11-09 16:56:00 +00:00
Luca Boccassi
828812fa72 Problem: test_app_meta cannot be ran in parallel
Solution: do not bind to an hard-coded port, use a wildcard.
2018-11-09 16:46:48 +00:00
Luca Boccassi
ffd99fbaf5 Problem: GNU/Hurd does not implement getsockname for ipc
Solution: skip tests that use ipc://* as it's impossible to get the
address back for the client
2018-11-05 10:59:12 +00:00
Luca Boccassi
205573f1a3 Problem: typo in RUN_TEST macro breaks debian/kfreebsd build
Solution: fix it
2018-11-04 18:12:18 +00:00
Luca Boccassi
1a5937750c Problem: test_connect_delay_tipc randomly fails
Solution: use a monitor to wait for a disconnect instead of a sleep,
and retry to send a message until it fails since the state machine
might be delayed due to the I/O thread being pre-empted on busy
systems.
Also set a receive timeout to avoid random hangs.

Fixes #3124
2018-09-29 22:39:36 +01:00
Francesco Montorsi
4f49e7420b Remove race condition from XPUB/SUB test in test_blocking() 2018-09-21 11:19:50 +02:00
Francesco Montorsi
4b399b51ce change test_hwm_pubsub to use XPUB and wait for subscription before start to sending messages out 2018-09-20 20:42:03 +02:00
Luca Boccassi
df218af3bd Problem: test_proxy_hwm expects wrong number of msgs
Solution: allow for a range between the minimum and maximum expected.
With 2 queues, that's between 20 and 40 messages depending on the
scheduling of the 3 threads involved.
2018-09-16 21:20:10 +01:00
Luca Boccassi
e651babd85 Problem: test_proxy_hwm uses an bool across threads
Solution: use atomics to avoid issues on non-x86 architectures
2018-09-16 21:18:52 +01:00
Francesco Montorsi
72418e9dd0 Improve test reliability by: a) using XPUB in place of PUB to ensure we start publishing only after 1st subscriber has joined; b) accept both 2*HWM, 3*HWM and 4*HWM as TX/RX count of messages 2018-09-16 21:55:59 +02:00
Francesco Montorsi
eb3e63e22f Hwm tests and docs (#3242)
Add new HWM tests and more detailed documentation
2018-09-13 22:14:06 +01:00
Christoph Schulz
a21228b664 Conform to cmakelint --filter=-linelength
- Lowercase all commands
- Unify indent to 2 spaces
- Remove spaces around brackets
- Remove repitition of condition in else(...) and endif(...)

Note: (re-)running CMake did not change the content of the generated files
2018-09-10 00:12:07 +02:00
Simon Giesecke
1734a64d62 Revert "Problem: test_proxy not yet using unity"
This reverts commit fd27324ec3daa50bebea381ce7fd4b505a6a53e6.
2018-08-24 09:49:41 +02:00
Simon Giesecke
430b97fc73 Problem: test_use_fd not yet using unity
Solution: migrate to unity
2018-08-23 18:03:16 +02:00
Simon Giesecke
d668925bca Problem: extensive duplication between test_use_fd_tcp and test_use_fd_ipc
Solution: merge into a single test_use_fd and reduce code duplication by extracting common functions
2018-08-23 18:00:52 +02:00
Simon Giesecke
929d295e01 Problem: test_timers not yet using unity
Solution: migrate to unity
2018-08-23 18:00:51 +02:00
Simon Giesecke
980791d182 Problem: test_stream_timeout not yet using unity
Solution: migrate to unity
2018-08-23 18:00:51 +02:00
Simon Giesecke
f01682292c Problem: test_stream_disconnect not yet using unity
Solution: migrate to unity
2018-08-23 18:00:51 +02:00
Simon Giesecke
309fe2e6fd Problem: test_router_mandatory_hwm not yet using unity
Solution: migrate to unity
2018-08-23 18:00:51 +02:00
Simon Giesecke
fd27324ec3 Problem: test_proxy not yet using unity
Solution: migrate to unity
2018-08-23 18:00:50 +02:00
Simon Giesecke
1a55100dbe Problem: test_xpub_verbose is not using testutil_unity
Solution: use utilities from testutil_unity, reduce duplication
2018-08-22 11:51:11 +02:00
Simon Giesecke
2334090732 Problem: test_stream not yet using unity
Solution: migrate to unity
2018-08-22 11:51:10 +02:00
Simon Giesecke
7ad0ff5e9a Problem: test_stream_empty not yet using unity
Solution: migrate to unity
2018-08-22 11:51:10 +02:00
Simon Giesecke
7b39d2cb2a Problem: test_unbind_wildcard not yet using unity
Solution: migrate to unity
2018-08-22 11:51:10 +02:00
Simon Giesecke
c66288a882 Problem: duplicate code
Solution: extracted into common method
2018-08-22 11:51:10 +02:00
Simon Giesecke
713f075fec Problem: test_xpub_manual not yet using unity
Solution: migrate to unity
2018-08-22 11:51:10 +02:00
Simon Giesecke
407bd3b1b2 Problem: test_spec_pushpull not yet using unity
Solution: migrate to unity
2018-08-22 11:51:09 +02:00
Simon Giesecke
261dd1f92c Problem: test_ancillarries not yet using unity
Solution: migrate to unity
2018-08-22 11:51:09 +02:00
Simon Giesecke
3d2db5d8d5 Problem: test_capabilities not yet using unity
Solution: migrate to unity
2018-08-22 11:51:09 +02:00
Simon Giesecke
dc29361ef4 Problem: test_req_correlate not yet using unity
Solution: migrate to unity
2018-08-22 11:51:09 +02:00
Simon Giesecke
244ba77ebc Problem: test_base85 not yet using unity
Solution: migrate to unity
2018-08-22 11:51:08 +02:00
Simon Giesecke
fce1838545 Problem: test_pair_tcp not yet using unity
Solution: migrate to unity
2018-08-20 11:13:12 +02:00
Simon Giesecke
8328208e60 Problem: inconsistent _out_pipes when using the same routing id without ZMQ_ROUTER_HANDOVER
Solution: added test case, do not erase existing without ZMQ_ROUTER_HANDOVER
2018-08-17 12:50:59 +02:00