mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-28 16:15:23 +08:00
Merge pull request #3381 from bluca/test_ipv6_monitor
Problems: ipv6 test_monitor hangs, old Windows build fails
This commit is contained in:
commit
c28cbf76d1
1
.gitignore
vendored
1
.gitignore
vendored
@ -153,6 +153,7 @@ test_proxy_hwm
|
||||
unittest_ip_resolver
|
||||
unittest_mtrie
|
||||
unittest_poller
|
||||
unittest_radix_tree
|
||||
unittest_udp_address
|
||||
unittest_ypipe
|
||||
tests/test*.log
|
||||
|
@ -98,6 +98,9 @@ extern "C" {
|
||||
#if defined ZMQ_HAVE_SOLARIS || defined ZMQ_HAVE_OPENVMS
|
||||
#include <inttypes.h>
|
||||
#elif defined _MSC_VER && _MSC_VER < 1600
|
||||
#ifndef uint64_t
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#endif
|
||||
#ifndef int32_t
|
||||
typedef __int32 int32_t;
|
||||
#endif
|
||||
|
@ -145,6 +145,12 @@ void test_monitor_versioned_basic (bind_function_t bind_function_,
|
||||
// Now do a basic ping test
|
||||
bind_function_ (server, server_endpoint, sizeof server_endpoint);
|
||||
|
||||
int ipv6_;
|
||||
size_t ipv6_size_ = sizeof (ipv6_);
|
||||
TEST_ASSERT_SUCCESS_ERRNO (
|
||||
zmq_getsockopt (server, ZMQ_IPV6, &ipv6_, &ipv6_size_));
|
||||
TEST_ASSERT_SUCCESS_ERRNO (
|
||||
zmq_setsockopt (client, ZMQ_IPV6, &ipv6_, sizeof (int)));
|
||||
TEST_ASSERT_SUCCESS_ERRNO (zmq_connect (client, server_endpoint));
|
||||
bounce (server, client);
|
||||
|
||||
|
@ -32,9 +32,6 @@
|
||||
|
||||
#include "testutil.hpp"
|
||||
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#include <inttypes.h>
|
||||
|
||||
// General, i.e. non-security specific, monitor utilities
|
||||
|
||||
// Read one event off the monitor socket; return value and address
|
||||
@ -261,7 +258,7 @@ int64_t get_monitor_event_with_timeout_v2 (void *monitor_,
|
||||
char **remote_address_,
|
||||
int timeout_)
|
||||
{
|
||||
int res;
|
||||
int64_t res;
|
||||
if (timeout_ == -1) {
|
||||
// process infinite timeout in small steps to allow the user
|
||||
// to see some information on the console
|
||||
@ -309,10 +306,8 @@ void expect_monitor_event_v2 (void *monitor_,
|
||||
expected_remote_address_ ? &remote_address : NULL);
|
||||
bool failed = false;
|
||||
if (event != expected_event_) {
|
||||
fprintf (stderr,
|
||||
"Expected monitor event %" PRIx64 ", but received %" PRIx64
|
||||
"\n",
|
||||
expected_event_, event);
|
||||
fprintf (stderr, "Expected monitor event %lld, but received %lld\n",
|
||||
(long long) expected_event_, (long long) event);
|
||||
failed = true;
|
||||
}
|
||||
if (expected_local_address_
|
||||
|
Loading…
x
Reference in New Issue
Block a user