Name
Last commit
Last update
..
CMakeLists.txt Problem: cmake does not run test_zmq_poll_fd
README.md Fixed issue #2286 by documentation
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: zmq_z85_decode does not validate its input (#2322)
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 add test and documentation for "draft" capability
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 Loading commit data...
test_inproc_connect.cpp Loading commit data...
test_invalid_rep.cpp Loading commit data...
test_iov.cpp Loading commit data...
test_ipc_wildcard.cpp Loading commit data...
test_issue_566.cpp Loading commit data...
test_last_endpoint.cpp Loading commit data...
test_many_sockets.cpp Loading commit data...
test_metadata.cpp Loading commit data...
test_monitor.cpp Loading commit data...
test_msg_ffn.cpp Loading commit data...
test_msg_flags.cpp Loading commit data...
test_pair_inproc.cpp Loading commit data...
test_pair_ipc.cpp Loading commit data...
test_pair_tcp.cpp Loading commit data...
test_pair_tipc.cpp Loading commit data...
test_pair_vmci.cpp Loading commit data...
test_poller.cpp Loading commit data...
test_probe_router.cpp Loading commit data...
test_proxy.cpp Loading commit data...
test_proxy_single_socket.cpp Loading commit data...
test_proxy_terminate.cpp Loading commit data...
test_pub_invert_matching.cpp Loading commit data...
test_radio_dish.cpp Loading commit data...
test_req_correlate.cpp Loading commit data...
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

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