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
2e646486
Unverified
Commit
2e646486
authored
Mar 02, 2019
by
Doron Somech
Committed by
GitHub
Mar 02, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3438 from sigiesec/fix-appveyor-test-execution
Fix appveyor test execution
parents
995e0a3a
028aecc6
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
34 additions
and
10 deletions
+34
-10
appveyor.yml
appveyor.yml
+8
-2
ZMQSourceRunChecks.cmake
builds/cmake/Modules/ZMQSourceRunChecks.cmake
+1
-1
norm_engine.hpp
src/norm_engine.hpp
+2
-2
pipe.cpp
src/pipe.cpp
+2
-2
select.cpp
src/select.cpp
+1
-1
test_hwm.cpp
tests/test_hwm.cpp
+4
-0
test_sockopt_hwm.cpp
tests/test_sockopt_hwm.cpp
+4
-0
test_xpub_nodrop.cpp
tests/test_xpub_nodrop.cpp
+12
-2
No files found.
appveyor.yml
View file @
2e646486
...
...
@@ -36,14 +36,17 @@ environment:
API_POLLER
:
poll
WITH_LIBSODIUM
:
ON
ENABLE_CURVE
:
ON
TEST_OPTIONS
:
'
-E
"(test_many_sockets)"'
-
platform
:
Win32
configuration
:
Debug
WITH_LIBSODIUM
:
ON
ENABLE_CURVE
:
ON
TEST_OPTIONS
:
'
-E
"(test_spec_router|test_spec_pushpull|test_metadata|test_security_curve|test_dgram)"'
-
platform
:
x64
configuration
:
Debug
WITH_LIBSODIUM
:
ON
ENABLE_CURVE
:
ON
TEST_OPTIONS
:
'
-E
"(test_spec_router|test_spec_pushpull|test_metadata|test_security_curve|test_dgram)"'
-
platform
:
Win32
configuration
:
Release
WITH_LIBSODIUM
:
OFF
...
...
@@ -65,6 +68,7 @@ environment:
CMAKE_GENERATOR
:
"
Visual
Studio
15
2017"
MSVCVERSION
:
"
v141"
MSVCYEAR
:
"
vs2017"
TEST_OPTIONS
:
'
-E
"(test_many_sockets)"'
-
platform
:
cygwin64
WITH_LIBSODIUM
:
OFF
ENABLE_CURVE
:
ON
...
...
@@ -132,7 +136,8 @@ before_build:
-
cmd
:
if "%PLATFORM%" == "Win32" set EXTRA_FLAGS='-D CMAKE_C_FLAGS_RELEASE="/MT" -D CMAKE_C_FLAGS_DEBUG="/MTd"'
-
cmd
:
if "%PLATFORM%" == "x64" set EXTRA_FLAGS='-D CMAKE_C_FLAGS_RELEASE="/MT" -D CMAKE_C_FLAGS_DEBUG="/MTd"'
-
cmd
:
if "%PLATFORM%" == "cygwin64" set APPVEYOR_BUILD_FOLDER=/cygdrive/C/projects/libzmq
-
cmd
:
cmake -D CMAKE_INCLUDE_PATH="%SODIUM_INCLUDE_DIR%" -D CMAKE_LIBRARY_PATH="%SODIUM_LIBRARY_DIR%" -D WITH_LIBSODIUM="%WITH_LIBSODIUM%" -D ENABLE_DRAFTS="%ENABLE_DRAFTS%" -D ENABLE_ANALYSIS="%ENABLE_ANALYSIS%" -D ENABLE_CURVE="%ENABLE_CURVE%" -D API_POLLER="%API_POLLER%" -D POLLER="%POLLER%" %EXTRA_FLAGS% -D WITH_LIBSODIUM="%WITH_LIBSODIUM%" -D LIBZMQ_WERROR="ON" -G "%CMAKE_GENERATOR%" "%APPVEYOR_BUILD_FOLDER%"
-
cmd
:
if "%ENABLE_ANALYSIS%"=="ON" ( set LIBZMQ_WERROR="OFF" ) else ( set LIBZMQ_WERROR="ON" )
-
cmd
:
cmake -D CMAKE_INCLUDE_PATH="%SODIUM_INCLUDE_DIR%" -D CMAKE_LIBRARY_PATH="%SODIUM_LIBRARY_DIR%" -D WITH_LIBSODIUM="%WITH_LIBSODIUM%" -D ENABLE_DRAFTS="%ENABLE_DRAFTS%" -D ENABLE_ANALYSIS="%ENABLE_ANALYSIS%" -D ENABLE_CURVE="%ENABLE_CURVE%" -D API_POLLER="%API_POLLER%" -D POLLER="%POLLER%" %EXTRA_FLAGS% -D WITH_LIBSODIUM="%WITH_LIBSODIUM%" -D LIBZMQ_WERROR="%LIBZMQ_WERROR%" -G "%CMAKE_GENERATOR%" "%APPVEYOR_BUILD_FOLDER%"
-
cmd
:
cd "%LIBZMQ_SRCDIR%"
build_script
:
...
...
@@ -188,9 +193,10 @@ test_script:
-
cmd
:
if "%CMAKE_GENERATOR%"=="Visual Studio 14 2015" set PARALLELIZE=ON
-
cmd
:
if "%CMAKE_GENERATOR%"=="Visual Studio 12 2013 Win64" set PARALLELIZE=ON
-
cmd
:
if "%CMAKE_GENERATOR%"=="Visual Studio 14 2015 Win64" set PARALLELIZE=ON
-
cmd
:
if not defined TEST_OPTIONS set "TEST_OPTIONS= "
-
cmd
:
if "%PARALLELIZE%"=="ON" (
echo "Running tests in parallel" &&
set TEST_OPTIONS=-j5
set TEST_OPTIONS=
%TEST_OPTIONS%
-j5
)
-
cmd
:
ctest -C "%Configuration%" -V %TEST_OPTIONS%
...
...
builds/cmake/Modules/ZMQSourceRunChecks.cmake
View file @
2e646486
...
...
@@ -42,7 +42,7 @@ macro(zmq_check_o_cloexec)
int main(int argc, char *argv [])
{
int s = open (
\"
/dev/null
\"
, O_CLOEXEC | O_RDONLY);
return
(s == -1)
;
return
s == -1
;
}
"
ZMQ_HAVE_O_CLOEXEC
)
...
...
src/norm_engine.hpp
View file @
2e646486
...
...
@@ -87,7 +87,7 @@ class norm_engine_t : public io_object_t, public i_engine
// These are used to feed data to decoder
// and its underlying "msg" buffer
char
*
AccessBuffer
()
{
return
(
char
*
)
(
buffer_ptr
+
buffer_count
);
}
size_t
GetBytesNeeded
()
const
{
return
(
buffer_size
-
buffer_count
)
;
}
size_t
GetBytesNeeded
()
const
{
return
buffer_size
-
buffer_count
;
}
void
IncrementBufferCount
(
size_t
count
)
{
buffer_count
+=
count
;
}
msg_t
*
AccessMsg
()
{
return
zmq_decoder
->
msg
();
}
// This invokes the decoder "decode" method
...
...
@@ -106,7 +106,7 @@ class norm_engine_t : public io_object_t, public i_engine
void
Append
(
NormRxStreamState
&
item
);
void
Remove
(
NormRxStreamState
&
item
);
bool
IsEmpty
()
const
{
return
(
NULL
==
head
)
;
}
bool
IsEmpty
()
const
{
return
NULL
==
head
;
}
void
Destroy
();
...
...
src/pipe.cpp
View file @
2e646486
...
...
@@ -546,7 +546,7 @@ bool zmq::pipe_t::check_hwm () const
{
const
bool
full
=
_hwm
>
0
&&
_msgs_written
-
_peers_msgs_read
>=
uint64_t
(
_hwm
);
return
(
!
full
)
;
return
!
full
;
}
void
zmq
::
pipe_t
::
send_hwms_to_peer
(
int
inhwm_
,
int
outhwm_
)
...
...
@@ -556,7 +556,7 @@ void zmq::pipe_t::send_hwms_to_peer (int inhwm_, int outhwm_)
void
zmq
::
pipe_t
::
set_endpoint_pair
(
zmq
::
endpoint_uri_pair_t
endpoint_pair_
)
{
_endpoint_pair
=
endpoint_pair_
;
_endpoint_pair
=
ZMQ_MOVE
(
endpoint_pair_
)
;
}
const
zmq
::
endpoint_uri_pair_t
&
zmq
::
pipe_t
::
get_endpoint_pair
()
const
...
...
src/select.cpp
View file @
2e646486
...
...
@@ -542,7 +542,7 @@ void zmq::select_t::cleanup_retired ()
bool
zmq
::
select_t
::
is_retired_fd
(
const
fd_entry_t
&
entry_
)
{
return
(
entry_
.
fd
==
retired_fd
)
;
return
entry_
.
fd
==
retired_fd
;
}
zmq
::
select_t
::
family_entry_t
::
family_entry_t
()
:
has_retired
(
false
)
...
...
tests/test_hwm.cpp
View file @
2e646486
...
...
@@ -99,6 +99,10 @@ int count_msg (int send_hwm_, int recv_hwm_, TestType test_type_)
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_setsockopt
(
connect_socket
,
ZMQ_SNDHWM
,
&
send_hwm_
,
sizeof
(
send_hwm_
)));
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_connect
(
connect_socket
,
"inproc://a"
));
// we must wait for the connect to succeed here, unfortunately we don't
// have monitoring events for inproc, so we just hope SETTLE_TIME suffices
msleep
(
SETTLE_TIME
);
}
else
{
// Set up connect socket
connect_socket
=
test_context_socket
(
ZMQ_PUSH
);
...
...
tests/test_sockopt_hwm.cpp
View file @
2e646486
...
...
@@ -152,6 +152,10 @@ void test_decrease_when_full ()
zmq_bind
(
bind_socket
,
"inproc://a"
);
zmq_connect
(
connect_socket
,
"inproc://a"
);
// we must wait for the connect to succeed here, unfortunately we don't
// have monitoring events for inproc, so we just hope SETTLE_TIME suffices
msleep
(
SETTLE_TIME
);
// Fill up to hwm
int
send_count
=
test_fill_up_to_hwm
(
bind_socket
,
sndhwm
);
...
...
tests/test_xpub_nodrop.cpp
View file @
2e646486
...
...
@@ -54,7 +54,6 @@ void test ()
int
wait
=
1
;
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_setsockopt
(
pub
,
ZMQ_XPUB_NODROP
,
&
wait
,
4
));
// Create a subscriber
void
*
sub
=
test_context_socket
(
ZMQ_SUB
);
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_connect
(
sub
,
"inproc://soname"
));
...
...
@@ -62,6 +61,11 @@ void test ()
// Subscribe for all messages.
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_setsockopt
(
sub
,
ZMQ_SUBSCRIBE
,
""
,
0
));
// we must wait for the subscription to be processed here, so we just
// hope SETTLE_TIME suffices; otherwise some or all published messages
// might be lost
msleep
(
SETTLE_TIME
);
int
hwmlimit
=
hwm
-
1
;
int
send_count
=
0
;
...
...
@@ -74,13 +78,19 @@ void test ()
int
recv_count
=
0
;
do
{
// Receive the message in the subscriber
int
rc
=
zmq_recv
(
sub
,
NULL
,
0
,
ZMQ_DONTWAIT
);
int
rc
=
zmq_recv
(
sub
,
NULL
,
0
,
0
);
if
(
rc
==
-
1
)
{
TEST_ASSERT_EQUAL_INT
(
EAGAIN
,
errno
);
break
;
}
else
{
TEST_ASSERT_EQUAL_INT
(
0
,
rc
);
recv_count
++
;
if
(
recv_count
==
1
)
{
const
int
sub_rcvtimeo
=
250
;
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_setsockopt
(
sub
,
ZMQ_RCVTIMEO
,
&
sub_rcvtimeo
,
sizeof
(
sub_rcvtimeo
)));
}
}
}
while
(
true
);
...
...
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