From: Razvan Becheriu Date: Thu, 17 Apr 2025 08:47:25 +0000 (+0300) Subject: [#3732] addressed review comments X-Git-Tag: Kea-2.7.8~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25ea568e12e7cbfe01bc7e2bab1379db6c73e77b;p=thirdparty%2Fkea.git [#3732] addressed review comments --- diff --git a/.dummy b/.dummy deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/bin/agent/tests/meson.build b/src/bin/agent/tests/meson.build index 43b814d413..7a4376bfd0 100644 --- a/src/bin/agent/tests/meson.build +++ b/src/bin/agent/tests/meson.build @@ -86,6 +86,8 @@ test( kea_agent_tests, depends: [callout, basic_auth], protocol: 'gtest', + is_parallel: false, + priority: -1, ) diff --git a/src/bin/dhcp4/tests/d2_unittest.cc b/src/bin/dhcp4/tests/d2_unittest.cc index c6f875ea2e..5570e8f50f 100644 --- a/src/bin/dhcp4/tests/d2_unittest.cc +++ b/src/bin/dhcp4/tests/d2_unittest.cc @@ -10,6 +10,7 @@ #include #include #include +#include #include @@ -298,11 +299,10 @@ TEST_F(Dhcp4SrvD2Test, simpleUDPSend) { // invoked as expected. Note that this unit test relies on an attempt to send // to a server address of 0.0.0.0 port 0 fails, which it does under all OSes // except Solaris 11 and macOS 15.0. -/// @todo Eventually we should find a way to test this under Solaris. -#if (!defined(OS_SOLARIS) && !defined(OS_OSX)) TEST_F(Dhcp4SrvD2Test, forceUDPSendFailure) { -#else -TEST_F(Dhcp4SrvD2Test, DISABLED_forceUDPSendFailure) { +#if (defined(OS_SOLARIS) || defined(OS_OSX)) + /// @todo Eventually we should find a way to test this under Solaris. + SKIP_IF(true); #endif // Grab the manager and verify that be default ddns is off // and a sender was not started. diff --git a/src/bin/dhcp6/tests/d2_unittest.cc b/src/bin/dhcp6/tests/d2_unittest.cc index c16ac1be86..9fd8274393 100644 --- a/src/bin/dhcp6/tests/d2_unittest.cc +++ b/src/bin/dhcp6/tests/d2_unittest.cc @@ -10,6 +10,7 @@ #include #include #include +#include #include @@ -302,11 +303,10 @@ TEST_F(Dhcp6SrvD2Test, simpleUDPSend) { // invoked as expected. Note that this unit test relies on an attempt to send // to a server address of 0.0.0.0 port 0 fails, which it does under all OSs // except Solaris 11 and macOS 15.0. -/// @todo Eventually we should find a way to test this under Solaris. -#if (!defined(OS_SOLARIS) && !defined(OS_OSX)) TEST_F(Dhcp6SrvD2Test, forceUDPSendFailure) { -#else -TEST_F(Dhcp6SrvD2Test, DISABLED_forceUDPSendFailure) { +#if (defined(OS_SOLARIS) || defined(OS_OSX)) + /// @todo Eventually we should find a way to test this under Solaris. + SKIP_IF(true); #endif // Grab the manager and verify that be default ddns is off // and a sender was not started. diff --git a/src/hooks/dhcp/mysql/tests/mysql_lease_mgr_unittest.cc b/src/hooks/dhcp/mysql/tests/mysql_lease_mgr_unittest.cc index ffa91a99b5..24591475f4 100644 --- a/src/hooks/dhcp/mysql/tests/mysql_lease_mgr_unittest.cc +++ b/src/hooks/dhcp/mysql/tests/mysql_lease_mgr_unittest.cc @@ -176,15 +176,9 @@ TEST(MySqlOpenTest, OpenDatabase) { MYSQL_VALID_TYPE, INVALID_NAME, VALID_HOST, VALID_USER, VALID_PASSWORD)), DbOpenError); -#ifndef OS_OSX - // Under MacOS, connecting with an invalid host can cause a TCP/IP socket - // to be orphaned and never closed. This can interfere with subsequent tests - // which attempt to locate and manipulate MySQL client socket descriptor. - // In the interests of progress, we'll just avoid this test. EXPECT_THROW(LeaseMgrFactory::create(connectionString( MYSQL_VALID_TYPE, VALID_NAME, INVALID_HOST, VALID_USER, VALID_PASSWORD)), DbOpenError); -#endif EXPECT_THROW(LeaseMgrFactory::create(connectionString( MYSQL_VALID_TYPE, VALID_NAME, VALID_HOST, INVALID_USER, VALID_PASSWORD)), diff --git a/src/lib/asiolink/tests/tcp_acceptor_unittest.cc b/src/lib/asiolink/tests/tcp_acceptor_unittest.cc index 12c9950e12..0689203539 100644 --- a/src/lib/asiolink/tests/tcp_acceptor_unittest.cc +++ b/src/lib/asiolink/tests/tcp_acceptor_unittest.cc @@ -5,19 +5,24 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. #include + #include #include #include #include #include #include +#include + +#include +#include +#include + #include #include + #include -#include -#include #include -#include using namespace isc::asiolink; namespace ph = std::placeholders; @@ -420,13 +425,12 @@ TEST_F(TCPAcceptorTest, getNative) { EXPECT_GE(acceptor_.getNative(), 0); } -// macOS 10.12.3 has a bug which causes the connections to not enter -// the TIME-WAIT state and they never get closed. -#if !defined (OS_OSX) // Test that TCPAcceptor::close works properly. TEST_F(TCPAcceptorTest, close) { -#else -TEST_F(TCPAcceptorTest, DISABLED_close) { +#if defined (OS_OSX) + // macOS 10.12.3 has a bug which causes the connections to not enter + // the TIME-WAIT state and they never get closed. + SKIP_IF(true); #endif // Initialize acceptor. acceptorOpen(); diff --git a/src/lib/asiolink/tests/tls_acceptor_unittest.cc b/src/lib/asiolink/tests/tls_acceptor_unittest.cc index f3b878bc9c..d69342dbe9 100644 --- a/src/lib/asiolink/tests/tls_acceptor_unittest.cc +++ b/src/lib/asiolink/tests/tls_acceptor_unittest.cc @@ -5,19 +5,24 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. #include + #include #include #include #include #include #include +#include + +#include +#include +#include + #include #include + #include -#include -#include #include -#include using namespace isc::asiolink; using namespace boost::asio; @@ -426,13 +431,12 @@ TEST_F(TLSAcceptorTest, getNative) { EXPECT_GE(acceptor_.getNative(), 0); } -// macOS 10.12.3 has a bug which causes the connections to not enter -// the TIME-WAIT state and they never get closed. -#if !defined (OS_OSX) // Test that TLSAcceptor::close works properly. TEST_F(TLSAcceptorTest, close) { -#else -TEST_F(TLSAcceptorTest, DISABLED_close) { +#if defined (OS_OSX) + // macOS 10.12.3 has a bug which causes the connections to not enter + // the TIME-WAIT state and they never get closed. + SKIP_IF(true); #endif // Initialize acceptor. acceptorOpen(); diff --git a/src/lib/dhcp_ddns/tests/meson.build b/src/lib/dhcp_ddns/tests/meson.build index 6b3d2bf06f..fa607edd76 100644 --- a/src/lib/dhcp_ddns/tests/meson.build +++ b/src/lib/dhcp_ddns/tests/meson.build @@ -12,4 +12,11 @@ kea_dhcp_ddns_tests = executable( include_directories: [include_directories('.')] + INCLUDES, link_with: [kea_testutils_lib, kea_util_unittests_lib] + LIBS_BUILT_SO_FAR, ) -test('kea-dhcp-ddns-tests', kea_dhcp_ddns_tests, protocol: 'gtest') +test( + 'kea-dhcp-ddns-tests', + kea_dhcp_ddns_tests, + protocol: 'gtest', + is_parallel: false, + priority: -1, + timeout: 60, +)