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
0e0bead3
Commit
0e0bead3
authored
Mar 24, 2019
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: code from bind_loopback_ipc is duplicated
Solution: call bind_loopback_ipc where applicable
parent
7f64b925
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
17 deletions
+4
-17
test_ipc_wildcard.cpp
tests/test_ipc_wildcard.cpp
+1
-5
test_pair_ipc.cpp
tests/test_pair_ipc.cpp
+1
-4
test_reqrep_ipc.cpp
tests/test_reqrep_ipc.cpp
+2
-8
No files found.
tests/test_ipc_wildcard.cpp
View file @
0e0bead3
...
...
@@ -35,12 +35,8 @@ SETUP_TEARDOWN_TESTCONTEXT
void
test_ipc_wildcard
()
{
void
*
sb
=
test_context_socket
(
ZMQ_PAIR
);
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_bind
(
sb
,
"ipc://*"
));
char
endpoint
[
200
];
size_t
size
=
sizeof
(
endpoint
);
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_getsockopt
(
sb
,
ZMQ_LAST_ENDPOINT
,
endpoint
,
&
size
));
bind_loopback_ipc
(
sb
,
endpoint
,
sizeof
endpoint
);
void
*
sc
=
test_context_socket
(
ZMQ_PAIR
);
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_connect
(
sc
,
endpoint
));
...
...
tests/test_pair_ipc.cpp
View file @
0e0bead3
...
...
@@ -35,12 +35,9 @@ SETUP_TEARDOWN_TESTCONTEXT
void
test_roundtrip
()
{
char
my_endpoint
[
256
];
size_t
len
=
sizeof
(
my_endpoint
);
void
*
sb
=
test_context_socket
(
ZMQ_PAIR
);
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_bind
(
sb
,
"ipc://*"
));
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_getsockopt
(
sb
,
ZMQ_LAST_ENDPOINT
,
my_endpoint
,
&
len
));
bind_loopback_ipc
(
sb
,
my_endpoint
,
sizeof
my_endpoint
);
void
*
sc
=
test_context_socket
(
ZMQ_PAIR
);
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_connect
(
sc
,
my_endpoint
));
...
...
tests/test_reqrep_ipc.cpp
View file @
0e0bead3
...
...
@@ -39,10 +39,7 @@ void test_leak ()
char
my_endpoint
[
256
];
void
*
sb
=
test_context_socket
(
ZMQ_REP
);
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_bind
(
sb
,
"ipc://*"
));
size_t
len
=
sizeof
(
my_endpoint
);
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_getsockopt
(
sb
,
ZMQ_LAST_ENDPOINT
,
my_endpoint
,
&
len
));
bind_loopback_ipc
(
sb
,
my_endpoint
,
sizeof
my_endpoint
);
void
*
sc
=
test_context_socket
(
ZMQ_REQ
);
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_connect
(
sc
,
my_endpoint
));
...
...
@@ -67,10 +64,7 @@ void test_simple (void)
char
my_endpoint
[
256
];
void
*
sb
=
test_context_socket
(
ZMQ_REP
);
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_bind
(
sb
,
"ipc://*"
));
size_t
len
=
sizeof
(
my_endpoint
);
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_getsockopt
(
sb
,
ZMQ_LAST_ENDPOINT
,
my_endpoint
,
&
len
));
bind_loopback_ipc
(
sb
,
my_endpoint
,
sizeof
my_endpoint
);
void
*
sc
=
test_context_socket
(
ZMQ_REQ
);
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_connect
(
sc
,
my_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