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
87c22364
Commit
87c22364
authored
Oct 29, 2014
by
lysyloren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable IPC testing on ipc-incapable systems in test_term_endpoint.cpp
parent
f47960e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
test_term_endpoint.cpp
tests/test_term_endpoint.cpp
+10
-0
No files found.
tests/test_term_endpoint.cpp
View file @
87c22364
...
...
@@ -27,7 +27,9 @@ int main (void)
char
buf
[
buf_size
];
const
char
*
ep
=
"tcp://127.0.0.1:5560"
;
const
char
*
ep_wc_tcp
=
"tcp://127.0.0.1:*"
;
#if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS
const
char
*
ep_wc_ipc
=
"ipc://*"
;
#endif
// Create infrastructure.
void
*
ctx
=
zmq_ctx_new
();
...
...
@@ -110,20 +112,24 @@ int main (void)
assert
(
push
);
rc
=
zmq_bind
(
push
,
ep_wc_tcp
);
assert
(
rc
==
0
);
#if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS
pull
=
zmq_socket
(
ctx
,
ZMQ_PULL
);
assert
(
pull
);
rc
=
zmq_bind
(
pull
,
ep_wc_ipc
);
assert
(
rc
==
0
);
#endif
// Unbind sockets binded by wild-card address
rc
=
zmq_getsockopt
(
push
,
ZMQ_LAST_ENDPOINT
,
buf
,
(
size_t
*
)
&
buf_size
);
assert
(
rc
==
0
);
rc
=
zmq_unbind
(
push
,
buf
);
assert
(
rc
==
0
);
#if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS
rc
=
zmq_getsockopt
(
pull
,
ZMQ_LAST_ENDPOINT
,
buf
,
(
size_t
*
)
&
buf_size
);
assert
(
rc
==
0
);
rc
=
zmq_unbind
(
pull
,
buf
);
assert
(
rc
==
0
);
#endif
// Create infrastructure (wild-card binding)
ctx
=
zmq_ctx_new
();
...
...
@@ -132,16 +138,20 @@ int main (void)
assert
(
push
);
rc
=
zmq_bind
(
push
,
ep_wc_tcp
);
assert
(
rc
==
0
);
#if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS
pull
=
zmq_socket
(
ctx
,
ZMQ_PULL
);
assert
(
pull
);
rc
=
zmq_bind
(
pull
,
ep_wc_ipc
);
assert
(
rc
==
0
);
#endif
// Sockets binded by wild-card address can't be unbinded by wild-card address
rc
=
zmq_unbind
(
push
,
ep_wc_tcp
);
assert
(
rc
==
-
1
&&
zmq_errno
()
==
ENOENT
);
#if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS
rc
=
zmq_unbind
(
pull
,
ep_wc_ipc
);
assert
(
rc
==
-
1
&&
zmq_errno
()
==
ENOENT
);
#endif
return
0
;
}
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