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/2177Resolve "fix build failures in unit tests on some systems"2023-11-23T18:38:26ZAndrei Pavelandrei@isc.orgResolve "fix build failures in unit tests on some systems"Closes #3166.
- cherry-pick 7129fed942dd381d8946f5b43f5423b8d4ccab20
- cherry-pick 53f3d241c8ea39b5823f361012360e29d5fc1897
- fix release dateCloses #3166.
- cherry-pick 7129fed942dd381d8946f5b43f5423b8d4ccab20
- cherry-pick 53f3d241c8ea39b5823f361012360e29d5fc1897
- fix release datekea2.4.1Andrei Pavelandrei@isc.orgAndrei Pavelandrei@isc.orghttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/2095Resolve "UT IOSignalTest.mixedSignals fails under Ubuntu 22.04 VMs"2023-08-15T19:28:21ZThomas MarkwalderResolve "UT IOSignalTest.mixedSignals fails under Ubuntu 22.04 VMs"Closes #2954Closes #2954kea2.5.1Thomas MarkwalderThomas Markwalderhttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/2069Resolve "v6 BLQ with SQL backends unit tests"2023-07-12T12:57:29ZFrancis DupontResolve "v6 BLQ with SQL backends unit tests"Part of #2870 (can be empty)Part of #2870 (can be empty)kea2.5.0Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/1919Resolve "Test if vivco (124) is working, write unit-tests and examples"2023-03-06T14:37:44ZFrancis DupontResolve "Test if vivco (124) is working, write unit-tests and examples"Closes #467Closes #467kea2.3.6Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/1918Resolve "testless distcheck"2023-02-14T08:09:29ZAndrei Pavelandrei@isc.orgResolve "testless distcheck"Closes #2742.
The main goal of this MR is to only run tests (including shell tests and python tests) only if gtest is enabled on `make check` and `make distcheck`.
Additionally, it moves shell tests and python tests after C++ tests. Th...Closes #2742.
The main goal of this MR is to only run tests (including shell tests and python tests) only if gtest is enabled on `make check` and `make distcheck`.
Additionally, it moves shell tests and python tests after C++ tests. The reasoning is that C++ tests are first-class citizens. We rely on them more. We change them more during development. So they should be the first ones that return a result.
`noinst_SCRIPTS` was moved in some makefiles, to move it closer to the other `noinst`.
```
# Don't install C++ tests.
noinst_PROGRAMS = $(PROGRAM_TESTS) <----
endif
# Don't install shell tests.
noinst_SCRIPTS = $(SHTESTS) <----
```
It's normal for the `noinst_SCRIPTS` to be outside the `endif` because unlike `PROGRAM_TESTS` which are only created conditionally based on the status of gtest, `SHTESTS` are always created by `configure.ac`.
distcheck run on this branch: https://jenkins.aws.isc.org/view/Kea-manual/job/kea-manual/job/distcheck/135/
ut-extended run on this branch: https://jenkins.aws.isc.org/view/Kea-manual/job/kea-manual/job/ut-extended/184/
The jobs stall, but it's a jenkins issue for one system: `All nodes of label ‘freebsd&&13.0&&amd64’ are offline`.kea2.3.5Andrei Pavelandrei@isc.orgAndrei Pavelandrei@isc.orghttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/1897Resolve "mysql_get_option was not declared"2023-01-23T16:53:11ZAndrei Pavelandrei@isc.orgResolve "mysql_get_option was not declared"Closes #2727.Closes #2727.kea2.3.4Andrei Pavelandrei@isc.orgAndrei Pavelandrei@isc.orghttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/1730Resolve "doc/examples/kea4/reservations.json is broken"2022-07-22T19:59:33ZRazvan BecheriuResolve "doc/examples/kea4/reservations.json is broken"Closes #2474Closes #2474kea2.2.0 - a new stable branchRazvan BecheriuRazvan Becheriuhttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/1707Resolve "check-hashes.sh test in src/share/yang fails on systems with OpenSSL 3"2022-07-01T16:26:41ZAndrei Pavelandrei@isc.orgResolve "check-hashes.sh test in src/share/yang fails on systems with OpenSSL 3"Closes #2461Closes #2461kea2.2.0 - a new stable branchAndrei Pavelandrei@isc.orgAndrei Pavelandrei@isc.orghttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/1632Resolve "Unit tests fail when build/test box has an eth1 interface"2022-04-19T19:37:58ZRazvan BecheriuResolve "Unit tests fail when build/test box has an eth1 interface"Closes #2377Closes #2377kea2.1.5Razvan BecheriuRazvan Becheriuhttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/1563Resolve "disable TLS tests if TLS is not configured in setup"2022-02-09T12:34:01ZRazvan BecheriuResolve "disable TLS tests if TLS is not configured in setup"Closes #2294Closes #2294kea2.1.3Razvan BecheriuRazvan Becheriuhttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/1571Resolve "TLS unit tests fail with OpenSSL 1.1.1m"2022-02-09T09:07:24ZAndrei Pavelandrei@isc.orgResolve "TLS unit tests fail with OpenSSL 1.1.1m"Closes #2250.
The exceptions that I'm getting have extra explanations in parantheses e.g. `No such file or directory (system library, fopen)` instead of `No such file or directory`. I suggest you try the 1.1.1m on Linux. My guess is tha...Closes #2250.
The exceptions that I'm getting have extra explanations in parantheses e.g. `No such file or directory (system library, fopen)` instead of `No such file or directory`. I suggest you try the 1.1.1m on Linux. My guess is that it does not have those extra explanations on MacOS.
I went with checking that the expected error is contained in the received exception message in the HA tests because it was easier. And with adding the full received message in asiolink TLS tests also because it was easier.kea2.1.3Andrei Pavelandrei@isc.orgAndrei Pavelandrei@isc.orghttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/1484src/lib/log/tests/Makefile.am: check-local -> check_SCRIPTS,TESTS2021-11-19T18:54:20ZAndrei Pavelandrei@isc.orgsrc/lib/log/tests/Makefile.am: check-local -> check_SCRIPTS,TESTSCloses #2172.
Required:
* [X] Pass all shell tests to autoconf's `check_SCRIPTS` and `TESTS` variables through the temporary `SHTESTS` variable.
* [X] Remove them from `check-local` so that they don't run twice at this point.
* [X] Repl...Closes #2172.
Required:
* [X] Pass all shell tests to autoconf's `check_SCRIPTS` and `TESTS` variables through the temporary `SHTESTS` variable.
* [X] Remove them from `check-local` so that they don't run twice at this point.
* [X] Replace `TESTSCXXFLAGS`, `TESTSCPPFLAGS`, `TESTSLDADD`, `TESTSLDFLAGS` with `AM_*` variables. The variables starting with `TESTS` are autoconf-specific variables that resulted in the shell scripts that were newly added to `TESTS` to be built like C++ files, which made the build fail.
Optional:
* [X] Split `noinst_PROGRAMS` in `PROGRAM_TESTS` and `TEST_HELPERS`.
* [X] Remove extra entry in `.gitignore`.
* [ ] Solve death test warning.
* Not done, because the suggested fix of adding `GTEST_FLAG_SET(death_test_style, "threadsafe");` fails for me with `GTEST_FLAG_SET was not declared in this scope`.
Change can be tested with `make check -j 1234`. It should be easy to get interleaving between shell tests and C++ tests in the old version. And you should get sequential running in this version. Order is deterministic, but arbitrarily so - shell tests run first, C++ tests afterwards.
distcheck test run: https://jenkins.aws.isc.org/view/Kea-manual/job/kea-manual/job/distcheck/51/consolekea2.1.1Andrei Pavelandrei@isc.orgAndrei Pavelandrei@isc.orghttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/1491build libco when gtest is not enabled so that make-check passes2021-11-16T07:34:40ZAndrei Pavelandrei@isc.orgbuild libco when gtest is not enabled so that make-check passesCloses #2167.
* [X] take libco*.la out of HAVE_GTEST if block
* [X] take DISTCLEANFILES out of HAVE_GTEST if block - extraneous to the reported issue, but somewhat related to the fix, should fix make-distcheck without gtestCloses #2167.
* [X] take libco*.la out of HAVE_GTEST if block
* [X] take DISTCLEANFILES out of HAVE_GTEST if block - extraneous to the reported issue, but somewhat related to the fix, should fix make-distcheck without gtestkea2.1.1Andrei Pavelandrei@isc.orgAndrei Pavelandrei@isc.orghttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/1324[#1961] centralize shell test preparation2021-07-06T10:01:30ZAndrei Pavelandrei@isc.org[#1961] centralize shell test preparationCloses #1961Closes #1961kea1.9.10Andrei Pavelandrei@isc.orgAndrei Pavelandrei@isc.orghttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/1268Resolve "make gtests, shell tests, python tests run sequentially (not concurr...2021-07-05T12:56:49ZAndrei Pavelandrei@isc.orgResolve "make gtests, shell tests, python tests run sequentially (not concurrently)"Closes #1642
This change is mostly to not force `make distcheck -j 1` and to allow `make distcheck -j 2` for faster Jenkins testing.
Managed to do it without splitting into separate directories. All that needs to be done is to add the ...Closes #1642
This change is mostly to not force `make distcheck -j 1` and to allow `make distcheck -j 2` for faster Jenkins testing.
Managed to do it without splitting into separate directories. All that needs to be done is to add the scripts to `TESTS` and to `check_SCRIPTS`. Both were missing.
https://www.gnu.org/software/automake/manual/html_node/Scripts_002dbased-Testsuites.html
> If the special variable TESTS is defined, its value is taken to be a list of programs or scripts to run in order to do the testing.
https://www.gnu.org/software/automake/manual/html_node/Scripts.html
> Scripts that need not be installed can be listed in noinst_SCRIPTS, and among them, those which are needed only by ‘make check’ should go in check_SCRIPTS.
Apart from that, I felt like these `Makefile.am`s could use more ordering. Here is the logic that I used:
* some have `SUBDIRS = .`, some don't. For consistency, I added it everywhere. It shouldn't make a real diference.
* ordered automake statements in the order that you would normally call upon them as an autotools user:
* EXTRA_DIST - `make distdir`
* TESTS_ENVIRONMENT - `make check` (needed when called with valgrind I think)
* SHTESTS + check_SCRIPTS + TESTS - `make check`
* DISTCLEANFILES - `make clean`
* noinst_SCRIPTS - `make install`
* and then for gtest (C++ tests):
* PROGRAMTESTS - `make check` with gtest enabled
* DISTCLEANFILES - `make clean` with gtest enabled
* noinst_SCRIPTS - `make install` with gtest enabled
The shell and python tests are now considered proper automake tests instead of some random strings that we run alongside `make check`. You'll see in the libraries that contain shell tests or python tests that instead of `1 test passed` you get `All 2 tests passed` refering to C++ tests (1) and shell/python tests (2). Not sure on what implications this will have, but I'm thinking it can only be good.
Apart from that, some tests now failed because they some variables different paths in `make distcheck` versus `make check`. In one instance, these variables pointed to the installation directory which was empty, and is most of the time so. So to avoid this error, I replaced a conditional assignment of KEA_*_DIR to always point to builddir. This seems to have solved the issue.
distcheck run in jenkins on this branch: https://jenkins.aws.isc.org/view/Kea-manual/job/kea-manual/job/distcheck/22/kea1.9.10Andrei Pavelandrei@isc.orgAndrei Pavelandrei@isc.orghttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/1318Resolve "make check in src/bin/admin deletes repo"2021-07-05T08:56:20ZAndrei Pavelandrei@isc.orgResolve "make check in src/bin/admin deletes repo"Closes #1961Closes #1961kea1.9.10Andrei Pavelandrei@isc.orgAndrei Pavelandrei@isc.orghttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/1302[#1913] Handling unordered UDP reception2021-06-25T13:19:36ZTomek Mrugalski[#1913] Handling unordered UDP receptionCloses #1913Closes #1913kea1.9.9https://gitlab.isc.org/isc-projects/kea/-/merge_requests/1265Resolve "add dhcp4 releases to perfdhcp"2021-06-22T08:47:17ZAndrei Pavelandrei@isc.orgResolve "add dhcp4 releases to perfdhcp"Closes #1119Closes #1119kea1.9.9Andrei Pavelandrei@isc.orgAndrei Pavelandrei@isc.orghttps://gitlab.isc.org/isc-projects/kea/-/merge_requests/1267beautify perfdhcp usage code2021-06-17T10:07:30ZAndrei Pavelandrei@isc.orgbeautify perfdhcp usage codeAn extra of #1119.
A compilation of two commits. You may want to look at them separately:
* 80259ea7ed2c4a61ce6645c79d204bbd52d27f9f: Sets the usage in the summary in quasi-alphabetical order for easier tracking of flags. Copied the lis...An extra of #1119.
A compilation of two commits. You may want to look at them separately:
* 80259ea7ed2c4a61ce6645c79d204bbd52d27f9f: Sets the usage in the summary in quasi-alphabetical order for easier tracking of flags. Copied the list from the man page which is complete. Flags that were missing before: -g, -J, --scenario
* b761d8b82ab7d92a6df69e5ef96ad08746c0ede8: Convert the usage to a raw string literal. It's easier to modify.kea1.9.9Andrei Pavelandrei@isc.orgAndrei Pavelandrei@isc.org