Skip to content

Commit 70daa9a

Browse files
committed
[#2692] Addressed comments
1 parent d855968 commit 70daa9a

File tree

5 files changed

+17
-12
lines changed

5 files changed

+17
-12
lines changed

ChangeLog

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
2209. [func] fdupont
2-
Some hooks using multi-threading postpone their start
3-
routing at the end of configuration processing.
4-
Now these routines can safely throw when they detect
5-
a problem: a configuration error is reported.
2+
Some hooks using multi-threading postpone their startup until
3+
after the configuration has been completed. If the hook
4+
subsequently failed the startup, the error would not have been
5+
properly propagated. The fix ensures that the errors are
6+
reported during the configuration stage.
67
(Gitlab #2692)
78

89
Kea 2.5.6 (development) released on February 28, 2024

src/bin/dhcp4/tests/callout_library_4.cc

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
// Copyright (C) 2018-2024 Internet Systems Consortium, Inc. ("ISC")
1+
// Copyright (C) 2024 Internet Systems Consortium, Inc. ("ISC")
22
//
33
// This Source Code Form is subject to the terms of the Mozilla Public
44
// License, v. 2.0. If a copy of the MPL was not distributed with this
55
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
66

77
/// @file
8-
/// @brief Callout library for testing execution of the dhcp4_srv_configured
9-
/// hook point.
8+
/// @brief Callout library for testing the scenarios when a hook library
9+
/// posts some work to the IO service as a result of configuration.
10+
/// Using a callout that always throws we can ensure that the server polls
11+
/// this initial work before it starts working.
1012
///
1113
static const int LIBRARY_NUMBER = 4;
1214

src/bin/dhcp4/tests/hooks_unittest.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -4040,7 +4040,7 @@ TEST_F(HooksDhcpv4SrvTest, lease4OfferDiscoverDecline) {
40404040
}
40414041

40424042
// Checks that postponed hook start service can fail.
4043-
TEST_F(LoadUnloadDhcpv4SrvTest, StartServiceFail) {
4043+
TEST_F(LoadUnloadDhcpv4SrvTest, startServiceFail) {
40444044
boost::shared_ptr<ControlledDhcpv4Srv> srv(new ControlledDhcpv4Srv(0));
40454045

40464046
// Ensure no marker files to start with.

src/bin/dhcp6/tests/callout_library_4.cc

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
// Copyright (C) 2018-2024 Internet Systems Consortium, Inc. ("ISC")
1+
// Copyright (C) 2024 Internet Systems Consortium, Inc. ("ISC")
22
//
33
// This Source Code Form is subject to the terms of the Mozilla Public
44
// License, v. 2.0. If a copy of the MPL was not distributed with this
55
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
66

77
/// @file
8-
/// @brief Callout library for testing execution of the dhcp6_srv_configured
9-
/// hook point.
8+
/// @brief Callout library for testing the scenarios when a hook library
9+
/// posts some work to the IO service as a result of configuration.
10+
/// Using a callout that always throws we can ensure that the server polls
11+
/// this initial work before it starts working.
1012
///
1113
static const int LIBRARY_NUMBER = 4;
1214

src/bin/dhcp6/tests/hooks_unittest.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -5834,7 +5834,7 @@ TEST_F(HooksDhcpv6SrvTest, leases6ParkedPacketLimit) {
58345834
}
58355835

58365836
// Checks that postponed hook start service can fail.
5837-
TEST_F(LoadUnloadDhcpv6SrvTest, StartServiceFail) {
5837+
TEST_F(LoadUnloadDhcpv6SrvTest, startServiceFail) {
58385838
boost::shared_ptr<ControlledDhcpv6Srv> srv(new ControlledDhcpv6Srv(0));
58395839

58405840
// Ensure no marker files to start with.

0 commit comments

Comments
 (0)