From 47d0ecf63966a3fb17165e4f2612df67bb3bf714 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Thu, 12 Jan 2023 00:36:35 +0000 Subject: [PATCH] Problem: missing VMCI can also return EPROTONOSUPPORT and the tests fail Solution: ignore that too --- tests/test_pair_vmci.cpp | 4 ++-- tests/test_reqrep_vmci.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_pair_vmci.cpp b/tests/test_pair_vmci.cpp index 87150ed9..42fd09e3 100644 --- a/tests/test_pair_vmci.cpp +++ b/tests/test_pair_vmci.cpp @@ -44,14 +44,14 @@ void test_pair_vmci () void *sb = test_context_socket (ZMQ_PAIR); int rc = zmq_bind (sb, endpoint.c_str ()); - if (rc < 0 && errno == EAFNOSUPPORT) + if (rc < 0 && (errno == EAFNOSUPPORT || errno == EPROTONOSUPPORT)) TEST_IGNORE_MESSAGE ("VMCI not supported"); TEST_ASSERT_SUCCESS_ERRNO (rc); void *sc = test_context_socket (ZMQ_PAIR); TEST_ASSERT_SUCCESS_ERRNO (zmq_connect (sc, endpoint.c_str ())); - expect_bounce_fail (sb, sc); + bounce (sb, sc); test_context_socket_close_zero_linger (sc); test_context_socket_close_zero_linger (sb); diff --git a/tests/test_reqrep_vmci.cpp b/tests/test_reqrep_vmci.cpp index f93b9102..6382e9ef 100644 --- a/tests/test_reqrep_vmci.cpp +++ b/tests/test_reqrep_vmci.cpp @@ -44,14 +44,14 @@ void test_reqrep_vmci () void *sb = test_context_socket (ZMQ_DEALER); int rc = zmq_bind (sb, endpoint.c_str ()); - if (rc < 0 && errno == EAFNOSUPPORT) + if (rc < 0 && (errno == EAFNOSUPPORT || errno == EPROTONOSUPPORT)) TEST_IGNORE_MESSAGE ("VMCI not supported"); TEST_ASSERT_SUCCESS_ERRNO (rc); void *sc = test_context_socket (ZMQ_DEALER); TEST_ASSERT_SUCCESS_ERRNO (zmq_connect (sc, endpoint.c_str ())); - expect_bounce_fail (sb, sc); + bounce (sb, sc); test_context_socket_close_zero_linger (sc); test_context_socket_close_zero_linger (sb);