Solution: roll back the pipe if writing messages other than the
first fails in router::xsend.
Also add test case that reproduces the memory leak when ran with
valgrind.
Fixes#2567
Solution: use either a wildcard IPC, or where the codepath needs to
be tested a file named after the test, so that it is unique and there
is no clash on the filesystem, allowing parallel test runs.
Solution: use ZMQ_LAST_ENDPOINT in most places. This alllows running
tests in paralle, and on over-booked shared machines where many of
the ports would be already in use.
Keep 3 tests with an hardcoded port, as there are some code paths that
require it (eg: connect before bind), but list those ports in
tests/testutil.hpp as macros so that they do not overlap and still
allow parallel runs.
These changes were inspired by a patch uploaded to Ubuntu by the
package maintainer, Steve Langasek <steve.langasek@ubuntu.com>.
Thank you Steve!
Problem: there is no test coverage for GSSAPI.
Solution: add a test structured like the CURVE test.
The test is not built if libzmq is not configured with
--with-libgssapi_krb5. It will report SKIPPED status
if the required environment is missing (see below).
Environment: KRB5_KTNAME and KRB5_CLIENT_KTNAME
environment variables must point to a keytab file
containing creds for a host-based test principal
(see comment at top of source for details).
Kerberos must be configured and a KDC containing the
test principal must be running, otherwise the test
will fail/hang.
N.B. For now, the test must use the same principal for
both client and server roles because it seems impossible
to set them to different principals when they are
threads in the same process. Once one principal is
cached in credential cache, attempts to acquire creds
for a different "desired name" seem to be ignored and
the cached principal is used instead.
Remove the `build/msvc` include path from the test project to fix a
problem with the order of the include paths. Additionally remove the
unnecessary `include_directories` from the master project.
Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Solution:
Revert "Problem with ZMQ_ROUTER_MANDATORY option when peer lost"
This partially reverts commit 06740b5d8c.
The change in the mentioned commit was fixed to be backward
compatible so test changes are no longer necessary.
Partially revert the commit, leaving only the bug fix and taking out
the test change and the superfluous change in socket_base.
indention
Revert "indention"
This reverts commit a6e7e192ac2d089ac9f7dc0d31d4b1fd10de982e.
indention
indention
Fix Failure in tests
Check both pipe full and pipe close
* Problem: zmq_z85_decode does not validate its input
Solution: added checks for invalid characters and overflows
* Added tests, added further check for range overflow, removed (multiple) calls to strlen
* Problem: gcc fails to build
Solution: added missing include directive
* Added VS2015 test_utils_z85 project
* Fixed indentation and copyright notice
* Resolved garbage from merge
* Revert "Added VS2015 test_utils_z85 project"
This reverts commit c58b3c664c.
* Problem: test calls zmq_z85_decode with a NULL dest
Solution: call zmq_z85_decode with a properly sized buffer
* Problem: tests for zmq_z85_* scattered over two files
Solution: merged files
* Removed reference to removed test file from CMakeLists.txt
* Problem: Missing include directive to stdint.h
Solution: Added include directive
* Define __STDC_LIMIT_MACROS before including stdint.h
* Problem: Wrong variable is checked for invalid character marker
Solution: Use correct variable
Solution: wrap the event triggering in the DRAFT ifdef as well as the
defines. This ensures that the event are returned only if the
library was built with DRAFTs enabled.
Also update the test case to expect the new events since it uses
the catch-all mask. Although the sequence of event is different and
this might be considered as an API breakage, using the catch-all
ZMQ_EVENT_ALL mask implies that, well, all events are monitored so
it's normal that new ones will be added.
Users that don't want this kind of behaviour to change can simply
monitor only the event that they care about.
Solution: during a connect with a TCP endpoint if a source address is
passed set the SO_REUSEADDR flag on the socket before the bind system
call.
Add unit test to cover this case for both IPv4 and IPv6.
Solution: check if the connecting inproc socket has been closed
before trying to send the identity.
Otherwise the pipe will be in waiting_for_delimiter state causing
writes to fail and the connect to assert when the context is being
torn down and the pending inproc connects are resolved.
Add test case that covers this behaviour.
Solution: allow for '[' character when doing the basic sanity check
on the TCP endpoint.
Also add unit tests for both IPv4 and IPv6 source;dest format.
only if the library is found at a specific path
Solution: Search for libzmq.lib in ../bin/Win32/Debug/v120/dynamic, don't
know how to automatically search in correct path based on current build
configuration