mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-06 00:31:13 +01:00
Problem: VMCI might not be supported by CI
Solution: skip tests if zmq_bind fails with EAFNOSUPPORT
This commit is contained in:
parent
37c548d62b
commit
11f0802912
@ -43,7 +43,10 @@ void test_pair_vmci ()
|
|||||||
std::string endpoint = s.str ();
|
std::string endpoint = s.str ();
|
||||||
|
|
||||||
void *sb = test_context_socket (ZMQ_PAIR);
|
void *sb = test_context_socket (ZMQ_PAIR);
|
||||||
TEST_ASSERT_SUCCESS_ERRNO (zmq_bind (sb, endpoint.c_str ()));
|
int rc = zmq_bind (sb, endpoint.c_str ());
|
||||||
|
if (rc < 0 && errno == EAFNOSUPPORT)
|
||||||
|
TEST_IGNORE_MESSAGE ("VMCI not supported");
|
||||||
|
TEST_ASSERT_SUCCESS_ERRNO (rc);
|
||||||
|
|
||||||
void *sc = test_context_socket (ZMQ_PAIR);
|
void *sc = test_context_socket (ZMQ_PAIR);
|
||||||
TEST_ASSERT_SUCCESS_ERRNO (zmq_connect (sc, endpoint.c_str ()));
|
TEST_ASSERT_SUCCESS_ERRNO (zmq_connect (sc, endpoint.c_str ()));
|
||||||
|
@ -43,7 +43,10 @@ void test_reqrep_vmci ()
|
|||||||
std::string endpoint = s.str ();
|
std::string endpoint = s.str ();
|
||||||
|
|
||||||
void *sb = test_context_socket (ZMQ_DEALER);
|
void *sb = test_context_socket (ZMQ_DEALER);
|
||||||
TEST_ASSERT_SUCCESS_ERRNO (zmq_bind (sb, endpoint.c_str ()));
|
int rc = zmq_bind (sb, endpoint.c_str ());
|
||||||
|
if (rc < 0 && errno == EAFNOSUPPORT)
|
||||||
|
TEST_IGNORE_MESSAGE ("VMCI not supported");
|
||||||
|
TEST_ASSERT_SUCCESS_ERRNO (rc);
|
||||||
|
|
||||||
void *sc = test_context_socket (ZMQ_DEALER);
|
void *sc = test_context_socket (ZMQ_DEALER);
|
||||||
TEST_ASSERT_SUCCESS_ERRNO (zmq_connect (sc, endpoint.c_str ()));
|
TEST_ASSERT_SUCCESS_ERRNO (zmq_connect (sc, endpoint.c_str ()));
|
||||||
|
@ -115,7 +115,10 @@ void test_unbind_via_last_endpoint ()
|
|||||||
#endif
|
#endif
|
||||||
#if defined ZMQ_HAVE_VMCI
|
#if defined ZMQ_HAVE_VMCI
|
||||||
void *req = test_context_socket (ZMQ_REQ);
|
void *req = test_context_socket (ZMQ_REQ);
|
||||||
TEST_ASSERT_SUCCESS_ERRNO (zmq_bind (req, ep_wc_vmci));
|
int rc = zmq_bind (req, ep_wc_vmci);
|
||||||
|
if (rc < 0 && errno == EAFNOSUPPORT)
|
||||||
|
TEST_IGNORE_MESSAGE ("VMCI not supported");
|
||||||
|
TEST_ASSERT_SUCCESS_ERRNO (rc);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Unbind sockets binded by wild-card address
|
// Unbind sockets binded by wild-card address
|
||||||
@ -153,7 +156,10 @@ void test_wildcard_unbind_fails ()
|
|||||||
#endif
|
#endif
|
||||||
#if defined ZMQ_HAVE_VMCI
|
#if defined ZMQ_HAVE_VMCI
|
||||||
void *req = test_context_socket (ZMQ_REQ);
|
void *req = test_context_socket (ZMQ_REQ);
|
||||||
TEST_ASSERT_SUCCESS_ERRNO (zmq_bind (req, ep_wc_vmci));
|
int rc = zmq_bind (req, ep_wc_vmci);
|
||||||
|
if (rc < 0 && errno == EAFNOSUPPORT)
|
||||||
|
TEST_IGNORE_MESSAGE ("VMCI not supported");
|
||||||
|
TEST_ASSERT_SUCCESS_ERRNO (rc);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Sockets binded by wild-card address can't be unbinded by wild-card address
|
// Sockets binded by wild-card address can't be unbinded by wild-card address
|
||||||
|
Loading…
Reference in New Issue
Block a user