mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-12 10:33:52 +01:00
commit
3cafc0c260
25
.github/workflows/CI.yaml
vendored
25
.github/workflows/CI.yaml
vendored
@ -23,16 +23,6 @@ jobs:
|
|||||||
MSVCYEAR: vs2019
|
MSVCYEAR: vs2019
|
||||||
ARTIFACT_NAME: v142-x64
|
ARTIFACT_NAME: v142-x64
|
||||||
ENABLE_DRAFTS: ON
|
ENABLE_DRAFTS: ON
|
||||||
- platform: x64
|
|
||||||
configuration: Release
|
|
||||||
os: windows-2016
|
|
||||||
WITH_LIBSODIUM: ON
|
|
||||||
ENABLE_CURVE: ON
|
|
||||||
CMAKE_GENERATOR: "Visual Studio 15 2017 Win64"
|
|
||||||
MSVCVERSION: "v141"
|
|
||||||
MSVCYEAR: "vs2017"
|
|
||||||
ARTIFACT_NAME: v141-x64
|
|
||||||
ENABLE_DRAFTS: ON
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
BUILD_TYPE: default
|
BUILD_TYPE: default
|
||||||
PACKAGES: asciidoc xmlto
|
PACKAGES: asciidoc xmlto
|
||||||
@ -163,11 +153,6 @@ jobs:
|
|||||||
- name: Add msbuild to PATH
|
- name: Add msbuild to PATH
|
||||||
uses: microsoft/setup-msbuild@v1.0.2
|
uses: microsoft/setup-msbuild@v1.0.2
|
||||||
if: matrix.os == 'windows-2019'
|
if: matrix.os == 'windows-2019'
|
||||||
- name: Add msbuild to PATH 2016
|
|
||||||
uses: microsoft/setup-msbuild@v1.0.2
|
|
||||||
with:
|
|
||||||
vs-version: '[15.0,16.0)'
|
|
||||||
if: matrix.os == 'windows-2016'
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
if: matrix.WITH_LIBSODIUM == 'ON'
|
if: matrix.WITH_LIBSODIUM == 'ON'
|
||||||
with:
|
with:
|
||||||
@ -175,12 +160,12 @@ jobs:
|
|||||||
ref: stable
|
ref: stable
|
||||||
path: libsodium
|
path: libsodium
|
||||||
- name: Compile libsodium
|
- name: Compile libsodium
|
||||||
if: matrix.WITH_LIBSODIUM == 'ON' && (matrix.os == 'windows-2019' || matrix.os == 'windows-2016')
|
if: matrix.WITH_LIBSODIUM == 'ON' && matrix.os == 'windows-2019'
|
||||||
shell: cmd
|
shell: cmd
|
||||||
working-directory: libsodium
|
working-directory: libsodium
|
||||||
run: msbuild /v:minimal /p:Configuration=%Configuration%DLL builds\msvc\%MSVCYEAR%\libsodium\libsodium.vcxproj
|
run: msbuild /v:minimal /p:Configuration=%Configuration%DLL builds\msvc\%MSVCYEAR%\libsodium\libsodium.vcxproj
|
||||||
- name: Copy libsodium
|
- name: Copy libsodium
|
||||||
if: matrix.WITH_LIBSODIUM == 'ON' && (matrix.os == 'windows-2019' || matrix.os == 'windows-2016')
|
if: matrix.WITH_LIBSODIUM == 'ON' && matrix.os == 'windows-2019'
|
||||||
shell: powershell
|
shell: powershell
|
||||||
working-directory: libsodium
|
working-directory: libsodium
|
||||||
run: Copy-Item "bin\${env:Platform}\${env:Configuration}\${env:MSVCVERSION}\dynamic\libsodium.lib" -Destination "bin\${env:Platform}\${env:Configuration}\${env:MSVCVERSION}\dynamic\sodium.lib"
|
run: Copy-Item "bin\${env:Platform}\${env:Configuration}\${env:MSVCVERSION}\dynamic\libsodium.lib" -Destination "bin\${env:Platform}\${env:Configuration}\${env:MSVCVERSION}\dynamic\sodium.lib"
|
||||||
@ -189,16 +174,16 @@ jobs:
|
|||||||
path: libzmq
|
path: libzmq
|
||||||
- run: md build_libzmq
|
- run: md build_libzmq
|
||||||
shell: cmd
|
shell: cmd
|
||||||
if: matrix.os == 'windows-2019' || matrix.os == 'windows-2016'
|
if: matrix.os == 'windows-2019'
|
||||||
- name: build-win
|
- name: build-win
|
||||||
if: matrix.os == 'windows-2019' || matrix.os == 'windows-2016'
|
if: matrix.os == 'windows-2019'
|
||||||
shell: cmd
|
shell: cmd
|
||||||
working-directory: build_libzmq
|
working-directory: build_libzmq
|
||||||
run: |
|
run: |
|
||||||
cmake -D CMAKE_INCLUDE_PATH="%SODIUM_INCLUDE_DIR%" -D CMAKE_LIBRARY_PATH="%SODIUM_LIBRARY_DIR%" -D WITH_LIBSODIUM="%WITH_LIBSODIUM%" -D ENABLE_DRAFTS="%ENABLE_DRAFTS%" -D ENABLE_ANALYSIS="%ENABLE_ANALYSIS%" -D ENABLE_CURVE="%ENABLE_CURVE%" -D API_POLLER="%API_POLLER%" -D POLLER="%POLLER%" %EXTRA_FLAGS% -D WITH_LIBSODIUM="%WITH_LIBSODIUM%" -D LIBZMQ_WERROR="%LIBZMQ_WERROR%" -G "%CMAKE_GENERATOR%" "%LIBZMQ_SRCDIR%"
|
cmake -D CMAKE_INCLUDE_PATH="%SODIUM_INCLUDE_DIR%" -D CMAKE_LIBRARY_PATH="%SODIUM_LIBRARY_DIR%" -D WITH_LIBSODIUM="%WITH_LIBSODIUM%" -D ENABLE_DRAFTS="%ENABLE_DRAFTS%" -D ENABLE_ANALYSIS="%ENABLE_ANALYSIS%" -D ENABLE_CURVE="%ENABLE_CURVE%" -D API_POLLER="%API_POLLER%" -D POLLER="%POLLER%" %EXTRA_FLAGS% -D WITH_LIBSODIUM="%WITH_LIBSODIUM%" -D LIBZMQ_WERROR="%LIBZMQ_WERROR%" -G "%CMAKE_GENERATOR%" "%LIBZMQ_SRCDIR%"
|
||||||
cmake --build . --config %configuration% --target install -- -verbosity:Minimal -maxcpucount
|
cmake --build . --config %configuration% --target install -- -verbosity:Minimal -maxcpucount
|
||||||
- name: test
|
- name: test
|
||||||
if: matrix.os == 'windows-2019' || matrix.os == 'windows-2016'
|
if: matrix.os == 'windows-2019'
|
||||||
shell: cmd
|
shell: cmd
|
||||||
working-directory: build_libzmq
|
working-directory: build_libzmq
|
||||||
run: ctest -C "%Configuration%"
|
run: ctest -C "%Configuration%"
|
||||||
|
17
appveyor.yml
17
appveyor.yml
@ -29,8 +29,8 @@ environment:
|
|||||||
ARTIFACT_NAME: v90
|
ARTIFACT_NAME: v90
|
||||||
- platform: Win32
|
- platform: Win32
|
||||||
configuration: Release
|
configuration: Release
|
||||||
WITH_LIBSODIUM: ON
|
WITH_LIBSODIUM: OFF
|
||||||
ENABLE_CURVE: ON
|
ENABLE_CURVE: OFF
|
||||||
CMAKE_GENERATOR: "Visual Studio 10 2010"
|
CMAKE_GENERATOR: "Visual Studio 10 2010"
|
||||||
MSVCVERSION: "v100"
|
MSVCVERSION: "v100"
|
||||||
MSVCYEAR: "vs2010"
|
MSVCYEAR: "vs2010"
|
||||||
@ -275,19 +275,6 @@ test_script:
|
|||||||
)
|
)
|
||||||
- cmd: if "%APPVEYOR_REPO_TAG%"=="false" (ctest -C "%Configuration%" -V %TEST_OPTIONS%)
|
- cmd: if "%APPVEYOR_REPO_TAG%"=="false" (ctest -C "%Configuration%" -V %TEST_OPTIONS%)
|
||||||
|
|
||||||
deploy:
|
|
||||||
- provider: GitHub
|
|
||||||
tag: $(APPVEYOR_REPO_TAG_NAME)
|
|
||||||
release: libzmq $(APPVEYOR_REPO_TAG_NAME)
|
|
||||||
description: |
|
|
||||||
Windows binaries for libzmq $(APPVEYOR_REPO_TAG_NAME), uploaded from appveyor.
|
|
||||||
Edit after appveyor is done uploading.
|
|
||||||
auth_token:
|
|
||||||
secure: vmAeVtN2qiQgFBCB2I5FDDRtADQ7GUdR9NwAJJyakbiV5OHzLHExDcC/D9Oh5r67
|
|
||||||
draft: true
|
|
||||||
prerelease: false
|
|
||||||
force_update: true # adds files, clobbers release name and description
|
|
||||||
|
|
||||||
|
|
||||||
# the analysis build is repeated; apparently appveyor only uses the first section that matches some branch
|
# the analysis build is repeated; apparently appveyor only uses the first section that matches some branch
|
||||||
for:
|
for:
|
||||||
|
@ -713,6 +713,11 @@ fi
|
|||||||
|
|
||||||
if test "x$have_pgm_library" = "xyes"; then
|
if test "x$have_pgm_library" = "xyes"; then
|
||||||
AC_DEFINE(ZMQ_HAVE_OPENPGM, [1], [Have OpenPGM extension])
|
AC_DEFINE(ZMQ_HAVE_OPENPGM, [1], [Have OpenPGM extension])
|
||||||
|
# When using CXX98 mode 'restrict will not be defined, so redefine it, as it
|
||||||
|
# is used in the PGM headers
|
||||||
|
if test "x$enable_force_CXX98_compat" = "xyes"; then
|
||||||
|
CPPFLAGS="-Drestrict=__restrict__ $CPPFLAGS"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AM_CONDITIONAL(HAVE_PGM, test "x$have_pgm_library" = "xyes")
|
AM_CONDITIONAL(HAVE_PGM, test "x$have_pgm_library" = "xyes")
|
||||||
|
@ -197,7 +197,10 @@ class atomic_counter_t
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
integer_t get () const ZMQ_NOEXCEPT { return _value; }
|
integer_t get () const ZMQ_NOEXCEPT
|
||||||
|
{
|
||||||
|
return _value;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#if defined ZMQ_ATOMIC_COUNTER_CXX11
|
#if defined ZMQ_ATOMIC_COUNTER_CXX11
|
||||||
|
@ -114,7 +114,7 @@ struct blob_t
|
|||||||
unsigned char *data () { return _data; }
|
unsigned char *data () { return _data; }
|
||||||
|
|
||||||
// Defines an order relationship on blob_t.
|
// Defines an order relationship on blob_t.
|
||||||
bool operator< (blob_t const &other_) const
|
bool operator<(blob_t const &other_) const
|
||||||
{
|
{
|
||||||
const int cmpres =
|
const int cmpres =
|
||||||
memcmp (_data, other_._data, std::min (_size, other_._size));
|
memcmp (_data, other_._data, std::min (_size, other_._size));
|
||||||
@ -182,7 +182,10 @@ struct blob_t
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
blob_t (const blob_t &other) : _owned (false) { set_deep_copy (other); }
|
blob_t (const blob_t &other) : _owned (false)
|
||||||
|
{
|
||||||
|
set_deep_copy (other);
|
||||||
|
}
|
||||||
blob_t &operator= (const blob_t &other)
|
blob_t &operator= (const blob_t &other)
|
||||||
{
|
{
|
||||||
if (this != &other) {
|
if (this != &other) {
|
||||||
|
@ -58,7 +58,10 @@ class mailbox_t ZMQ_FINAL : public i_mailbox
|
|||||||
// close the file descriptors in the signaller. This is used in a forked
|
// close the file descriptors in the signaller. This is used in a forked
|
||||||
// child process to close the file descriptors so that they do not interfere
|
// child process to close the file descriptors so that they do not interfere
|
||||||
// with the context in the parent process.
|
// with the context in the parent process.
|
||||||
void forked () ZMQ_FINAL { _signaler.forked (); }
|
void forked () ZMQ_FINAL
|
||||||
|
{
|
||||||
|
_signaler.forked ();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -397,13 +397,13 @@ int zmq::proxy (class socket_base_t *frontend_,
|
|||||||
frontend_in = (events[i].events & ZMQ_POLLIN) != 0;
|
frontend_in = (events[i].events & ZMQ_POLLIN) != 0;
|
||||||
frontend_out = (events[i].events & ZMQ_POLLOUT) != 0;
|
frontend_out = (events[i].events & ZMQ_POLLOUT) != 0;
|
||||||
} else
|
} else
|
||||||
// This 'if' needs to be after check for 'frontend_' in order never
|
// This 'if' needs to be after check for 'frontend_' in order never
|
||||||
// to be reached in case frontend_==backend_, so we ensure backend_in=false in that case.
|
// to be reached in case frontend_==backend_, so we ensure backend_in=false in that case.
|
||||||
if (events[i].socket == backend_) {
|
if (events[i].socket == backend_) {
|
||||||
backend_in = (events[i].events & ZMQ_POLLIN) != 0;
|
backend_in = (events[i].events & ZMQ_POLLIN) != 0;
|
||||||
backend_out = (events[i].events & ZMQ_POLLOUT) != 0;
|
backend_out = (events[i].events & ZMQ_POLLOUT) != 0;
|
||||||
} else if (events[i].socket == control_)
|
} else if (events[i].socket == control_)
|
||||||
control_in = (events[i].events & ZMQ_POLLIN) != 0;
|
control_in = (events[i].events & ZMQ_POLLIN) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1511,7 +1511,7 @@ int zmq::socket_base_t::process_commands (int timeout_, bool throttle_)
|
|||||||
while (rc == 0 || errno == EINTR) {
|
while (rc == 0 || errno == EINTR) {
|
||||||
if (rc == 0) {
|
if (rc == 0) {
|
||||||
cmd.destination->process_command (cmd);
|
cmd.destination->process_command (cmd);
|
||||||
}
|
}
|
||||||
rc = _mailbox->recv (&cmd, 0);
|
rc = _mailbox->recv (&cmd, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,13 +69,19 @@ template <typename T> class ypipe_conflate_t ZMQ_FINAL : public ypipe_base_t<T>
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// There are no incomplete items for conflate ypipe
|
// There are no incomplete items for conflate ypipe
|
||||||
bool unwrite (T *) { return false; }
|
bool unwrite (T *)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Flush is no-op for conflate ypipe. Reader asleep behaviour
|
// Flush is no-op for conflate ypipe. Reader asleep behaviour
|
||||||
// is as of the usual ypipe.
|
// is as of the usual ypipe.
|
||||||
// Returns false if the reader thread is sleeping. In that case,
|
// Returns false if the reader thread is sleeping. In that case,
|
||||||
// caller is obliged to wake the reader up before using the pipe again.
|
// caller is obliged to wake the reader up before using the pipe again.
|
||||||
bool flush () { return reader_awake; }
|
bool flush ()
|
||||||
|
{
|
||||||
|
return reader_awake;
|
||||||
|
}
|
||||||
|
|
||||||
// Check whether item is available for reading.
|
// Check whether item is available for reading.
|
||||||
bool check_read ()
|
bool check_read ()
|
||||||
@ -100,7 +106,10 @@ template <typename T> class ypipe_conflate_t ZMQ_FINAL : public ypipe_base_t<T>
|
|||||||
// Applies the function fn to the first element in the pipe
|
// Applies the function fn to the first element in the pipe
|
||||||
// and returns the value returned by the fn.
|
// and returns the value returned by the fn.
|
||||||
// The pipe mustn't be empty or the function crashes.
|
// The pipe mustn't be empty or the function crashes.
|
||||||
bool probe (bool (*fn_) (const T &)) { return dbuffer.probe (fn_); }
|
bool probe (bool (*fn_) (const T &))
|
||||||
|
{
|
||||||
|
return dbuffer.probe (fn_);
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
dbuffer_t<T> dbuffer;
|
dbuffer_t<T> dbuffer;
|
||||||
|
@ -273,7 +273,10 @@ void test_blocking (const char *bind_endpoint_)
|
|||||||
test_defaults_small (bind_endpoint); \
|
test_defaults_small (bind_endpoint); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
void test_blocking_##name () { test_blocking (bind_endpoint); }
|
void test_blocking_##name () \
|
||||||
|
{ \
|
||||||
|
test_blocking (bind_endpoint); \
|
||||||
|
}
|
||||||
|
|
||||||
#define RUN_REGULAR_TEST_CASES(name) \
|
#define RUN_REGULAR_TEST_CASES(name) \
|
||||||
RUN_TEST (test_defaults_large_##name); \
|
RUN_TEST (test_defaults_large_##name); \
|
||||||
|
@ -44,14 +44,14 @@ void test_pair_vmci ()
|
|||||||
|
|
||||||
void *sb = test_context_socket (ZMQ_PAIR);
|
void *sb = test_context_socket (ZMQ_PAIR);
|
||||||
int rc = zmq_bind (sb, endpoint.c_str ());
|
int rc = zmq_bind (sb, endpoint.c_str ());
|
||||||
if (rc < 0 && errno == EAFNOSUPPORT)
|
if (rc < 0 && (errno == EAFNOSUPPORT || errno == EPROTONOSUPPORT))
|
||||||
TEST_IGNORE_MESSAGE ("VMCI not supported");
|
TEST_IGNORE_MESSAGE ("VMCI not supported");
|
||||||
TEST_ASSERT_SUCCESS_ERRNO (rc);
|
TEST_ASSERT_SUCCESS_ERRNO (rc);
|
||||||
|
|
||||||
void *sc = test_context_socket (ZMQ_PAIR);
|
void *sc = test_context_socket (ZMQ_PAIR);
|
||||||
TEST_ASSERT_SUCCESS_ERRNO (zmq_connect (sc, endpoint.c_str ()));
|
TEST_ASSERT_SUCCESS_ERRNO (zmq_connect (sc, endpoint.c_str ()));
|
||||||
|
|
||||||
expect_bounce_fail (sb, sc);
|
bounce (sb, sc);
|
||||||
|
|
||||||
test_context_socket_close_zero_linger (sc);
|
test_context_socket_close_zero_linger (sc);
|
||||||
test_context_socket_close_zero_linger (sb);
|
test_context_socket_close_zero_linger (sb);
|
||||||
|
@ -333,7 +333,10 @@ void call_poller_wait_all_null_event_fails_event_count_zero (void *poller_)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define TEST_CASE_FUNC_PARAM(name, func) \
|
#define TEST_CASE_FUNC_PARAM(name, func) \
|
||||||
void test_##name () { func (name); }
|
void test_##name () \
|
||||||
|
{ \
|
||||||
|
func (name); \
|
||||||
|
}
|
||||||
|
|
||||||
TEST_CASE_FUNC_PARAM (call_poller_wait_null_event_fails, test_with_valid_poller)
|
TEST_CASE_FUNC_PARAM (call_poller_wait_null_event_fails, test_with_valid_poller)
|
||||||
TEST_CASE_FUNC_PARAM (call_poller_wait_all_null_event_fails_event_count_nonzero,
|
TEST_CASE_FUNC_PARAM (call_poller_wait_all_null_event_fails_event_count_nonzero,
|
||||||
|
@ -41,7 +41,10 @@
|
|||||||
|
|
||||||
// Helper macro to define the v4/v6 function pairs
|
// Helper macro to define the v4/v6 function pairs
|
||||||
#define MAKE_TEST_V4V6(_test) \
|
#define MAKE_TEST_V4V6(_test) \
|
||||||
static void _test##_ipv4 () { _test (false); } \
|
static void _test##_ipv4 () \
|
||||||
|
{ \
|
||||||
|
_test (false); \
|
||||||
|
} \
|
||||||
\
|
\
|
||||||
static void _test##_ipv6 () \
|
static void _test##_ipv6 () \
|
||||||
{ \
|
{ \
|
||||||
|
@ -44,14 +44,14 @@ void test_reqrep_vmci ()
|
|||||||
|
|
||||||
void *sb = test_context_socket (ZMQ_DEALER);
|
void *sb = test_context_socket (ZMQ_DEALER);
|
||||||
int rc = zmq_bind (sb, endpoint.c_str ());
|
int rc = zmq_bind (sb, endpoint.c_str ());
|
||||||
if (rc < 0 && errno == EAFNOSUPPORT)
|
if (rc < 0 && (errno == EAFNOSUPPORT || errno == EPROTONOSUPPORT))
|
||||||
TEST_IGNORE_MESSAGE ("VMCI not supported");
|
TEST_IGNORE_MESSAGE ("VMCI not supported");
|
||||||
TEST_ASSERT_SUCCESS_ERRNO (rc);
|
TEST_ASSERT_SUCCESS_ERRNO (rc);
|
||||||
|
|
||||||
void *sc = test_context_socket (ZMQ_DEALER);
|
void *sc = test_context_socket (ZMQ_DEALER);
|
||||||
TEST_ASSERT_SUCCESS_ERRNO (zmq_connect (sc, endpoint.c_str ()));
|
TEST_ASSERT_SUCCESS_ERRNO (zmq_connect (sc, endpoint.c_str ()));
|
||||||
|
|
||||||
expect_bounce_fail (sb, sc);
|
bounce (sb, sc);
|
||||||
|
|
||||||
test_context_socket_close_zero_linger (sc);
|
test_context_socket_close_zero_linger (sc);
|
||||||
test_context_socket_close_zero_linger (sb);
|
test_context_socket_close_zero_linger (sb);
|
||||||
|
@ -185,7 +185,10 @@ void test_block_on_send_no_peers (const char *bind_address_)
|
|||||||
{ \
|
{ \
|
||||||
test_round_robin_out (bind_address); \
|
test_round_robin_out (bind_address); \
|
||||||
} \
|
} \
|
||||||
void test_fair_queue_in_##name () { test_fair_queue_in (bind_address); } \
|
void test_fair_queue_in_##name () \
|
||||||
|
{ \
|
||||||
|
test_fair_queue_in (bind_address); \
|
||||||
|
} \
|
||||||
void test_block_on_send_no_peers_##name () \
|
void test_block_on_send_no_peers_##name () \
|
||||||
{ \
|
{ \
|
||||||
test_block_on_send_no_peers (bind_address); \
|
test_block_on_send_no_peers (bind_address); \
|
||||||
|
@ -168,7 +168,10 @@ void test_destroy_queue_on_disconnect (const char *bind_address_)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define TEST_SUITE(name, bind_address) \
|
#define TEST_SUITE(name, bind_address) \
|
||||||
void test_fair_queue_in_##name () { test_fair_queue_in (bind_address); } \
|
void test_fair_queue_in_##name () \
|
||||||
|
{ \
|
||||||
|
test_fair_queue_in (bind_address); \
|
||||||
|
} \
|
||||||
void test_destroy_queue_on_disconnect_##name () \
|
void test_destroy_queue_on_disconnect_##name () \
|
||||||
{ \
|
{ \
|
||||||
test_destroy_queue_on_disconnect (bind_address); \
|
test_destroy_queue_on_disconnect (bind_address); \
|
||||||
|
@ -83,7 +83,10 @@ void test_bad_filter_string (const char *const filter_)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define TEST_BAD_FILTER_STRING(case, filter) \
|
#define TEST_BAD_FILTER_STRING(case, filter) \
|
||||||
void test_bad_filter_string_##case () { test_bad_filter_string (filter); }
|
void test_bad_filter_string_##case () \
|
||||||
|
{ \
|
||||||
|
test_bad_filter_string (filter); \
|
||||||
|
}
|
||||||
|
|
||||||
TEST_BAD_FILTER_STRING (foo, "foo")
|
TEST_BAD_FILTER_STRING (foo, "foo")
|
||||||
TEST_BAD_FILTER_STRING (zeros_foo, "0.0.0.0foo")
|
TEST_BAD_FILTER_STRING (zeros_foo, "0.0.0.0foo")
|
||||||
|
@ -197,8 +197,14 @@ void recv_array_expect_success (void *socket_,
|
|||||||
// Use this is an test executable to perform a default setup and teardown of
|
// Use this is an test executable to perform a default setup and teardown of
|
||||||
// the test context, which is appropriate for many libzmq test cases.
|
// the test context, which is appropriate for many libzmq test cases.
|
||||||
#define SETUP_TEARDOWN_TESTCONTEXT \
|
#define SETUP_TEARDOWN_TESTCONTEXT \
|
||||||
void setUp () { setup_test_context (); } \
|
void setUp () \
|
||||||
void tearDown () { teardown_test_context (); }
|
{ \
|
||||||
|
setup_test_context (); \
|
||||||
|
} \
|
||||||
|
void tearDown () \
|
||||||
|
{ \
|
||||||
|
teardown_test_context (); \
|
||||||
|
}
|
||||||
|
|
||||||
// The maximum number of sockets that can be managed by the test context.
|
// The maximum number of sockets that can be managed by the test context.
|
||||||
#define MAX_TEST_SOCKETS 128
|
#define MAX_TEST_SOCKETS 128
|
||||||
|
Loading…
Reference in New Issue
Block a user