libzmq/tests
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
..
CMakeLists.txt Problem: CMake rebuilds everything twice 2017-11-20 15:55:35 +00:00
README.md Fixed issue #2286 by documentation 2017-01-01 19:08:28 +01:00
test_abstract_ipc.cpp Problem: copyright year is still 2015 2016-01-28 15:07:31 +01:00
test_ancillaries.cpp Problem: Not all ancillary API methods tested 2016-05-08 18:25:03 +01:00
test_atomics.cpp Problem: copyright year is still 2015 2016-01-28 15:07:31 +01:00
test_base85.cpp Problem: zmq_z85_decode does not validate its input (#2322) 2017-01-25 14:28:03 +00:00
test_bind_after_connect_tcp.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_bind_src_address.cpp Problem: copyright year is still 2015 2016-01-28 15:07:31 +01:00
test_capabilities.cpp add test and documentation for "draft" capability 2017-01-19 20:50:18 +01:00
test_client_server.cpp Problem: copyright year is still 2015 2016-01-28 15:07:31 +01:00
test_conflate.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_connect_delay_tipc.cpp tipc: add support for address domain suffix 2016-05-11 21:54:25 +02:00
test_connect_resolve.cpp Problem: copyright year is still 2015 2016-01-28 15:07:31 +01:00
test_connect_rid.cpp Problem: inconsistent naming related to routing ids 2017-09-19 17:53:53 +02:00
test_ctx_destroy.cpp Problem: No coverage for ctx termination errors 2016-05-12 17:47:08 +01:00
test_ctx_options.cpp 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
test_dgram.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_diffserv.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_disconnect_inproc.cpp Problem: copyright year is still 2015 2016-01-28 15:07:31 +01:00
test_filter_ipc.cpp Problem: tests don't build on Windows 2016-02-12 16:12:44 +01:00
test_fork.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_getsockopt_memset.cpp Problem: copyright year is still 2015 2016-01-28 15:07:31 +01:00
test_heartbeats.cpp Problem: CURVE can no longer be used without ZAP 2017-06-13 22:56:32 +01:00
test_hwm_pubsub.cpp Problem: occasional test failures due to messages not (yet) received in test assertion 2017-08-07 10:35:25 +02:00
test_hwm.cpp Problem: occasional test failures due to messages not (yet) received in test assertion 2017-08-07 10:35:25 +02:00
test_immediate.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_inproc_connect.cpp Problem: use of unqualified "id" in code example 2017-09-19 17:54:52 +02:00
test_invalid_rep.cpp Problem: copyright year is still 2015 2016-01-28 15:07:31 +01:00
test_iov.cpp Problem: multiple issues with sendiov/recviov 2016-05-01 19:41:50 +01:00
test_ipc_wildcard.cpp Problem: copyright year is still 2015 2016-01-28 15:07:31 +01:00
test_issue_566.cpp Problem: use of unqualified "id" in code example 2017-09-19 17:54:52 +02:00
test_last_endpoint.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_many_sockets.cpp Fix tests/test_many_sockets.cpp 2016-04-07 23:41:09 -04:00
test_metadata.cpp Problem: use of unqualified "id" in code example 2017-09-19 17:54:52 +02:00
test_monitor.cpp Problem: test_monitor sometimes fails due to a wrong event received, but not known which 2017-08-21 12:20:36 +02:00
test_msg_ffn.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_msg_flags.cpp Problem: use of unqualified "id" in code example 2017-09-19 17:54:52 +02:00
test_pair_inproc.cpp Problem: copyright year is still 2015 2016-01-28 15:07:31 +01:00
test_pair_ipc.cpp Problem: tests use same IPC endpoint 2017-05-01 22:57:05 +01:00
test_pair_tcp.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_pair_tipc.cpp tipc: add support for address domain suffix 2016-05-11 21:54:25 +02:00
test_pair_vmci.cpp Problem: copyright year is still 2015 2016-01-28 15:07:31 +01:00
test_poller.cpp Problem: unused variable in test_wait_corner_cases 2017-09-01 19:55:51 +01:00
test_probe_router.cpp Problem: use of unqualified "id" in code example 2017-09-19 17:54:52 +02:00
test_proxy_single_socket.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_proxy_terminate.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_proxy.cpp Problem: use of unqualified "id" in code example 2017-09-19 17:54:52 +02:00
test_pub_invert_matching.cpp Problem: copyright year is still 2015 2016-01-28 15:07:31 +01:00
test_radio_dish.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_rebind_ipc.cpp Problem: test_rebind_ipc might not see race condition on fast envs 2017-10-06 11:32:14 +01:00
test_reconnect_ivl.cpp Problem: zmq_connect fails after disconnect due to RECONNECT_IVL == -1 2017-09-19 14:05:43 +01:00
test_req_correlate.cpp Problem: use of unqualified "id" in code example 2017-09-19 17:54:52 +02:00
test_req_relaxed.cpp Problem: REQ socket with ZMQ_REQ_RELAXED does not report ZMQ_POLLOUT when queried for events after first message. 2017-11-08 09:55:14 +01:00
test_reqrep_device_tipc.cpp tipc: add support for address domain suffix 2016-05-11 21:54:25 +02:00
test_reqrep_device.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_reqrep_inproc.cpp Problem: copyright year is still 2015 2016-01-28 15:07:31 +01:00
test_reqrep_ipc.cpp Problem: REP leaves label msgs for dead REQ in pipe 2017-05-17 09:18:15 +01:00
test_reqrep_tcp.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_reqrep_tipc.cpp tipc: add support for address domain suffix 2016-05-11 21:54:25 +02:00
test_reqrep_vmci.cpp Problem: copyright year is still 2015 2016-01-28 15:07:31 +01:00
test_router_handover.cpp Problem: use of unqualified "id" in code example 2017-09-19 17:54:52 +02:00
test_router_mandatory_hwm.cpp Problem: use of unqualified "id" in code example 2017-09-19 17:54:52 +02:00
test_router_mandatory_tipc.cpp Problem: tests don't build on Windows 2016-02-12 15:48:37 +01:00
test_router_mandatory.cpp Problem: DRAFT build broken with old GCC due to GNU modifier 2017-10-17 13:36:10 +01:00
test_scatter_gather.cpp Scatter-Gather socket types 2016-04-21 14:50:58 +03:00
test_security_curve.cpp Problem: use of unqualified "id" in code example 2017-09-19 17:54:52 +02:00
test_security_gssapi.cpp Problem: use of unqualified "id" in code example 2017-09-19 17:54:52 +02:00
test_security_null.cpp Problem: use of unqualified "id" in code example 2017-09-19 17:54:52 +02:00
test_security_plain.cpp Problem: use of unqualified "id" in code example 2017-09-19 17:54:52 +02:00
test_security_zap.cpp Problem: strict ZAP protocol adherence is backward incompatible 2017-10-09 17:48:33 +01:00
test_setsockopt.cpp Problem: ZMQ_BINDTODEVICE is DRAFT but not DRAFT 2017-07-31 16:31:31 +01:00
test_shutdown_stress_tipc.cpp tipc: add support for address domain suffix 2016-05-11 21:54:25 +02:00
test_shutdown_stress.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_socket_null.cpp Problem: no tests for socket-related functions passing NULL as socket 2017-08-22 16:22:38 +02:00
test_sockopt_hwm.cpp Problem: test failing due to too few messages sent relative to SNDHWM 2017-08-20 11:51:09 +02:00
test_sodium.cpp zmq_curve_keypair(): return result from crypto_box_keypair() to make testcase meaningfull 2017-03-16 14:01:08 +00:00
test_spec_dealer.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_spec_pushpull.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_spec_rep.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_spec_req.cpp Problem: remaining uses of "identity" 2017-09-19 17:54:59 +02:00
test_spec_router.cpp Problem: term "identity" is confusing 2017-09-19 17:53:44 +02:00
test_srcfd.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_stream_disconnect.cpp Problem: use of unqualified "id" in code example 2017-09-19 17:54:52 +02:00
test_stream_empty.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_stream_exceeds_buffer.cpp Problem: test_stream_exceeds_buffer cannot be ran in parallel 2017-11-10 09:49:54 +00:00
test_stream_timeout.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_stream.cpp Problem: use of unqualified "id" in code example 2017-09-19 17:54:52 +02:00
test_sub_forward_tipc.cpp tipc: add support for address domain suffix 2016-05-11 21:54:25 +02:00
test_sub_forward.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_system.cpp Problem: no test cases for zmq_poller_add*, zmq_poller_modify*, zmq_poller_remove* corner cases 2017-08-22 20:22:39 +02:00
test_term_endpoint_tipc.cpp tipc: add support for address domain suffix 2016-05-11 21:54:25 +02:00
test_term_endpoint.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_thread_safe.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_timeo.cpp Problem: copyright year is still 2015 2016-01-28 15:07:31 +01:00
test_timers.cpp Problem: DRAFT build broken with old GCC due to missing SIZE_MAX 2017-10-17 14:13:28 +01:00
test_udp.cpp problem: udp doesn't enforce correct usage of bind/connect 2016-05-16 13:34:38 +03:00
test_unbind_inproc.cpp Problem: copyright year is still 2015 2016-01-28 15:07:31 +01:00
test_unbind_wildcard.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_use_fd_ipc.cpp Problem: tests use same IPC endpoint 2017-05-01 22:57:05 +01:00
test_use_fd_tcp.cpp Problem: tests bind to hardcoded TCP ports 2017-05-01 22:57:05 +01:00
test_xpub_manual.cpp Problem: XPUB_MANUAL subscriptions not removed on peer term 2017-06-22 01:02:08 +01:00
test_xpub_nodrop.cpp Problem: copyright year is still 2015 2016-01-28 15:07:31 +01:00
test_xpub_welcome_msg.cpp Problem: xpub test has broken style (missing whitespace). 2017-03-30 14:45:48 -07:00
test_zmq_poll_fd.cpp Problem: no mixed FD and zmq socket zmq_poll test 2016-12-15 12:03:48 +00:00
testutil_security.hpp Problem: test_security_{zap|curve} often hangs 2017-11-16 00:44:29 +00:00
testutil.hpp Problem: no test cases for zmq_poller_add*, zmq_poller_modify*, zmq_poller_remove* corner cases 2017-08-22 20:22:39 +02:00

Guidelines for tests

Write your test case as if you were writing clean application code. It should be safe to compile on all platforms.

The only include file you should use is testutil.hpp. Do not include files from src. Do not use the internal libzmq API or your test case is fair game to be deleted.

If you must write non-portable code, wrap it in #ifdefs to ensure it will compile and run on all systems.

Note that testutil.hpp includes platform.h. Do not include it yourself as it changes location depending on the build system and OS.

All sources must contain the correct header. Please copy from test_system.cpp if you're not certain.

Please use only ANSI C99 in test cases, no C++. This is to make the code more reusable.

On many slower environments, like embedded systems, VMs or CI systems, test might fail because it takes time for sockets to settle after a connect. If you need to add a sleep, please be consistent with all the other tests and use: msleep (SETTLE_TIME);

Building tests in Windows

According to the version of your compiler, you should adapt the path libzmq.lib in the file tests/CMakeLists.txt.

Install CMAKE CMD> CMAKE libzmq/tests CMD> tests.sln CMD> # build all projects in the solution