2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-22 18:08:16 +00:00

[#1671] addressed review comments

This commit is contained in:
Razvan Becheriu 2023-03-20 19:00:21 +02:00 committed by Andrei Pavel
parent 35238f03aa
commit b47394ff5e
12 changed files with 176 additions and 169 deletions

View File

@ -388,25 +388,22 @@ Starting and Stopping the Control Agent
is a copy of the ``config.report`` file produced by ``./configure``; is a copy of the ``config.report`` file produced by ``./configure``;
it is embedded in the executable binary. it is embedded in the executable binary.
The ``config.report`` file may also be accessed directly, via the The contents of the ``config.report`` file may also be accessed by examining
following command. The binary ``path`` may be found in the install certain libraries in the installation tree or in the source tree.
directory or in the ``.libs`` subdirectory in the source tree. For
example: ``kea/src/lib/process/.libs/``.
:: .. code-block:: shell
strings path/libkea-process.so | sed -n 's/;;;; //p' # from installation using libkea-process.so
$ strings ${prefix}/lib/libkea-process.so | sed -n 's/;;;; //p'
:: # from sources using libkea-process.so
$ strings src/lib/process/.libs/libkea-process.so | sed -n 's/;;;; //p'
strings path/libkea-process.a | sed -n 's/;;;; //p' # from sources using libkea-process.a
$ strings src/lib/process/.libs/libkea-process.a | sed -n 's/;;;; //p'
The libcfgrpt.a library can also be used from the source tree with path: # from sources using libcfgrpt.a
``src/lib/process/cfgrpt/.libs/``. $ strings src/lib/process/cfgrpt/.libs/libcfgrpt.a | sed -n 's/;;;; //p'
::
strings path/libcfgrpt.a | sed -n 's/;;;; //p'
The CA is started by running its binary and specifying the configuration The CA is started by running its binary and specifying the configuration
file it should use. For example: file it should use. For example:

View File

@ -138,25 +138,22 @@ directly. It accepts the following command-line switches:
messages to standard output and errors to standard error when testing messages to standard output and errors to standard error when testing
the configuration. the configuration.
The ``config.report`` file may also be accessed directly, via the The contents of the ``config.report`` file may also be accessed by examining
following command. The binary ``path`` may be found in the install certain libraries in the installation tree or in the source tree.
directory or in the ``.libs`` subdirectory in the source tree. For
example: ``kea/src/lib/process/.libs/``.
:: .. code-block:: shell
strings path/libkea-process.so | sed -n 's/;;;; //p' # from installation using libkea-process.so
$ strings ${prefix}/lib/libkea-process.so | sed -n 's/;;;; //p'
:: # from sources using libkea-process.so
$ strings src/lib/process/.libs/libkea-process.so | sed -n 's/;;;; //p'
strings path/libkea-process.a | sed -n 's/;;;; //p' # from sources using libkea-process.a
$ strings src/lib/process/.libs/libkea-process.a | sed -n 's/;;;; //p'
The libcfgrpt.a library can also be used from the source tree with path: # from sources using libcfgrpt.a
``src/lib/process/cfgrpt/.libs/``. $ strings src/lib/process/cfgrpt/.libs/libcfgrpt.a | sed -n 's/;;;; //p'
::
strings path/libcfgrpt.a | sed -n 's/;;;; //p'
Upon startup, the module loads its configuration and begins listening Upon startup, the module loads its configuration and begins listening
for NCRs based on that configuration. for NCRs based on that configuration.

View File

@ -43,9 +43,10 @@ the following command-line switches:
server. server.
- ``-T file`` - specifies a configuration file to be tested. ``kea-dhcp4`` - ``-T file`` - specifies a configuration file to be tested. ``kea-dhcp4``
loads it, checks it, and exits. It performs extra checks beside ``-t`` is loads it, checks it, and exits. It performs extra checks beside what ``-t``
doing, like establising database connections (lease db, host db, CB db, is doing, like establising database connections (lease backend,
forensic logging db), hook libraries loading and configuration parsing, etc. host reservations backend, configuration backend and forensic logging
backend), hook libraries loading and configuration parsing, etc.
It does not open unix or TCP/UDP sockets, neither does it open or rotate It does not open unix or TCP/UDP sockets, neither does it open or rotate
files, as all these actions could interfere with a running process on the files, as all these actions could interfere with a running process on the
same machine. same machine.
@ -60,25 +61,22 @@ the following command-line switches:
is a copy of the ``config.report`` file produced by ``./configure``; is a copy of the ``config.report`` file produced by ``./configure``;
it is embedded in the executable binary. it is embedded in the executable binary.
The ``config.report`` file may also be accessed directly, via the The contents of the ``config.report`` file may also be accessed by examining
following command. The binary ``path`` may be found in the install certain libraries in the installation tree or in the source tree.
directory or in the ``.libs`` subdirectory in the source tree. For
example: ``kea/src/lib/process/.libs/``.
:: .. code-block:: shell
strings path/libkea-process.so | sed -n 's/;;;; //p' # from installation using libkea-process.so
$ strings ${prefix}/lib/libkea-process.so | sed -n 's/;;;; //p'
:: # from sources using libkea-process.so
$ strings src/lib/process/.libs/libkea-process.so | sed -n 's/;;;; //p'
strings path/libkea-process.a | sed -n 's/;;;; //p' # from sources using libkea-process.a
$ strings src/lib/process/.libs/libkea-process.a | sed -n 's/;;;; //p'
The libcfgrpt.a library can also be used from the source tree with path: # from sources using libcfgrpt.a
``src/lib/process/cfgrpt/.libs/``. $ strings src/lib/process/cfgrpt/.libs/libcfgrpt.a | sed -n 's/;;;; //p'
::
strings path/libcfgrpt.a | sed -n 's/;;;; //p'
On startup, the server detects available network interfaces and On startup, the server detects available network interfaces and
attempts to open UDP sockets on all interfaces listed in the attempts to open UDP sockets on all interfaces listed in the

View File

@ -42,10 +42,11 @@ the following command-line switches:
comprehensive; certain checks are possible only when running the comprehensive; certain checks are possible only when running the
server. server.
- ``-T file`` - specifies a configuration file to be tested. ``kea-dhcp4`` - ``-T file`` - specifies a configuration file to be tested. ``kea-dhcp6``
loads it, checks it, and exits. It performs extra checks beside ``-t`` is loads it, checks it, and exits. It performs extra checks beside what ``-t``
doing, like establising database connections (lease db, host db, CB db, is doing, like establising database connections (lease backend,
forensic logging db), hook libraries loading and configuration parsing, etc. host reservations backend, configuration backend and forensic logging
backend), hook libraries loading and configuration parsing, etc.
It does not open unix or TCP/UDP sockets, neither does it open or rotate It does not open unix or TCP/UDP sockets, neither does it open or rotate
files, as all these actions could interfere with a running process on the files, as all these actions could interfere with a running process on the
same machine. same machine.
@ -60,25 +61,22 @@ the following command-line switches:
is a copy of the ``config.report`` file produced by ``./configure``; is a copy of the ``config.report`` file produced by ``./configure``;
it is embedded in the executable binary. it is embedded in the executable binary.
The ``config.report`` file may also be accessed directly, via the The contents of the ``config.report`` file may also be accessed by examining
following command. The binary ``path`` may be found in the install certain libraries in the installation tree or in the source tree.
directory or in the ``.libs`` subdirectory in the source tree. For
example: ``kea/src/lib/process/.libs/``.
:: .. code-block:: shell
strings path/libkea-process.so | sed -n 's/;;;; //p' # from installation using libkea-process.so
$ strings ${prefix}/lib/libkea-process.so | sed -n 's/;;;; //p'
:: # from sources using libkea-process.so
$ strings src/lib/process/.libs/libkea-process.so | sed -n 's/;;;; //p'
strings path/libkea-process.a | sed -n 's/;;;; //p' # from sources using libkea-process.a
$ strings src/lib/process/.libs/libkea-process.a | sed -n 's/;;;; //p'
The libcfgrpt.a library can also be used from the source tree with path: # from sources using libcfgrpt.a
``src/lib/process/cfgrpt/.libs/``. $ strings src/lib/process/cfgrpt/.libs/libcfgrpt.a | sed -n 's/;;;; //p'
::
strings path/libcfgrpt.a | sed -n 's/;;;; //p'
On startup, the server detects available network interfaces and On startup, the server detects available network interfaces and
attempts to open UDP sockets on all interfaces listed in the attempts to open UDP sockets on all interfaces listed in the
@ -1100,8 +1098,8 @@ gives the range of addresses in the pool.
It is possible to define more than one pool in a subnet; continuing the It is possible to define more than one pool in a subnet; continuing the
previous example, further assume that 2001:db8:1:0:5::/80 should also be previous example, further assume that 2001:db8:1:0:5::/80 should also be
managed by the server. It could be written as 2001:db8:1:0:5:: to managed by the server. It could be written as 2001:db8:1:0:5:: to
2001:db8:1::5:ffff:ffff:ffff, but typing so many ``f``s is cumbersome. It 2001:db8:1::5:ffff:ffff:ffff, but typing so many ``f`` characters is cumbersome.
can be expressed more simply as 2001:db8:1:0:5::/80. Both formats are It can be expressed more simply as 2001:db8:1:0:5::/80. Both formats are
supported by ``Dhcp6`` and can be mixed in the pool list. For example, supported by ``Dhcp6`` and can be mixed in the pool list. For example,
the following pools could be defined: the following pools could be defined:

View File

@ -686,25 +686,22 @@ Starting and Stopping the NETCONF Agent
is a copy of the ``config.report`` file produced by ``./configure``; is a copy of the ``config.report`` file produced by ``./configure``;
it is embedded in the executable binary. it is embedded in the executable binary.
The ``config.report`` file may also be accessed directly, via the The contents of the ``config.report`` file may also be accessed by examining
following command. The binary ``path`` may be found in the install certain libraries in the installation tree or in the source tree.
directory or in the ``.libs`` subdirectory in the source tree. For
example: ``kea/src/lib/process/.libs/``.
:: .. code-block:: shell
strings path/libkea-process.so | sed -n 's/;;;; //p' # from installation using libkea-process.so
$ strings ${prefix}/lib/libkea-process.so | sed -n 's/;;;; //p'
:: # from sources using libkea-process.so
$ strings src/lib/process/.libs/libkea-process.so | sed -n 's/;;;; //p'
strings path/libkea-process.a | sed -n 's/;;;; //p' # from sources using libkea-process.a
$ strings src/lib/process/.libs/libkea-process.a | sed -n 's/;;;; //p'
The libcfgrpt.a library can also be used from the source tree with path: # from sources using libcfgrpt.a
``src/lib/process/cfgrpt/.libs/``. $ strings src/lib/process/cfgrpt/.libs/libcfgrpt.a | sed -n 's/;;;; //p'
::
strings path/libcfgrpt.a | sed -n 's/;;;; //p'
.. _operation-example: .. _operation-example:

View File

@ -51,8 +51,9 @@ The arguments are as follows:
``-T config-file`` ``-T config-file``
Checks the configuration file and reports the first error, if any. Checks the configuration file and reports the first error, if any.
It performs extra checks beside ``-t`` is doing, like establising database It performs extra checks beside what ``-t`` is doing, like establising
connections (lease db, host db, CB db, forensic logging db), hook libraries database connections (lease backend, host reservations backend, configuration
backend and forensic logging backend), hook libraries
loading and configuration parsing, etc. It does not open unix or TCP/UDP loading and configuration parsing, etc. It does not open unix or TCP/UDP
sockets, neither does it open or rotate files, as all these actions could sockets, neither does it open or rotate files, as all these actions could
interfere with a running process on the same machine. interfere with a running process on the same machine.

View File

@ -51,8 +51,9 @@ The arguments are as follows:
``-T config-file`` ``-T config-file``
Checks the configuration file and reports the first error, if any. Checks the configuration file and reports the first error, if any.
It performs extra checks beside ``-t`` is doing, like establising database It performs extra checks beside what ``-t`` is doing, like establising
connections (lease db, host db, CB db, forensic logging db), hook libraries database connections (lease backend, host reservations backend, configuration
backend and forensic logging backend), hook libraries
loading and configuration parsing, etc. It does not open unix or TCP/UDP loading and configuration parsing, etc. It does not open unix or TCP/UDP
sockets, neither does it open or rotate files, as all these actions could sockets, neither does it open or rotate files, as all these actions could
interfere with a running process on the same machine. interfere with a running process on the same machine.

View File

@ -757,7 +757,45 @@ configureDhcp4Server(Dhcpv4Srv& server, isc::data::ConstElementPtr config_set,
SrvConfigPtr srv_config; SrvConfigPtr srv_config;
if (status_code == CONTROL_RESULT_SUCCESS) { if (status_code == CONTROL_RESULT_SUCCESS) {
if (!check_only) { if (check_only) {
if (extra_checks) {
// Re-open lease and host database with new parameters.
try {
// Get the staging configuration.
srv_config = CfgMgr::instance().getStagingCfg();
CfgDbAccessPtr cfg_db = CfgMgr::instance().getStagingCfg()->getCfgDbAccess();
string params = "universe=4 persist=false";
if (cfg_db->getExtendedInfoTablesEnabled()) {
params += " extended-info-tables=true";
}
cfg_db->setAppendedParameters(params);
cfg_db->createManagers();
} catch (const std::exception& ex) {
answer = isc::config::createAnswer(CONTROL_RESULT_ERROR, ex.what());
status_code = CONTROL_RESULT_ERROR;
}
if (status_code == CONTROL_RESULT_SUCCESS) {
std::ostringstream err;
// Configure DHCP packet queueing
try {
data::ConstElementPtr qc;
qc = CfgMgr::instance().getStagingCfg()->getDHCPQueueControl();
if (IfaceMgr::instance().configureDHCPPacketQueue(AF_INET, qc)) {
LOG_INFO(dhcp4_logger, DHCP4_CONFIG_PACKET_QUEUE)
.arg(IfaceMgr::instance().getPacketQueue4()->getInfoStr());
}
} catch (const std::exception& ex) {
err << "Error setting packet queue controls after server reconfiguration: "
<< ex.what();
answer = isc::config::createAnswer(CONTROL_RESULT_ERROR, err.str());
status_code = CONTROL_RESULT_ERROR;
}
}
}
} else {
string parameter_name; string parameter_name;
ElementPtr mutable_cfg; ElementPtr mutable_cfg;
@ -805,25 +843,6 @@ configureDhcp4Server(Dhcpv4Srv& server, isc::data::ConstElementPtr config_set,
" processing error"); " processing error");
status_code = CONTROL_RESULT_ERROR; status_code = CONTROL_RESULT_ERROR;
} }
} else {
if (extra_checks) {
// Re-open lease and host database with new parameters.
try {
// Get the staging configuration.
srv_config = CfgMgr::instance().getStagingCfg();
CfgDbAccessPtr cfg_db = CfgMgr::instance().getStagingCfg()->getCfgDbAccess();
string params = "universe=4 persist=false";
if (cfg_db->getExtendedInfoTablesEnabled()) {
params += " extended-info-tables=true";
}
cfg_db->setAppendedParameters(params);
cfg_db->createManagers();
} catch (const std::exception& ex) {
answer = isc::config::createAnswer(CONTROL_RESULT_ERROR, ex.what());
status_code = CONTROL_RESULT_ERROR;
}
}
} }
} }
@ -897,13 +916,9 @@ configureDhcp4Server(Dhcpv4Srv& server, isc::data::ConstElementPtr config_set,
// Moved from the commit block to add the config backend indication. // Moved from the commit block to add the config backend indication.
if (status_code == CONTROL_RESULT_SUCCESS && (!check_only || extra_checks)) { if (status_code == CONTROL_RESULT_SUCCESS && (!check_only || extra_checks)) {
try { try {
if (extra_checks) {
server.getCBControl()->databaseConfigConnect(srv_config);
} else {
// If there are config backends, fetch and merge into staging config // If there are config backends, fetch and merge into staging config
server.getCBControl()->databaseConfigFetch(srv_config, server.getCBControl()->databaseConfigFetch(srv_config,
CBControlDHCPv4::FetchMode::FETCH_ALL); CBControlDHCPv4::FetchMode::FETCH_ALL);
}
} catch (const isc::Exception& ex) { } catch (const isc::Exception& ex) {
std::ostringstream err; std::ostringstream err;
err << "during update from config backend database: " << ex.what(); err << "during update from config backend database: " << ex.what();

View File

@ -289,22 +289,16 @@ syntax_check_test() {
local test_name="${1}" local test_name="${1}"
local config="${2}" local config="${2}"
local expected_code="${3}" local expected_code="${3}"
local extra_check="${4}" local check_type="${4}"
# Log the start of the test and print test name. # Log the start of the test and print test name.
test_start "${test_name}" test_start "${test_name}"
# Create correct configuration file. # Create correct configuration file.
create_config "${config}" create_config "${config}"
# Check it # Check it
if [ "${extra_check}" -eq 1 ]; then printf "Running command %s.\n" "\"${bin_path}/${bin} ${check_type} ${CFG_FILE}\""
printf "Running command %s.\n" "\"${bin_path}/${bin} -T ${CFG_FILE}\""
run_command \ run_command \
"${bin_path}/${bin}" -T "${CFG_FILE}" "${bin_path}/${bin}" "${check_type}" "${CFG_FILE}"
else
printf "Running command %s.\n" "\"${bin_path}/${bin} -t ${CFG_FILE}\""
run_command \
"${bin_path}/${bin}" -t "${CFG_FILE}"
fi
if [ "${EXIT_CODE}" -ne "${expected_code}" ]; then if [ "${EXIT_CODE}" -ne "${expected_code}" ]; then
printf 'ERROR: expected exit code %s, got %s\n' "${expected_code}" "${EXIT_CODE}" printf 'ERROR: expected exit code %s, got %s\n' "${expected_code}" "${EXIT_CODE}"
clean_exit 1 clean_exit 1
@ -583,9 +577,9 @@ shutdown_test "dhcpv4.sigint_test" 2
version_test "dhcpv4.version" version_test "dhcpv4.version"
logger_vars_test "dhcpv4.variables" logger_vars_test "dhcpv4.variables"
lfc_timer_test lfc_timer_test
syntax_check_test "dhcpv4.syntax_check_success" "${CONFIG}" 0 0 syntax_check_test "dhcpv4.syntax_check_success" "${CONFIG}" 0 -t
syntax_check_test "dhcpv4.syntax_check_bad_syntax" "${CONFIG_BAD_SYNTAX}" 1 0 syntax_check_test "dhcpv4.syntax_check_bad_syntax" "${CONFIG_BAD_SYNTAX}" 1 -t
syntax_check_test "dhcpv4.syntax_check_bad_values" "${CONFIG_BAD_VALUES}" 1 0 syntax_check_test "dhcpv4.syntax_check_bad_values" "${CONFIG_BAD_VALUES}" 1 -t
syntax_check_test "dhcpv4.syntax_check_hooks_load_fail" "${INVALID_CONFIG_HOOKS_LOAD}" 1 1 syntax_check_test "dhcpv4.syntax_check_hooks_load_fail" "${INVALID_CONFIG_HOOKS_LOAD}" 1 -T
syntax_check_test "dhcpv4.syntax_check_hooks_callout_fail" "${INVALID_CONFIG_HOOKS_CALLOUT_FAIL}" 1 1 syntax_check_test "dhcpv4.syntax_check_hooks_callout_fail" "${INVALID_CONFIG_HOOKS_CALLOUT_FAIL}" 1 -T
password_redact_test "dhcpv4.password_redact_test" "$(kea_dhcp_config 4)" 0 password_redact_test "dhcpv4.password_redact_test" "$(kea_dhcp_config 4)" 0

View File

@ -886,7 +886,45 @@ configureDhcp6Server(Dhcpv6Srv& server, isc::data::ConstElementPtr config_set,
SrvConfigPtr srv_config; SrvConfigPtr srv_config;
if (status_code == CONTROL_RESULT_SUCCESS) { if (status_code == CONTROL_RESULT_SUCCESS) {
if (!check_only) { if (check_only) {
if (extra_checks) {
// Re-open lease and host database with new parameters.
try {
// Get the staging configuration.
srv_config = CfgMgr::instance().getStagingCfg();
CfgDbAccessPtr cfg_db = CfgMgr::instance().getStagingCfg()->getCfgDbAccess();
string params = "universe=6 persist=false";
if (cfg_db->getExtendedInfoTablesEnabled()) {
params += " extended-info-tables=true";
}
cfg_db->setAppendedParameters(params);
cfg_db->createManagers();
} catch (const std::exception& ex) {
answer = isc::config::createAnswer(CONTROL_RESULT_ERROR, ex.what());
status_code = CONTROL_RESULT_ERROR;
}
if (status_code == CONTROL_RESULT_SUCCESS) {
std::ostringstream err;
// Configure DHCP packet queueing
try {
data::ConstElementPtr qc;
qc = CfgMgr::instance().getStagingCfg()->getDHCPQueueControl();
if (IfaceMgr::instance().configureDHCPPacketQueue(AF_INET6, qc)) {
LOG_INFO(dhcp6_logger, DHCP6_CONFIG_PACKET_QUEUE)
.arg(IfaceMgr::instance().getPacketQueue6()->getInfoStr());
}
} catch (const std::exception& ex) {
err << "Error setting packet queue controls after server reconfiguration: "
<< ex.what();
answer = isc::config::createAnswer(CONTROL_RESULT_ERROR, err.str());
status_code = CONTROL_RESULT_ERROR;
}
}
}
} else {
string parameter_name; string parameter_name;
ElementPtr mutable_cfg; ElementPtr mutable_cfg;
@ -934,25 +972,6 @@ configureDhcp6Server(Dhcpv6Srv& server, isc::data::ConstElementPtr config_set,
" processing error"); " processing error");
status_code = CONTROL_RESULT_ERROR; status_code = CONTROL_RESULT_ERROR;
} }
} else {
if (extra_checks) {
// Re-open lease and host database with new parameters.
try {
// Get the staging configuration.
srv_config = CfgMgr::instance().getStagingCfg();
CfgDbAccessPtr cfg_db = CfgMgr::instance().getStagingCfg()->getCfgDbAccess();
string params = "universe=6 persist=false";
if (cfg_db->getExtendedInfoTablesEnabled()) {
params += " extended-info-tables=true";
}
cfg_db->setAppendedParameters(params);
cfg_db->createManagers();
} catch (const std::exception& ex) {
answer = isc::config::createAnswer(CONTROL_RESULT_ERROR, ex.what());
status_code = CONTROL_RESULT_ERROR;
}
}
} }
} }
@ -1026,13 +1045,9 @@ configureDhcp6Server(Dhcpv6Srv& server, isc::data::ConstElementPtr config_set,
// Moved from the commit block to add the config backend indication. // Moved from the commit block to add the config backend indication.
if (status_code == CONTROL_RESULT_SUCCESS && (!check_only || extra_checks)) { if (status_code == CONTROL_RESULT_SUCCESS && (!check_only || extra_checks)) {
try { try {
if (extra_checks) {
server.getCBControl()->databaseConfigConnect(srv_config);
} else {
// If there are config backends, fetch and merge into staging config // If there are config backends, fetch and merge into staging config
server.getCBControl()->databaseConfigFetch(srv_config, server.getCBControl()->databaseConfigFetch(srv_config,
CBControlDHCPv6::FetchMode::FETCH_ALL); CBControlDHCPv6::FetchMode::FETCH_ALL);
}
} catch (const isc::Exception& ex) { } catch (const isc::Exception& ex) {
std::ostringstream err; std::ostringstream err;
err << "during update from config backend database: " << ex.what(); err << "during update from config backend database: " << ex.what();

View File

@ -306,22 +306,16 @@ syntax_check_test() {
local test_name="${1}" local test_name="${1}"
local config="${2}" local config="${2}"
local expected_code="${3}" local expected_code="${3}"
local extra_check="${4}" local check_type="${4}"
# Log the start of the test and print test name. # Log the start of the test and print test name.
test_start "${test_name}" test_start "${test_name}"
# Create correct configuration file. # Create correct configuration file.
create_config "${config}" create_config "${config}"
# Check it # Check it
if [ "${extra_check}" -eq 1 ]; then printf "Running command %s.\n" "\"${bin_path}/${bin} ${check_type} ${CFG_FILE}\""
printf "Running command %s.\n" "\"${bin_path}/${bin} -T ${CFG_FILE}\""
run_command \ run_command \
"${bin_path}/${bin}" -T "${CFG_FILE}" "${bin_path}/${bin}" "${check_type}" "${CFG_FILE}"
else
printf "Running command %s.\n" "\"${bin_path}/${bin} -t ${CFG_FILE}\""
run_command \
"${bin_path}/${bin}" -t "${CFG_FILE}"
fi
if [ "${EXIT_CODE}" -ne "${expected_code}" ]; then if [ "${EXIT_CODE}" -ne "${expected_code}" ]; then
printf 'ERROR: expected exit code %s, got %s\n' "${expected_code}" "${EXIT_CODE}" printf 'ERROR: expected exit code %s, got %s\n' "${expected_code}" "${EXIT_CODE}"
clean_exit 1 clean_exit 1
@ -603,9 +597,9 @@ shutdown_test "dhcpv6.sigint_test" 2
version_test "dhcpv6.version" version_test "dhcpv6.version"
logger_vars_test "dhcpv6.variables" logger_vars_test "dhcpv6.variables"
lfc_timer_test lfc_timer_test
syntax_check_test "dhcpv6.syntax_check_success" "${CONFIG}" 0 0 syntax_check_test "dhcpv6.syntax_check_success" "${CONFIG}" 0 -t
syntax_check_test "dhcpv6.syntax_check_bad_syntax" "${CONFIG_BAD_SYNTAX}" 1 0 syntax_check_test "dhcpv6.syntax_check_bad_syntax" "${CONFIG_BAD_SYNTAX}" 1 -t
syntax_check_test "dhcpv6.syntax_check_bad_values" "${CONFIG_BAD_VALUES}" 1 0 syntax_check_test "dhcpv6.syntax_check_bad_values" "${CONFIG_BAD_VALUES}" 1 -t
syntax_check_test "dhcpv6.syntax_check_hooks_load_fail" "${INVALID_CONFIG_HOOKS_LOAD}" 1 1 syntax_check_test "dhcpv6.syntax_check_hooks_load_fail" "${INVALID_CONFIG_HOOKS_LOAD}" 1 -T
syntax_check_test "dhcpv6.syntax_check_hooks_callout_fail" "${INVALID_CONFIG_HOOKS_CALLOUT_FAIL}" 1 1 syntax_check_test "dhcpv6.syntax_check_hooks_callout_fail" "${INVALID_CONFIG_HOOKS_CALLOUT_FAIL}" 1 -T
password_redact_test "dhcpv6.password_redact_test" "$(kea_dhcp_config 6)" 0 password_redact_test "dhcpv6.password_redact_test" "$(kea_dhcp_config 6)" 0