Simon Giesecke
991b2336e4
Problem: test_thread_safe not using unity
...
Solution: migrate to unity, and split test cases
2018-03-15 16:43:27 +01:00
Simon Giesecke
5d32828bbf
Problem: test_reconnect_ivl not using unity
...
Solution: migrate to unity, and reduce code duplication
2018-03-15 16:43:26 +01:00
Simon Giesecke
1e217ac063
Problem: unity built with unnecessary float but without command line argument support
...
Solution: add appropriate definitions to build
2018-03-15 11:28:50 +01:00
Simon Giesecke
f92cdf9470
Problem: test_ctx_destroy not using unity, and mixing test cases
...
Solution: migrate to unit and split up test cases
2018-03-15 10:58:56 +01:00
Luca Boccassi
b2e50d9d03
Merge pull request #2992 from sigiesec/migrate-to-unity
...
Migrate more tests to unity
2018-03-14 23:04:53 +00:00
Simon Giesecke
fa89fb8639
Problem: Makefile.am missing unity dependencies
...
Solution: add unity dependencies/flags
2018-03-14 22:40:24 +01:00
Simon Giesecke
9553a1f33e
Problem: test_connect_resolve not yet using unity
...
Solution: migrate to unity
2018-03-14 22:40:24 +01:00
Simon Giesecke
6f9459e3fb
Migrate tests/test_conflate.cpp to unity
2018-03-14 19:05:19 +01:00
Simon Giesecke
d318c95bc2
Problem: different aspects mixed in one test case
...
Solution: split up test case
2018-03-14 18:59:36 +01:00
Simon Giesecke
dbcd42c58d
Migrate tests/test_client_server.cpp to unity
2018-03-14 18:45:26 +01:00
Simon Giesecke
0114572ce6
Migrate tests/test_bind_src_address.cpp to unity
2018-03-14 18:45:25 +01:00
Simon Giesecke
be33dce68e
Migrate tests/test_bind_after_connect_tcp.cpp to unity
2018-03-14 18:45:25 +01:00
Simon Giesecke
631de94563
Problem: test_router_hangover not yet using unity
...
Solution: migrate to unity
2018-03-14 15:09:13 +01:00
Luca Boccassi
59516ed51a
Merge pull request #2990 from sigiesec/migrate-to-unity
...
Problem: test assertion failures do not clean up properly
2018-03-14 13:25:02 +00:00
Simon Giesecke
59157f0e2f
Problem: missing guidelines on proper test cleanup
...
Solution: add guidelines to tests/README.md
2018-03-14 12:26:06 +01:00
Simon Giesecke
9e3932b46b
Problem: test assertion failures do not clean up properly
...
Solution: provide test_context and manage sockets of test_context via setup and teardown
2018-03-14 12:24:21 +01:00
Luca Boccassi
df03bf4825
Merge pull request #2987 from sigiesec/migrate-to-unity
...
Migrate further tests (test_hwm, test_router_mandatory) to unity
2018-03-14 08:14:34 +00:00
Simon Giesecke
c602361836
Problem: debug output in CMake file
...
Solution: removed
2018-03-14 08:22:23 +01:00
Simon Giesecke
437e9f4f59
Problem: tests readme outdated
...
Solution: fixed description for building tests, added references to unity and unittests
2018-03-14 08:22:23 +01:00
Simon Giesecke
ae558706bf
Problem: test_hwm and test_router_mandatory not yet using unity
...
Solution: migrate to unity
2018-03-14 08:22:23 +01:00
Luca Boccassi
c9437ab755
Merge pull request #2986 from wittmeie/ws/fix-for-windows-imported-target
...
Missing IMPORTED_LOCATION_<CONFIG>property for shared-library import-targets (see zeromq/libzmq#2985 )
2018-03-12 15:41:10 +00:00
Luca Boccassi
d2293da6e5
Merge pull request #2983 from tonytheodore/master
...
Fixes for mingw cross-compilation
2018-03-12 14:00:39 +00:00
Steffen Wittmeier
79d9f2ba1e
Fixes missing IMPORTED_LOCATION in import-target
2018-03-12 13:38:46 +01:00
Tony Theodore
c7876c097f
Problem: mingw static/shared builds have different preprocessor defines
...
Solution: remove objects optimisation in library build (similar to #2860 )
and set PUBLIC compile definitions on all static builds instead of MSVC
only.
2018-03-12 21:56:37 +11:00
Sergey Kachanovskiy
9c748f1bf1
Partial fix for issue 2963, removed invalid casts from fd_t to int ( #2984 )
...
* Fixes issue 2963, ref stream_engine.cpp:981
* Fixes issue 2963, ref socks_connecter.cpp:158
* Fixes issue 2963, ref tcp_listener.cpp:144
* Fixes issue 2963, ref tcp_connecter.cpp:423
* Fixes issue 2963, ref socks_connecter.cpp:436
* Fixes issue 2963, ref tcp_listener.cpp:179
* Fixes issue 2963, ref tcp_listener.cpp:268
* Fixes issue 2963, ref tcp_connecter.cpp:160
2018-03-12 11:55:58 +01:00
Tony Theodore
794d7a3143
Problem: certain windows header files are actually lowercase
...
Solution: change case of `WinSock2.h Iphlpapi.h Rpc.h` to match the
files on disk. This is only noticeable when cross-compiling from a
case-sensitive system so wouldn't get picked up in MSVC or mingw
builds running on a windows machine.
MSDN uses capitalised versions in prose and lowercase in code examples:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms737629(v=vs.85).aspx
Fixes #2978 , the missing library message is a little misleading.
2018-03-12 20:19:27 +11:00
Constantin Rack
7bce4ffbc7
Merge pull request #2982 from bluca/formattweetnacl
...
Problem: formatting issues in CI
2018-03-11 19:07:23 +01:00
Luca Boccassi
8d544ef1c4
Problem: formatting issues in the CI
...
Solution: commit clang-format-diff
2018-03-10 12:44:27 +00:00
Luca Boccassi
fef99d6c50
Problem: tweetnacl is external code and clang-format parses it
...
Solution: add pragma to make clang-format ignore the external code
2018-03-10 12:43:34 +00:00
Manuel Segura
4726f7262d
Pull request to merge porting to WindRiver VxWorks 6.x ( #2966 )
...
* Problem: Still need to port over more files to VxWorks 6.x
Solution: Port more files to VxWorks 6.x
* Problem: Need to port over remaining files to VxWorks 6.x. Also remove POSIX thread dependency for VxWorks (because of priority inversion problem in POSIX mutexes with VxWorks 6.x processes)
Solution: Port over remaining files to VxWorks 6.x. Also removed POSIX thread dependency for VxWorks
* Problem: Needed to modify TCP, UDP, TIPC classes with #ifdefs to be compatible with VxWorks 6.x.
Solution: Modify TCP, UDP, TIPC classes with #ifdefs to be compatible with VxWorks 6.x
2018-03-10 11:03:02 +00:00
Simon Giesecke
0d23b5ca69
Merge pull request #2980 from kachanovskiy/master
...
Fixed issue #2979
2018-03-09 22:45:16 +01:00
Kachanovskiy
90342e0d29
Fixed issue #2979
2018-03-09 22:24:23 +01:00
Luca Boccassi
19060345e4
Problem: TIPC availability check is too strict ( #2977 )
...
* Problem: TIPC availability check is too strict
Solution: at build time only check if the API is available. In the tests
do a first check and a skip if the functionality is not available.
TIPC needs an in-tree but not loaded by default kernel module, tipc.ko
to be loaded, which requires root, so it is unlikely to be available on
any build system by default.
This will allow most distributions to ship with TIPC support built in,
and to avoid tests failure if the module is not there.
* Problem: no Travis tests for TIPC
Solution: mark one job with sudo: required and load the kernel module
* Problem: CMake fails when test returns 77 (skip)
Solution: set property to let it mark the test as skipped as intended
2018-03-09 17:47:42 +01:00
Pontus.Skoeldstroem
7abb8388d6
Problem: Tests for different TIPC address types missing ( #2956 )
...
* Tests for different TIPC address types and code cleanup
* Adds tests for binding/connecting with different TIPC address types
using Unity
* Adds error checking for address type misuse
2018-03-07 17:31:26 +00:00
Luca Boccassi
40c6c1a7c9
Merge pull request #2976 from zeromq/revert-2974-static_init_gcc
...
Revert "Problem: mis-detection of threadsafe_static_init causes test failures"
2018-03-07 15:18:16 +00:00
Simon Giesecke
cef9cfa091
Revert "Problem: mis-detection of threadsafe_static_init causes test failures"
2018-03-07 15:03:07 +01:00
Constantin Rack
0c6c935726
Merge pull request #2974 from bluca/static_init_gcc
...
Problem: mis-detection of threadsafe_static_init causes test failures
2018-03-07 07:51:38 +01:00
Luca Boccassi
9bd2d3f937
Problem: mis-detection of threadsafe_static_init causes test failures
...
Solution: do not rely __cplusplus >= 201103L to detect whether the
compiler supports thread safe static initialisation, but check only
the proper feature preprocessor macro.
GCC introduced it in version 8, and Clang in version 6.
2018-03-06 23:11:03 +00:00
Constantin Rack
677efea238
Merge pull request #2973 from bluca/deb7
...
Problem: build broken with gcc-4.7
2018-03-06 22:55:07 +01:00
Luca Boccassi
e0b1992dd7
Problem: build broken with gcc-4.7
...
Solution: initialise variable in options.cpp to dummy value to fix
compiler complaint:
src/options.cpp: In function
'int zmq::do_setsockopt_int_as_bool_strict(const void*, size_t, bool*)':
src/options.cpp:121:5: error: 'value' may be used uninitialized in
this function [-Werror=maybe-uninitialized]
src/options.cpp: In function
'int zmq::do_setsockopt_int_as_bool_relaxed(const void*, size_t, bool*)':
src/options.cpp:135:31: error: 'value' may be used uninitialized in
this function [-Werror=maybe-uninitialized]
2018-03-06 20:29:47 +00:00
Luca Boccassi
ec58ba04f3
Merge pull request #2972 from sigiesec/reduce-sockopt-code-duplication
...
Problem: code duplication in getsockopt/setsockopt
2018-03-06 20:08:46 +00:00
Simon Giesecke
6f967c3a13
Problem: code duplication in getsockopt/setsockopt
...
Solution: extracted common code into do_getsockopt/do_setsockopt functions
2018-03-06 16:41:30 +01:00
Luca Boccassi
10d2b2885e
Merge pull request #2971 from ZMQers/fix-static-init
...
Problem: static initialization order fiasco
2018-03-06 09:18:52 +00:00
Constantin Rack
494c2a71f8
Merge pull request #2970 from bluca/format
...
Problem: CI check for format fails
2018-03-06 00:18:17 +01:00
Luca Boccassi
c36d8cb8e4
Problem: PR template does not mention clang-format
...
Solution: add paragraph explaining how to run it to make sure code is
correctly formatted.
2018-03-05 22:47:40 +00:00
Luca Boccassi
541ca30d8e
Problem: make clang-format still shows error in the CI
...
Solution: run make clang-format-diff and commit the changes.
2018-03-05 22:41:11 +00:00
Luca Boccassi
4ea1e78d9d
Merge pull request #2969 from skaes/master
...
Problem: enormous memory increase due to zero copy decoding
2018-03-05 17:40:33 +00:00
Stefan Kaes
fcbd2a5710
Problem: enormous memory increase due to zero copy decoding
...
The zero copy decoding strategy implemented for 4.2.0 can lead to a large
increase of main memory usage in some cases (I have seen one program go up to
40G from 10G after upgrading from 4.1.4). This commit adds a new option to
contexts, called ZMQ_ZERO_COPY_RECV, which allows one to switch to the old
decoding strategy.
2018-03-05 18:13:28 +01:00
Ryan Hileman
3658b2b580
Problem: pthread condvar timeouts are broken ( #2967 )
...
* fix pthread condvar timeouts
This fixes a race condition / hang for threadsafe sockets.
Context: https://github.com/zeromq/czmq/issues/1873#issuecomment-370279244
2018-03-05 16:36:10 +00:00
Simon Giesecke
8cdfc8b9dd
Problem: static initialization order fiasco
...
Solution: use local statics when available in a thread-safe implementation
2018-03-05 16:30:57 +01:00
Luca Boccassi
d54633add1
Merge pull request #2964 from bluca/fix_mtrie_32bit
...
Problem: unittest_mtrie fails on 32bit *nix
2018-03-02 19:06:51 +00:00
Luca Boccassi
23025f44c6
Problem: unittest_mtrie fails on 32bit *nix
...
Solution: correctly dereference pointer in test.
2018-03-02 18:00:17 +00:00
Luca Boccassi
173b54a8c9
Merge pull request #2950 from zeromq/add-unittests-mtrie
...
Problem: no unit tests for mtrie
2018-03-02 17:41:06 +00:00
Simon Giesecke
9cd01bb54f
Problem: inconsistent return values from mtrie_t::rm
...
Solution: Return an enum from rm instead of a bool, and adapt existing uses
2018-03-02 13:42:50 +01:00
Simon Giesecke
36cdcc6c1a
Problem: docs of mtrie referring to subscriptions and pipes
...
Solution: generalized terms to entries/values
2018-03-02 13:42:47 +01:00
Simon Giesecke
e34e03d1a6
Problem: missing test case for addition of duplicate entry
...
Solution: added test case
2018-03-02 13:42:46 +01:00
Luca Boccassi
d57422819a
Problem: documentation for ZMQ_XPUB_VERBOSE(R) is unclear
...
Solultion: clarify that notifications for unique subs/unsubs are always
passed, and these option only affect the behaviour for duplicated ones.
2018-03-02 13:42:45 +01:00
Luca Boccassi
354491ddf2
Problem: no test for ZMQ_XPUB_VERBOSE(R)
...
Solution: add test_xpub_verbose to cover those APIs
2018-03-02 13:42:44 +01:00
Simon Giesecke
5d5def40b5
Problem: casts required due to void* arguments in a C++ class
...
Solution: introduce a type template argument
2018-03-02 13:42:42 +01:00
Simon Giesecke
15b4f596a8
Problem: insufficient unit tests for mtrie
...
Solution: added further test cases
2018-03-02 13:42:41 +01:00
Simon Giesecke
5fb0e97ab7
Problem: semantic issues
...
Solution: added some TODO comments, improved existing documentation
2018-03-02 13:42:31 +01:00
Simon Giesecke
8bb055ece8
Problem: insufficient unit tests for mtrie
...
Solution: added test case, reduced code duplication in tests
2018-03-02 13:40:53 +01:00
Simon Giesecke
0e34d13063
Problem: insufficient unit tests for mtrie
...
Solution: added unit test and assertions
2018-03-02 13:40:50 +01:00
Simon Giesecke
506f0e5c44
Problem: insufficient unit tests for mtrie
...
Solution: add test case
2018-03-02 13:40:49 +01:00
Simon Giesecke
56d806a9ef
Problem: infufficient unit tests for mtrie
...
Solution: added some test cases for rm
2018-03-02 13:40:48 +01:00
Simon Giesecke
b42a59a839
Problem: insufficient unit tests for mtrie
...
Solution: added test case
2018-03-02 13:40:46 +01:00
Simon Giesecke
96fb17cb55
Problem: unittests not recognized by code coverage measurement
...
Solution: add CODE_COVERAGE_*FLAGS to unit tests build
Fixes #2949
2018-03-02 13:40:45 +01:00
Simon Giesecke
dbbc10e05b
Problem: incomplete test coverage of mtrie
...
Solution: add some more test cases
2018-03-02 13:32:51 +01:00
Simon Giesecke
a9712c0bf2
Problem: no unittests for mtrie
...
Solution: made mtrie generic (to remove complex dependency on pipe_t),
and added some unit tests
2018-03-02 13:32:51 +01:00
Simon Giesecke
9fc3692e3f
Problem: read-only arguments of mtrie are not declared as const
...
Solution: add const, introduce typedef
2018-03-02 13:32:50 +01:00
Luca Boccassi
31387f84e4
Merge pull request #2960 from Romain-Geissler-1A/fix-gcc-8-build
...
Fix gcc 8 build warning/error with -O3.
2018-02-27 11:00:49 +00:00
Romain Geissler
1e03f7b2d4
Fix gcc 8 build warning/error with -O3.
2018-02-27 10:12:22 +01:00
Luca Boccassi
b575b05d2c
Merge pull request #2951 from eponsko/master
...
Problem: No support for addressing using TIPC Port Identity
2018-02-19 17:24:24 +00:00
Pontus Sköldström
78aa9b1983
Support addressing TIPC Port Identity
...
ZeroMQ currently supports location independent addressing using TIPC
Port Names with tipc://{type,instance}. This commits adds support for
connecting and binding using TIPC Port Identity addresses. To connect
using Port Identities the expected format is tipc://<Z.C.N:Ref>, e.g.
"tipc://<1.2.3:123123>". To bind using TIPC Port Identities the expected
format is "tipc://<*>".
2018-02-19 17:34:40 +01:00
Luca Boccassi
4c7c9b87bf
Merge pull request #2947 from sigiesec/fix-unittest-poller-race
...
Problem: race condition in unittest_poller
2018-02-14 18:19:44 +00:00
Luca Boccassi
2700c15d67
Merge pull request #2946 from hartcw/master
...
Minor fixes for windows cmake build
2018-02-14 15:10:56 +00:00
Francis Hart
ef7cb96782
Fix cmake install error when BUILD_SHARED is off
...
This fixes an error with the cmake install configuration, which
attempted an invalid copy of a .pdb file on windows, when the
BUILD_SHARED option is disabled.
2018-02-14 15:22:54 +02:00
Francis Hart
d470475272
Add cmake build option for disabling tests
...
This adds a new cmake build option called BUILD_TESTS, that can be used
to enable/disable building of the tests. This is enabled by default.
2018-02-14 15:22:54 +02:00
Francis Hart
dee0213108
Ensure correct cmake target suffix for all builds
...
This updates the cmake set_target_properperties usage, so that the suffix
is specified for the MinSizeRel build type.
2018-02-14 15:22:54 +02:00
Simon Giesecke
5224b8704a
Problem: race condition in unit test
...
Solution: fix order of statements in test_events_t
2018-02-13 22:27:15 -05:00
Luca Boccassi
487c275809
Merge pull request #2945 from kachanovskiy/master
...
Fix build break when SIO_LOOPBACK_FAST_PATH is not defined (i.e. in VS2010)
2018-02-13 22:29:38 +00:00
Kachanovskiy
e10464e45e
Fix for build break when SIO_LOOPBACK_FAST_PATH is not defined (i.e. in VS2010)
2018-02-13 23:04:08 +01:00
Luca Boccassi
bc467f0631
Merge pull request #2944 from sigiesec/unity
...
Problem: insufficient unit tests for poller concept and ypipe
2018-02-13 19:05:51 +00:00
Simon Giesecke
94743fd21f
Problem: wrong formatting in several files
...
Solution: apply clang-format
2018-02-13 18:40:43 +01:00
Simon Giesecke
90c6d993be
Problem: kqueue_t fails unittest_poller
...
Solution: fix shutdown of kqueue_t
2018-02-13 18:38:30 +01:00
Simon Giesecke
3b90ad8c63
Problem: support of std::atomic is incomplete in VS <2015
...
Solution: use std::atomic only from VS 2015
2018-02-13 18:38:29 +01:00
Simon Giesecke
9aa957b445
Problem: appveyor builds fails if they are not the most recent commit
...
Solution: use shallow_clone option instead of clone_depth
2018-02-13 18:38:28 +01:00
Simon Giesecke
815c7db06b
Problem: poll build runs as last appveyor build
...
Solution: change order of appveyor build jobs to enable faster feedback
on more diverse builds
2018-02-13 18:38:27 +01:00
Simon Giesecke
0458b85dec
Problem: Some tests timeout on appveyor for POLLER=poll
...
Solution: Increase test timeouts for poll poller under Windows
2018-02-13 18:38:26 +01:00
Simon Giesecke
96131b5b4e
Problem: no documentation of the poller concept
...
Solution: added documentation
2018-02-13 18:38:25 +01:00
Simon Giesecke
fafea72b92
Problem: header files not included in VS project files
...
Solution: add to list of sources
2018-02-13 18:38:24 +01:00
Simon Giesecke
a8e9032dc5
Problem: unreachable code in io_thread_t::process_stop
...
Solution: replaced by assertion
2018-02-13 18:38:24 +01:00
Simon Giesecke
922053237f
Problem: test_sockopt_hwm not using unity
...
Solution: migrate test_sockopt_hwm to unity
2018-02-13 18:38:23 +01:00
Simon Giesecke
a5738529e8
Problem: wsa_assert does not include error code
...
Solution: extend output of wsa_assert
2018-02-13 18:38:22 +01:00
Simon Giesecke
e8e24030ea
Problem: network initialization and shutdown functions not available for
...
reuse
Solution: extract into functions defined in ip.hpp
Problem: signaler_t::make_fdpair not reusable
Solution: move make_fdpair to ip.hpp
Problem: epoll worker with no fds cannot be stopped
Solution: use interruptible epoll_pwait call
Problem: insufficient unit tests for poller
Solution: add test cases
2018-02-13 18:38:17 +01:00
Simon Giesecke
ecb3b503c3
Problem: no output of details on test failure
...
Solution: set CTEST_OUTPUT_ON_FAILURE option
2018-02-12 17:17:32 +01:00
Luca Boccassi
e57afec80e
Merge pull request #2943 from sigiesec/fix-select-unix
...
Problem: data races in select/poll poller implementations
2018-02-12 16:09:08 +00:00
Simon Giesecke
c62574ffca
Problem: segfault in select_t::trigger_events
...
Solution: fixed access to stale vector
2018-02-12 14:42:46 +01:00
Simon Giesecke
11a5388637
Problem: data race w.r.t. select_t::stopping
...
Solution: change termination condition of select_t
2018-02-12 14:42:33 +01:00
Simon Giesecke
e650240580
Problem: data race w.r.t. poll_t::stopping
...
Solution: remove stopping, stop on thread-safe conditions; add
additional checks for correct thread-safe usage
2018-02-12 14:41:53 +01:00