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
14508306
Commit
14508306
authored
Mar 23, 2019
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: unused include directives
Solution: remove and add where needed
parent
d0c4402d
Hide whitespace changes
Inline
Side-by-side
Showing
53 changed files
with
166 additions
and
33 deletions
+166
-33
ip_resolver.hpp
src/ip_resolver.hpp
+1
-0
CMakeLists.txt
tests/CMakeLists.txt
+3
-0
test_abstract_ipc.cpp
tests/test_abstract_ipc.cpp
+1
-0
test_app_meta.cpp
tests/test_app_meta.cpp
+1
-0
test_connect_rid.cpp
tests/test_connect_rid.cpp
+2
-0
test_ctx_options.cpp
tests/test_ctx_options.cpp
+1
-0
test_dgram.cpp
tests/test_dgram.cpp
+2
-0
test_disconnect_inproc.cpp
tests/test_disconnect_inproc.cpp
+2
-0
test_filter_ipc.cpp
tests/test_filter_ipc.cpp
+3
-0
test_fork.cpp
tests/test_fork.cpp
+4
-0
test_getsockopt_memset.cpp
tests/test_getsockopt_memset.cpp
+1
-0
test_heartbeats.cpp
tests/test_heartbeats.cpp
+3
-0
test_hwm_pubsub.cpp
tests/test_hwm_pubsub.cpp
+2
-0
test_iov.cpp
tests/test_iov.cpp
+2
-0
test_metadata.cpp
tests/test_metadata.cpp
+1
-0
test_mock_pub_sub.cpp
tests/test_mock_pub_sub.cpp
+3
-0
test_monitor.cpp
tests/test_monitor.cpp
+3
-0
test_msg_ffn.cpp
tests/test_msg_ffn.cpp
+2
-0
test_pair_tcp.cpp
tests/test_pair_tcp.cpp
+2
-0
test_poller.cpp
tests/test_poller.cpp
+7
-0
test_proxy.cpp
tests/test_proxy.cpp
+3
-0
test_proxy_hwm.cpp
tests/test_proxy_hwm.cpp
+2
-0
test_proxy_single_socket.cpp
tests/test_proxy_single_socket.cpp
+2
-0
test_proxy_terminate.cpp
tests/test_proxy_terminate.cpp
+2
-0
test_pub_invert_matching.cpp
tests/test_pub_invert_matching.cpp
+2
-0
test_radio_dish.cpp
tests/test_radio_dish.cpp
+9
-0
test_reqrep_ipc.cpp
tests/test_reqrep_ipc.cpp
+1
-0
test_reqrep_tcp.cpp
tests/test_reqrep_tcp.cpp
+2
-0
test_router_mandatory.cpp
tests/test_router_mandatory.cpp
+1
-0
test_router_notify.cpp
tests/test_router_notify.cpp
+1
-0
test_security_gssapi.cpp
tests/test_security_gssapi.cpp
+3
-0
test_security_null.cpp
tests/test_security_null.cpp
+2
-0
test_security_plain.cpp
tests/test_security_plain.cpp
+3
-0
test_setsockopt.cpp
tests/test_setsockopt.cpp
+2
-0
test_shutdown_stress_tipc.cpp
tests/test_shutdown_stress_tipc.cpp
+2
-0
test_spec_pushpull.cpp
tests/test_spec_pushpull.cpp
+3
-0
test_spec_rep.cpp
tests/test_spec_rep.cpp
+1
-0
test_spec_router.cpp
tests/test_spec_router.cpp
+2
-0
test_srcfd.cpp
tests/test_srcfd.cpp
+1
-0
test_stream.cpp
tests/test_stream.cpp
+2
-0
test_stream_disconnect.cpp
tests/test_stream_disconnect.cpp
+2
-0
test_stream_exceeds_buffer.cpp
tests/test_stream_exceeds_buffer.cpp
+8
-0
test_stream_timeout.cpp
tests/test_stream_timeout.cpp
+3
-0
test_unbind_wildcard.cpp
tests/test_unbind_wildcard.cpp
+2
-0
test_use_fd.cpp
tests/test_use_fd.cpp
+4
-0
test_zmq_poll_fd.cpp
tests/test_zmq_poll_fd.cpp
+5
-0
testutil.cpp
tests/testutil.cpp
+30
-0
testutil.hpp
tests/testutil.hpp
+0
-33
testutil_monitoring.cpp
tests/testutil_monitoring.cpp
+3
-0
testutil_security.cpp
tests/testutil_security.cpp
+3
-0
testutil_unity.cpp
tests/testutil_unity.cpp
+7
-0
unittest_ip_resolver.cpp
unittests/unittest_ip_resolver.cpp
+6
-0
unittest_resolver_common.hpp
unittests/unittest_resolver_common.hpp
+1
-0
No files found.
src/ip_resolver.hpp
View file @
14508306
...
...
@@ -33,6 +33,7 @@
#if !defined ZMQ_HAVE_WINDOWS
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#endif
#include "address.hpp"
...
...
tests/CMakeLists.txt
View file @
14508306
...
...
@@ -209,6 +209,9 @@ endif()
# add include dirs for all targets
include_directories
(
"
${
ZeroMQ_SOURCE_DIR
}
/../include"
"
${
ZeroMQ_BINARY_DIR
}
"
)
if
(
WIN32
)
add_definitions
(
-D_CRT_NONSTDC_NO_DEPRECATE
)
endif
()
foreach
(
test
${
tests
}
)
# target_sources not supported before CMake 3.1
...
...
tests/test_abstract_ipc.cpp
View file @
14508306
...
...
@@ -30,6 +30,7 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <string.h>
#include <unity.h>
void
setUp
()
...
...
tests/test_app_meta.cpp
View file @
14508306
...
...
@@ -31,6 +31,7 @@
#include "testutil_unity.hpp"
#include <unity.h>
#include <string.h>
void
setUp
()
{
...
...
tests/test_connect_rid.cpp
View file @
14508306
...
...
@@ -30,6 +30,8 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <string.h>
void
setUp
()
{
setup_test_context
();
...
...
tests/test_ctx_options.cpp
View file @
14508306
...
...
@@ -47,6 +47,7 @@ void tearDown ()
#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h> // for sleep()
#include <sched.h>
#define TEST_POLICY \
(SCHED_OTHER) // NOTE: SCHED_OTHER is the default Linux scheduler
...
...
tests/test_dgram.cpp
View file @
14508306
...
...
@@ -30,6 +30,8 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <stdlib.h>
#include <string.h>
#include <unity.h>
void
setUp
()
...
...
tests/test_disconnect_inproc.cpp
View file @
14508306
...
...
@@ -30,6 +30,8 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <string.h>
void
setUp
()
{
setup_test_context
();
...
...
tests/test_filter_ipc.cpp
View file @
14508306
...
...
@@ -30,6 +30,9 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <unistd.h>
#include <grp.h>
void
setUp
()
{
setup_test_context
();
...
...
tests/test_fork.cpp
View file @
14508306
...
...
@@ -32,6 +32,10 @@
#include <assert.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/wait.h>
void
setUp
()
{
setup_test_context
();
...
...
tests/test_getsockopt_memset.cpp
View file @
14508306
...
...
@@ -25,6 +25,7 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <string.h>
void
setUp
()
{
setup_test_context
();
...
...
tests/test_heartbeats.cpp
View file @
14508306
...
...
@@ -26,10 +26,13 @@
typedef
SOCKET
raw_socket
;
#else
#include <arpa/inet.h>
#include <unistd.h>
typedef
int
raw_socket
;
#endif
#include <limits.h>
#include <stdlib.h>
#include <string.h>
// TODO remove this here, either ensure that UINT16_MAX is always properly
// defined or handle this at a more central location
...
...
tests/test_hwm_pubsub.cpp
View file @
14508306
...
...
@@ -30,6 +30,8 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <string.h>
// NOTE: on OSX the endpoint returned by ZMQ_LAST_ENDPOINT may be quite long,
// ensure we have extra space for that:
#define SOCKET_STRING_LEN (MAX_SOCKET_STRING * 4)
...
...
tests/test_iov.cpp
View file @
14508306
...
...
@@ -30,6 +30,8 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <stdlib.h>
#include <string.h>
#include <unity.h>
void
setUp
()
...
...
tests/test_metadata.cpp
View file @
14508306
...
...
@@ -30,6 +30,7 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <stdlib.h>
#include <unity.h>
void
setUp
()
...
...
tests/test_mock_pub_sub.cpp
View file @
14508306
...
...
@@ -27,9 +27,12 @@
typedef
SOCKET
raw_socket
;
#else
#include <arpa/inet.h>
#include <unistd.h>
typedef
int
raw_socket
;
#endif
#include <stdlib.h>
#include <string.h>
void
setUp
()
{
...
...
tests/test_monitor.cpp
View file @
14508306
...
...
@@ -32,6 +32,9 @@
#include "testutil_unity.hpp"
#include <stdlib.h>
#include <string.h>
void
setUp
()
{
setup_test_context
();
...
...
tests/test_msg_ffn.cpp
View file @
14508306
...
...
@@ -30,6 +30,8 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <string.h>
void
setUp
()
{
setup_test_context
();
...
...
tests/test_pair_tcp.cpp
View file @
14508306
...
...
@@ -30,6 +30,8 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <string.h>
void
setUp
()
{
setup_test_context
();
...
...
tests/test_poller.cpp
View file @
14508306
...
...
@@ -33,6 +33,13 @@
#include <unity.h>
#include <limits.h>
#ifndef _WIN32
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#endif
void
setUp
()
{
setup_test_context
();
...
...
tests/test_proxy.cpp
View file @
14508306
...
...
@@ -30,6 +30,9 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <stdlib.h>
#include <string.h>
void
setUp
()
{
setup_test_context
();
...
...
tests/test_proxy_hwm.cpp
View file @
14508306
...
...
@@ -29,8 +29,10 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <string.h>
#include <unity.h>
#include <assert.h>
#include <unistd.h>
//
// Asynchronous proxy test using ZMQ_XPUB_NODROP and HWM:
...
...
tests/test_proxy_single_socket.cpp
View file @
14508306
...
...
@@ -30,6 +30,8 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <stdlib.h>
void
setUp
()
{
setup_test_context
();
...
...
tests/test_proxy_terminate.cpp
View file @
14508306
...
...
@@ -30,6 +30,8 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <stdlib.h>
void
setUp
()
{
setup_test_context
();
...
...
tests/test_pub_invert_matching.cpp
View file @
14508306
...
...
@@ -30,6 +30,8 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <string.h>
void
setUp
()
{
setup_test_context
();
...
...
tests/test_radio_dish.cpp
View file @
14508306
...
...
@@ -32,6 +32,15 @@
#include <unity.h>
#include <string.h>
#ifndef _WIN32
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#endif
// Helper macro to define the v4/v6 function pairs
#define MAKE_TEST_V4V6(_test) \
static void _test##_ipv4 () { _test (false); } \
...
...
tests/test_reqrep_ipc.cpp
View file @
14508306
...
...
@@ -30,6 +30,7 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <stdlib.h>
#include <unity.h>
void
setUp
()
...
...
tests/test_reqrep_tcp.cpp
View file @
14508306
...
...
@@ -30,6 +30,8 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <string.h>
void
setUp
()
{
setup_test_context
();
...
...
tests/test_router_mandatory.cpp
View file @
14508306
...
...
@@ -30,6 +30,7 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <string.h>
#include <unity.h>
void
setUp
()
...
...
tests/test_router_notify.cpp
View file @
14508306
...
...
@@ -30,6 +30,7 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <string.h>
#include <unity.h>
void
setUp
()
...
...
tests/test_security_gssapi.cpp
View file @
14508306
...
...
@@ -41,6 +41,9 @@
#include <unistd.h>
#endif
#include <stdlib.h>
#include <string.h>
// This test requires a KRB5 environment with the following
// service principal (substitute your host.domain and REALM):
//
...
...
tests/test_security_null.cpp
View file @
14508306
...
...
@@ -42,6 +42,8 @@
#include <unistd.h>
#endif
#include <stdlib.h>
static
void
zap_handler
(
void
*
handler_
)
{
// Process ZAP requests forever
...
...
tests/test_security_plain.cpp
View file @
14508306
...
...
@@ -42,6 +42,9 @@
#include <unistd.h>
#endif
#include <stdlib.h>
#include <string.h>
static
void
zap_handler
(
void
*
zap_
)
{
// Process ZAP requests forever
...
...
tests/test_setsockopt.cpp
View file @
14508306
...
...
@@ -30,6 +30,8 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <string.h>
void
setUp
()
{
setup_test_context
();
...
...
tests/test_shutdown_stress_tipc.cpp
View file @
14508306
...
...
@@ -30,6 +30,8 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <pthread.h>
void
setUp
()
{
}
...
...
tests/test_spec_pushpull.cpp
View file @
14508306
...
...
@@ -30,6 +30,9 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <stdlib.h>
#include <string.h>
void
setUp
()
{
setup_test_context
();
...
...
tests/test_spec_rep.cpp
View file @
14508306
...
...
@@ -30,6 +30,7 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <stdlib.h>
#include <unity.h>
void
setUp
()
...
...
tests/test_spec_router.cpp
View file @
14508306
...
...
@@ -30,6 +30,8 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <stdlib.h>
#include <string.h>
#include <unity.h>
void
setUp
()
...
...
tests/test_srcfd.cpp
View file @
14508306
...
...
@@ -30,6 +30,7 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <string.h>
#include <unity.h>
void
setUp
()
...
...
tests/test_stream.cpp
View file @
14508306
...
...
@@ -30,6 +30,8 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <string.h>
void
setUp
()
{
setup_test_context
();
...
...
tests/test_stream_disconnect.cpp
View file @
14508306
...
...
@@ -30,6 +30,8 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <string.h>
void
setUp
()
{
setup_test_context
();
...
...
tests/test_stream_exceeds_buffer.cpp
View file @
14508306
...
...
@@ -30,6 +30,14 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <string.h>
#ifndef _WIN32
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#endif
void
setUp
()
{
setup_test_context
();
...
...
tests/test_stream_timeout.cpp
View file @
14508306
...
...
@@ -30,6 +30,9 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <stdlib.h>
#include <string.h>
void
setUp
()
{
setup_test_context
();
...
...
tests/test_unbind_wildcard.cpp
View file @
14508306
...
...
@@ -20,6 +20,8 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <string.h>
void
setUp
()
{
setup_test_context
();
...
...
tests/test_use_fd.cpp
View file @
14508306
...
...
@@ -30,7 +30,10 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <stdlib.h>
#include <string.h>
#include <unity.h>
#include <unistd.h>
void
setUp
()
{
...
...
@@ -47,6 +50,7 @@ void tearDown ()
#include <sys/socket.h>
#include <sys/un.h>
#include <netdb.h>
#include <unistd.h>
int
setup_socket_and_set_fd
(
void
*
zmq_socket_
,
int
af_
,
...
...
tests/test_zmq_poll_fd.cpp
View file @
14508306
...
...
@@ -31,8 +31,13 @@
#include "testutil_unity.hpp"
#include <netdb.h>
#include <string.h>
#include <unity.h>
#ifndef _WIN32
#include <unistd.h>
#endif
void
setUp
()
{
setup_test_context
();
...
...
tests/testutil.cpp
View file @
14508306
...
...
@@ -29,8 +29,38 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <stdarg.h>
#include <string.h>
#if defined _WIN32
#include "../src/windows.hpp"
#if defined _MSC_VER
#include <crtdbg.h>
#pragma warning(disable : 4996)
// iphlpapi is needed for if_nametoindex (not on Windows XP)
#if !defined ZMQ_HAVE_WINDOWS_TARGET_XP
#pragma comment(lib, "iphlpapi")
#endif
#endif
#else
#include <pthread.h>
#include <unistd.h>
#include <signal.h>
#include <stdlib.h>
#include <grp.h>
#include <sys/wait.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <net/if.h>
#include <netdb.h>
#if defined(ZMQ_HAVE_AIX)
#include <sys/types.h>
#include <sys/socketvar.h>
#endif
#endif
const
char
*
SEQ_END
=
(
const
char
*
)
1
;
const
char
bounce_content
[]
=
"12345678ABCDEFGH12345678abcdefgh"
;
...
...
tests/testutil.hpp
View file @
14508306
...
...
@@ -58,39 +58,6 @@
#define PORT_6 5561
#undef NDEBUG
#include <time.h>
#include <stdarg.h>
#include <string>
#include <string.h>
#if defined _WIN32
#include "../src/windows.hpp"
#if defined _MSC_VER
#include <crtdbg.h>
#pragma warning(disable : 4996)
// iphlpapi is needed for if_nametoindex (not on Windows XP)
#if !defined ZMQ_HAVE_WINDOWS_TARGET_XP
#pragma comment(lib, "iphlpapi")
#endif
#endif
#else
#include <pthread.h>
#include <unistd.h>
#include <signal.h>
#include <stdlib.h>
#include <grp.h>
#include <sys/wait.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <net/if.h>
#include <netdb.h>
#if defined(ZMQ_HAVE_AIX)
#include <sys/types.h>
#include <sys/socketvar.h>
#endif
#endif
// duplicated from fd.hpp
#ifdef ZMQ_HAVE_WINDOWS
...
...
tests/testutil_monitoring.cpp
View file @
14508306
...
...
@@ -29,6 +29,9 @@
#include "testutil_monitoring.hpp"
#include "testutil_unity.hpp"
#include <stdlib.h>
#include <string.h>
// Read one event off the monitor socket; return value and address
// by reference, if not null, and event number by value. Returns -1
// in case of error.
...
...
tests/testutil_security.cpp
View file @
14508306
...
...
@@ -28,6 +28,9 @@
*/
#include "testutil_security.hpp"
#include <stdlib.h>
#include <string.h>
const
char
*
test_zap_domain
=
"ZAPTEST"
;
void
socket_config_null_client
(
void
*
server_
,
void
*
server_secret_
)
...
...
tests/testutil_unity.cpp
View file @
14508306
...
...
@@ -28,6 +28,13 @@
*/
#include "testutil_unity.hpp"
#include <stdlib.h>
#include <string.h>
#ifndef _WIN32
#include <unistd.h>
#endif
int
test_assert_success_message_errno_helper
(
int
rc_
,
const
char
*
msg_
,
const
char
*
expr_
)
...
...
unittests/unittest_ip_resolver.cpp
View file @
14508306
...
...
@@ -25,6 +25,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <ip_resolver.hpp>
#include <ip.hpp>
#ifndef _WIN32
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#endif
void
setUp
()
{
}
...
...
unittests/unittest_resolver_common.hpp
View file @
14508306
...
...
@@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define __UNITTEST_RESOLVER_COMMON_INCLUDED__
#include <ip_resolver.hpp>
#include <string.h>
// Attempt a resolution and test the results.
//
...
...
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