Kea merge requestshttps://gitlab.isc.org/isc-projects/kea/-/merge_requests2024-01-26T18:01:51Zhttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/2196Resolve "Kea might not use getopt correctly on alpine"2024-01-26T18:01:51ZAndrei Pavelandrei@isc.orgResolve "Kea might not use getopt correctly on alpine"Closes #2788.
* [x] 11ad14d306cdc502189945b9c73d39a35ae9676a make all commandLineArgs tests more strict
* [x] 3571991e8067ae8c080300dcb936e741459a1064 exhaust options before throwing error
Prior to this change, if parseArgs() ...Closes #2788.
* [x] 11ad14d306cdc502189945b9c73d39a35ae9676a make all commandLineArgs tests more strict
* [x] 3571991e8067ae8c080300dcb936e741459a1064 exhaust options before throwing error
Prior to this change, if parseArgs() was called twice during the same
program lifetime and it stumbled on an unsupported option and throwed an
exception on the first call, the previous set of arguments lived on to
be parsed by the second call. This is a situation that likely arises
only in unit tests, but let us fix it properly to at least silence the unit
test failure on alpine, which was happening because of different
implementation of getopt from musl, and which motivated looking into how
getopt behaves. To make the bug evident even in a non-alpine environment, add an
EXPECT_THROW_MSG in DStubControllerTest.commandLineArgs when parsing argv3, and
see that it outputs "unsupported option: [s]" instead of
"extraneous command line information".
* [x] 22eb99788a5280a4e120eff199bafb6d076da42e reset optarg
optarg is not reset in musl's getopt and it leaks values to other flags.
Reset it for all systems because it cannot hurt. If you remove the
optarg reset, you should see the bug in action on alpine systems in
DstubControllerTest.commandLineArgs when parsing argv2:
```
[ RUN ] DStubControllerTest.commandLineArgs
d_controller_unittests.cc:102: Failure
Expected equality of these values:
std::string(ex.what())
Which is: "unsupported option: -b cfgName"
"unsupported option: -b"
[ FAILED ] DStubControllerTest.commandLineArgs (14 ms)
```kea2.5.5Andrei Pavelandrei@isc.orgAndrei Pavelandrei@isc.orghttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/1984Resolve "d_controller uses COMMAND_SUCCESS and COMMAND_ERROR instead of CONTR...2023-05-02T14:14:08ZRazvan BecheriuResolve "d_controller uses COMMAND_SUCCESS and COMMAND_ERROR instead of CONTROL_RESULT_SUCCESS and CONTROL_RESULT_ERROR"Closes #2798Closes #2798kea2.3.8Razvan BecheriuRazvan Becheriuhttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/716Resolve "thread sanitizer reporting unit test in lib process"2020-04-22T18:41:43ZFrancis DupontResolve "thread sanitizer reporting unit test in lib process"Closes #1096Closes #1096kea1.7.7Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/386Resolve "server-tag-get command"2019-07-25T14:49:26ZFrancis DupontResolve "server-tag-get command"Part #470Part #470Kea1.6-finalFrancis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/192Resolve "Add config-reload support in process library"2019-01-22T08:38:01ZFrancis DupontResolve "Add config-reload support in process library"Closes #375Closes #375Kea1.6Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/193Resolve "Bad config crashes CA or D2 servers even with -c"2019-01-11T16:35:12ZFrancis DupontResolve "Bad config crashes CA or D2 servers even with -c"Closes #381Closes #381Kea1.6Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/80Resolve "lib process servers without arguments"2018-10-19T22:25:15ZFrancis DupontResolve "lib process servers without arguments"Closes #148Closes #148Kea1.5-beta1Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/54Resolve "Simplify CPL framework to be more suitable for kea-netconf"2018-09-29T17:54:57ZTomek MrugalskiResolve "Simplify CPL framework to be more suitable for kea-netconf"Closes #6Closes #6Kea1.5-beta1Francis DupontFrancis Dupont