]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2692] Addressed comments
authorFrancis Dupont <fdupont@isc.org>
Mon, 18 Mar 2024 09:20:55 +0000 (10:20 +0100)
committerFrancis Dupont <fdupont@isc.org>
Wed, 20 Mar 2024 20:06:11 +0000 (21:06 +0100)
ChangeLog
src/bin/dhcp4/tests/callout_library_4.cc
src/bin/dhcp4/tests/hooks_unittest.cc
src/bin/dhcp6/tests/callout_library_4.cc
src/bin/dhcp6/tests/hooks_unittest.cc

index 26ce617fb8bdc3468aeeebbfb2ed54523526843f..4e51c5ce5cd7ffebb5585530a30bae99308ea59d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,9 @@
 2209.  [func]          fdupont
-       Some hooks using multi-threading postpone their start
-       routing at the end of configuration processing.
-       Now these routines can safely throw when they detect
-       a problem: a configuration error is reported.
+       Some hooks using multi-threading postpone their startup until
+       after the configuration has been completed.  If the hook
+       subsequently failed the startup, the error would not have been
+       properly propagated. The fix ensures that the errors are
+       reported during the configuration stage.
        (Gitlab #2692)
 
 Kea 2.5.6 (development) released on February 28, 2024
index ba0c3627c2cc7856530b667f66f134a9ab8bb6e9..f7b5869bfa3a61e8bf6cd8496475a8f452c2bdbe 100644 (file)
@@ -1,12 +1,14 @@
-// Copyright (C) 2018-2024 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2024 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 /// @file
-/// @brief Callout library for testing execution of the dhcp4_srv_configured
-/// hook point.
+/// @brief Callout library for testing the scenarios when a hook library
+/// posts some work to the IO service as a result of configuration.
+/// Using a callout that always throws we can ensure that the server polls
+/// this initial work before it starts working.
 ///
 static const int LIBRARY_NUMBER = 4;
 
index c0b086d467bebb3cf33e9db5642422e064ce92ac..0bcc70d2d5491e4164276e45dfc1f49b47ecf0be 100644 (file)
@@ -4040,7 +4040,7 @@ TEST_F(HooksDhcpv4SrvTest, lease4OfferDiscoverDecline) {
 }
 
 // Checks that postponed hook start service can fail.
-TEST_F(LoadUnloadDhcpv4SrvTest, StartServiceFail) {
+TEST_F(LoadUnloadDhcpv4SrvTest, startServiceFail) {
     boost::shared_ptr<ControlledDhcpv4Srv> srv(new ControlledDhcpv4Srv(0));
 
     // Ensure no marker files to start with.
index 802aacee557487bed974468caac80a2a239693ec..3036124c879f488ff481036bb0380d86fe1adcc7 100644 (file)
@@ -1,12 +1,14 @@
-// Copyright (C) 2018-2024 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2024 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 /// @file
-/// @brief Callout library for testing execution of the dhcp6_srv_configured
-/// hook point.
+/// @brief Callout library for testing the scenarios when a hook library
+/// posts some work to the IO service as a result of configuration.
+/// Using a callout that always throws we can ensure that the server polls
+/// this initial work before it starts working.
 ///
 static const int LIBRARY_NUMBER = 4;
 
index 7013dc8aaa1852ded7a901d783aab68e33751a16..7b4d0b5f8b5c67d6480ec0781c1a991eea65e321 100644 (file)
@@ -5834,7 +5834,7 @@ TEST_F(HooksDhcpv6SrvTest, leases6ParkedPacketLimit) {
 }
 
 // Checks that postponed hook start service can fail.
-TEST_F(LoadUnloadDhcpv6SrvTest, StartServiceFail) {
+TEST_F(LoadUnloadDhcpv6SrvTest, startServiceFail) {
     boost::shared_ptr<ControlledDhcpv6Srv> srv(new ControlledDhcpv6Srv(0));
 
     // Ensure no marker files to start with.