Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
a86592f7
Commit
a86592f7
authored
Feb 03, 2019
by
Simon Giesecke
Committed by
Simon Giesecke
Feb 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: test_monitor is not run for ipc and tipc
Solution: add test cases
parent
9b1627f0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
test_monitor.cpp
tests/test_monitor.cpp
+14
-0
testutil_unity.hpp
tests/testutil_unity.hpp
+20
-0
No files found.
tests/test_monitor.cpp
View file @
a86592f7
...
...
@@ -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
();
...
...
tests/testutil_unity.hpp
View file @
a86592f7
...
...
@@ -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_
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment