Commit Graph

6495 Commits

Author SHA1 Message Date
Luca Boccassi
4cb15ec638
Merge pull request #2994 from sigiesec/migrate-to-unity
Migrate further tests to unity, and split up into individual test cases
2018-03-15 16:55:05 +00:00
Pontus Sköldström
57422c7df1 Problem: Documentation missing for ZMQ_METADATA socket option 2018-03-15 17:24:54 +01:00
Simon Giesecke
7bd57ba83b Problem: test case tests multiple aspects
Solution: split test case
2018-03-15 16:43:34 +01:00
Simon Giesecke
3e374d98f1 Problem: test case tests multiple aspects
Solution: split test case
2018-03-15 16:43:33 +01:00
Simon Giesecke
eb0307a9a6 Problem: test case tests multiple aspects
Solution: split test case
2018-03-15 16:43:32 +01:00
Simon Giesecke
10dae6e830 Problem: test_poller not using unity
Solution: migrate to unity, and split test cases
2018-03-15 16:43:30 +01:00
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
Luca Boccassi
e388774737
Merge pull request #2981 from eponsko/master
Problem: no support for ZMTP 3.1 application metadata
2018-03-15 12:57:40 +00: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
Pontus Sköldström
dd5eec35be Support application metadata through ZMQ_METADATA
Lets the application set per-connection metadata.
Metadata is specified as "X-key:value" and set using zmq_setsockopt, eg:
zmq_setsockopt (s, ZMQ_METADATA, "X-key:value", 11);

The peer can then obtain the metadata from a received message:
char *data = zmq_msg_gets(msg, "X-key");
2018-03-14 12:56:15 +01: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