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
2d025979
Unverified
Commit
2d025979
authored
Jan 14, 2019
by
Simon Giesecke
Committed by
GitHub
Jan 14, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3359 from bluca/tests_race_conditions
Problem: test_rebind_ipc still fails
parents
ac958397
d5595657
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
test_rebind_ipc.cpp
tests/test_rebind_ipc.cpp
+15
-5
No files found.
tests/test_rebind_ipc.cpp
View file @
2d025979
...
...
@@ -44,15 +44,25 @@ void tearDown ()
void
test_rebind_ipc
()
{
char
my_endpoint
[
256
];
size_t
len
=
sizeof
(
my_endpoint
);
char
my_endpoint
[
32
],
random_file
[
16
];
strcpy
(
random_file
,
"tmpXXXXXX"
);
#ifdef HAVE_MKDTEMP
TEST_ASSERT_TRUE
(
mkdtemp
(
random_file
));
strcat
(
random_file
,
"/ipc"
);
#else
int
fd
=
mkstemp
(
random_file
);
TEST_ASSERT_TRUE
(
fd
!=
-
1
);
close
(
fd
);
#endif
strcpy
(
my_endpoint
,
"ipc://"
);
strcat
(
my_endpoint
,
random_file
);
void
*
sb0
=
test_context_socket
(
ZMQ_PUSH
);
void
*
sb1
=
test_context_socket
(
ZMQ_PUSH
);
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_bind
(
sb0
,
"ipc://*"
));
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_getsockopt
(
sb0
,
ZMQ_LAST_ENDPOINT
,
my_endpoint
,
&
len
));
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_bind
(
sb0
,
my_endpoint
));
void
*
sc
=
test_context_socket
(
ZMQ_PULL
);
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