Name
Last commit
Last update
..
CMakeLists.txt Problem: cmake does not run test_zmq_poll_fd
README.md Problem: Tests do no build in Windows environment
test_abstract_ipc.cpp Problem: copyright year is still 2015
test_ancillaries.cpp Problem: Not all ancillary API methods tested
test_atomics.cpp Problem: copyright year is still 2015
test_base85.cpp Problem: no unit tests for base85 or public curve functions.
test_bind_after_connect_tcp.cpp Problem: no bind-after-connect TCP test
test_bind_src_address.cpp Problem: copyright year is still 2015
test_capabilities.cpp Problem: use of libsodium vs. tweetnacl is confused
test_client_server.cpp Problem: copyright year is still 2015
test_conflate.cpp Revert "Revert "Problem: deprecated use and reference of `zmq_term`""
test_connect_delay_tipc.cpp tipc: add support for address domain suffix
test_connect_resolve.cpp Problem: copyright year is still 2015
test_connect_rid.cpp Problem: copyright year is still 2015
test_ctx_destroy.cpp Problem: No coverage for ctx termination errors
test_ctx_options.cpp Problem: ZMQ_MSG_T_SIZE draft but not in DRAFT section
test_dgram.cpp problem: udp doesn't enforce correct usage of bind/connect
test_diffserv.cpp Problem: copyright year is still 2015
test_disconnect_inproc.cpp Problem: copyright year is still 2015
test_filter_ipc.cpp Problem: tests don't build on Windows
test_fork.cpp Problem: test_fork does not clean up at exit
test_getsockopt_memset.cpp Problem: copyright year is still 2015
test_heartbeats.cpp Problem: tests use various sleep patterns to wait
test_hwm.cpp Problem: copyright year is still 2015
test_hwm_pubsub.cpp Problem: tests use various sleep patterns to wait
test_immediate.cpp Problem: various tests fail in slow environments
test_inproc_connect.cpp Problem: zmq_ctx_term asserts with connect-before-bind and sockets with identity over inproc transport
test_invalid_rep.cpp Problem: copyright year is still 2015
test_iov.cpp Problem: multiple issues with sendiov/recviov
test_ipc_wildcard.cpp Problem: copyright year is still 2015
test_issue_566.cpp Problem: copyright year is still 2015
test_last_endpoint.cpp Problem: copyright year is still 2015
test_many_sockets.cpp Fix tests/test_many_sockets.cpp
test_metadata.cpp Problem: copyright year is still 2015
test_monitor.cpp Problem: new DRAFT monitor events returned even without --enable-draft
test_msg_ffn.cpp Problem: tests use various sleep patterns to wait
test_msg_flags.cpp Problem: copyright year is still 2015
test_pair_inproc.cpp Problem: copyright year is still 2015
test_pair_ipc.cpp Problem: copyright year is still 2015
test_pair_tcp.cpp Problem: copyright year is still 2015
test_pair_tipc.cpp tipc: add support for address domain suffix
test_pair_vmci.cpp Problem: copyright year is still 2015
test_poller.cpp Problem: zmq_poller_destroy parameter checking
test_probe_router.cpp Problem: copyright year is still 2015
test_proxy.cpp Problem: deprecated `zmq_utils.h` is still included
test_proxy_single_socket.cpp Problem: deprecated `zmq_utils.h` is still included
test_proxy_terminate.cpp Problem: tests use various sleep patterns to wait
test_pub_invert_matching.cpp Problem: copyright year is still 2015
test_radio_dish.cpp Fix zmq_poll return code assert in tests/test_radio_dish.cpp
test_req_correlate.cpp Fixed ZMQ_REQ_CORRELATE (see pull request #1730)
test_req_relaxed.cpp Loading commit data...
test_reqrep_device.cpp Loading commit data...
test_reqrep_device_tipc.cpp Loading commit data...
test_reqrep_inproc.cpp Loading commit data...
test_reqrep_ipc.cpp Loading commit data...
test_reqrep_tcp.cpp Loading commit data...
test_reqrep_tipc.cpp Loading commit data...
test_reqrep_vmci.cpp Loading commit data...
test_router_handover.cpp Loading commit data...
test_router_mandatory.cpp Loading commit data...
test_router_mandatory_hwm.cpp Loading commit data...
test_router_mandatory_tipc.cpp Loading commit data...
test_scatter_gather.cpp Loading commit data...
test_security_curve.cpp Loading commit data...
test_security_null.cpp Loading commit data...
test_security_plain.cpp Loading commit data...
test_setsockopt.cpp Loading commit data...
test_shutdown_stress.cpp Loading commit data...
test_shutdown_stress_tipc.cpp Loading commit data...
test_sockopt_hwm.cpp Loading commit data...
test_sodium.cpp Loading commit data...
test_spec_dealer.cpp Loading commit data...
test_spec_pushpull.cpp Loading commit data...
test_spec_rep.cpp Loading commit data...
test_spec_req.cpp Loading commit data...
test_spec_router.cpp Loading commit data...
test_srcfd.cpp Loading commit data...
test_stream.cpp Loading commit data...
test_stream_disconnect.cpp Loading commit data...
test_stream_empty.cpp Loading commit data...
test_stream_exceeds_buffer.cpp Loading commit data...
test_stream_timeout.cpp Loading commit data...
test_sub_forward.cpp Loading commit data...
test_sub_forward_tipc.cpp Loading commit data...
test_system.cpp Loading commit data...
test_term_endpoint.cpp Loading commit data...
test_term_endpoint_tipc.cpp Loading commit data...
test_thread_safe.cpp Loading commit data...
test_timeo.cpp Loading commit data...
test_timers.cpp Loading commit data...
test_udp.cpp Loading commit data...
test_unbind_inproc.cpp Loading commit data...
test_unbind_wildcard.cpp Loading commit data...
test_use_fd_ipc.cpp Loading commit data...
test_use_fd_tcp.cpp Loading commit data...
test_xpub_manual.cpp Loading commit data...
test_xpub_nodrop.cpp Loading commit data...
test_xpub_welcome_msg.cpp Loading commit data...
test_zmq_poll_fd.cpp Loading commit data...
testutil.hpp Loading commit data...

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

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