Commit a86592f7 authored by Simon Giesecke's avatar Simon Giesecke Committed by Simon Giesecke

Problem: test_monitor is not run for ipc and tipc

Solution: add test cases
parent 9b1627f0
......@@ -218,6 +218,18 @@ void test_monitor_versioned_basic_tcp_ipv6 ()
static const char prefix[] = "tcp://[::1]:";
test_monitor_versioned_basic (bind_loopback_ipv6, prefix);
}
void test_monitor_versioned_basic_ipc ()
{
static const char prefix[] = "ipc://";
test_monitor_versioned_basic (bind_loopback_ipc, prefix);
}
void test_monitor_versioned_basic_tipc ()
{
static const char prefix[] = "tipc://";
test_monitor_versioned_basic (bind_loopback_tipc, prefix);
}
#endif
int main ()
......@@ -231,6 +243,8 @@ int main ()
#ifdef ZMQ_BUILD_DRAFT_API
RUN_TEST (test_monitor_versioned_basic_tcp_ipv4);
RUN_TEST (test_monitor_versioned_basic_tcp_ipv6);
RUN_TEST (test_monitor_versioned_basic_ipc);
RUN_TEST (test_monitor_versioned_basic_tipc);
#endif
return UNITY_END ();
......
......@@ -31,6 +31,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "../include/zmq.h"
#include "testutil.hpp"
#include <unity.h>
#include <string.h>
......@@ -327,6 +329,24 @@ void bind_loopback_ipv6 (void *socket_, char *my_endpoint_, size_t len_)
bind_loopback (socket_, true, my_endpoint_, len_);
}
void bind_loopback_ipc (void *socket_, char *my_endpoint_, size_t len_)
{
if (!zmq_has ("ipc")) {
TEST_IGNORE_MESSAGE ("ipc is not available");
}
test_bind (socket_, "ipc://*", my_endpoint_, len_);
}
void bind_loopback_tipc (void *socket_, char *my_endpoint_, size_t len_)
{
if (!is_tipc_available ()) {
TEST_IGNORE_MESSAGE ("tipc is not available");
}
test_bind (socket_, "tipc://<*>", my_endpoint_, len_);
}
// utility function to create a random IPC endpoint, similar to what a ipc://*
// wildcard binding does, but in a way it can be reused for multiple binds
void make_random_ipc_endpoint (char *out_endpoint_)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment