Commit Graph

30 Commits

Author SHA1 Message Date
Luca Boccassi
da31917f4f Relicense from LGPL3 + exceptions to Mozilla Public License version 2.0
Relicense permission collected from all relevant authors as tallied at:
https://github.com/rlenferink/libzmq-relicense/blob/master/checklist.md
The relicense grants are collected under RELICENSE/ and will be moved
to the above repository in a later commit.

Fixes https://github.com/zeromq/libzmq/issues/2376
2023-06-05 20:31:47 +01:00
Luca Boccassi
e3d37a82e1 Problem: some tests time out in CI under Valgrind
Solution: triple the timeouts
2021-09-22 16:40:17 +01:00
Simon Giesecke
495fb00b7e Problem: pointee types are unnecessarily non-const
Solution: add const where possible
2020-02-04 18:34:19 +01:00
Simon Giesecke
00f4bd05be Problem: tests without test framework
Solution: migrate to unity
2018-12-16 12:28:42 -05:00
Simon Giesecke
779d120fa3 Problem: tests do not follow naming style
Solution: apply naming style
2018-05-27 13:24:08 +02:00
sigiesec
41f459e1dc Problem: formatting inconsistent
Solution: applied clang-format
2018-02-02 15:47:43 +01:00
Luca Boccassi
5934919f3e Problem: tests bind to hardcoded TCP ports
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!
2017-05-01 22:57:05 +01:00
Constantin Rack
a539b0c6e8 Problem: copyright year is still 2015
Solution: update to 2016
2016-01-28 15:07:31 +01:00
Pieter Hintjens
8620c3e032 Problem: source file headers are somewhat confusing about LGPLv3
Of course people still "can" distributed the sources under the
LGPLv3. However we provide COPYING.LESSER with additional grants.

Solution: specify these grants in the header of each source file.
2015-06-02 22:33:55 +02:00
Pieter Hintjens
94d9a4ffdf Problem: copyright statements are out of date
Solution: update for 2015

Fixes #1320
2015-01-22 10:32:37 +01:00
Pieter Hintjens
b3b9e046ee Updated copyright statements for 2014 2014-01-02 12:00:57 +01:00
Pieter Hintjens
576e3ca5e0 Added z85 codec to ZMQ API
* Removed redundant Z85 code and include files from project
* Simplified use of headers in test cases (now they all just use testutil.hpp)
* Export zmq_z85_encode() and zmq_z85_decode() in API
* Added man pages for these two functions
2013-09-15 20:13:44 +02:00
Richard Newton
a83baa9b0b Fix up threading code from port tests to windows. 2013-08-17 14:23:22 +01:00
Richard Newton
7f74fc7c99 Port tests to windows and add to cmake build. 2013-08-17 13:43:45 +01:00
Pieter Hintjens
f1738b9b92 More copyright cleanups 2013-03-12 17:04:51 +01:00
Pieter Hintjens
963c6a8e2f Lots of cleanups to self-tests
* Removed or truncated sleeps so the tests run faster
* Removed dependencies on zmq_utils
* Rewrote a few tests that were confusing
* Minor code cleanups
2013-01-31 19:46:22 +01:00
Pieter Hintjens
8c9289342a Fixed use of deprecated zmq_init/term 2013-01-31 09:10:49 +01:00
Arthur O'Dwyer
cf20932df0 Add "#undef NDEBUG" to all tests.
This change makes sure that even if the tests are built in a
"release" configuration (with optimizations and NDEBUG turned on),
the assertions won't get compiled out of the tests themselves.

The C standard guarantees that the most recent inclusion of
<assert.h> is the one that counts, so it's important that the
"#undef NDEBUG/#include <assert.h>" come as the last thing in
the block of header files.

"testutil.hpp" includes <assert.h>, so I've left <assert.h> out
of any test that #includes "testutil.hpp", just for the sake of
brevity.
2012-09-06 10:03:12 -07:00
Arthur O'Dwyer
08f6a9e7e8 Remove unused argc/argv parameters in tests. 2012-08-27 16:10:47 -07:00
Martin Sustrik
8e21d64c97 Copyright dates adjusted to reflect reality
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-11-01 18:06:11 +01:00
Martin Sustrik
7563518929 Tests print their name before running
This makes finding out which test have hung-up easier.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-11-01 13:54:28 +01:00
Martin Sustrik
ac7717b7b3 250bpm copyrights added
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-10-31 16:20:30 +01:00
Martin Sustrik
7c0c798120 Command are now stored in ypipes instead of in socketpairs
Storing commands in OS socket buffers caused whole lot of
problems when free space in the buffer ran out. This patch
stores commands in ypipes instead and uses socketpair just
to signal the other thread, ie. at most one byte is stored
in the socketpair at any single instant.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-03 13:33:45 +02:00
Martin Sustrik
0f6f7276e3 Move the pipe termination code to socket_base_t
So far, the pipe termination code was spread among socket type
classes, fair queuer, load balancer, etc. This patch moves
all the associated logic to a single place.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-23 20:30:01 +02:00
Pieter Hintjens
e78cc47b18 Moved tests off 5555 (conflict with Eclipse)
Signed-off-by: Pieter Hintjens <ph@imatix.com>
2011-05-02 18:59:55 +02:00
Martin Sustrik
7d87db0529 Auto-tests modified to use C API instead of C++ binding
As a side effect, broker HWM test was fixed.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24 10:03:49 +01:00
Martin Sustrik
18b9ebea32 The copyrights in file headers updated.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-02 16:30:40 +01:00
Martin Sustrik
325dd2f091 Functions passed to pthread_create are declared as extern "C"
So far these were declared as C++ static functions which
was incorrect and caused warnings with SunStudio.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-27 22:19:43 +01:00
Martin Sustrik
b358df9fff Name of "GNU Lesser Public License" corrected.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-30 15:08:28 +02:00
Martin Sustrik
1a6cd59e8b stress test for shutdown process added 2010-10-01 16:03:08 +02:00