Mark Andrews
c0a3c48802
add missing DBC checks for catz and add isc_magic checks; add DBC checks to ht.c
...
(cherry picked from commit a487473fc5 )
(cherry picked from commit 17d9fa3cc7 )
2018-11-29 15:05:17 +11:00
Witold Kręcicki and Mark Andrews
50d7e0b4ef
Use proper casting in socket unit test
...
(cherry picked from commit 5f81aa10bc )
2018-11-22 10:34:43 +11:00
Ondřej Surý and Mark Andrews
78a94766d7
Fix memory leak in lex_test.c
...
(cherry picked from commit 7a3eb391fa )
2018-11-21 15:46:55 -05:00
Evan Hunt
58314571ef
remove (or hide behind a 'verbose' flag) extra output from system tests
...
(cherry picked from commit 8f15219f36 )
2018-11-16 13:00:49 -08:00
Evan Hunt
2ed9b06ab8
remove ATF source code and Atffiles
...
(cherry picked from commit 8c4d50c6bc )
(cherry picked from commit 33f428efda )
2018-11-15 17:52:00 -08:00
Joey and Evan Hunt
15de58c441
convert socket_test; remove ATF from lib/isc/tests
...
(cherry picked from commit 9eea00cd3c )
(cherry picked from commit 37ce8f1021 )
2018-11-15 17:45:48 -08:00
Evan Hunt
dbdf383fcd
convert atomic_test
...
(cherry picked from commit 7abdd9e87a )
2018-11-15 17:45:48 -08:00
Evan Hunt
436d987224
convert isc_ntop_test
...
(cherry picked from commit b0309ae739 )
2018-11-15 17:45:48 -08:00
Evan Hunt
c803e6ee1d
convert print_test
...
(cherry picked from commit 7bbe60ada1 )
2018-11-15 17:45:47 -08:00
Evan Hunt
5334c3a6cf
convert regex_test
...
(cherry picked from commit bd009b34a6 )
(cherry picked from commit 6182c94334 )
2018-11-15 17:45:47 -08:00
Evan Hunt
4506ec30fe
convert random_test
...
(cherry picked from commit 6ad7acd787 )
(cherry picked from commit 13a6d71e88 )
2018-11-15 17:45:47 -08:00
Joey and Evan Hunt
064966f7fb
convert mem_test
...
(cherry picked from commit 683094e308 )
(cherry picked from commit 15f7486d7b )
2018-11-15 17:45:47 -08:00
Evan Hunt
6040d4e9c2
convert timer_test
...
(cherry picked from commit 20cef35ece )
(cherry picked from commit 7c4ed64665 )
2018-11-15 17:45:47 -08:00
Evan Hunt
ffc1bd97a8
convert task_test
...
(cherry picked from commit f524cc713e )
2018-11-15 17:45:47 -08:00
Joey and Evan Hunt
13aa5ae73c
convert hash_test
...
(cherry picked from commit 72f60bdd84 )
(cherry picked from commit bdf9ea7de7 )
2018-11-15 17:45:47 -08:00
Evan Hunt
c0e0ef8573
convert ht_test
...
(cherry picked from commit c701f036ea )
(cherry picked from commit 360d7d3d72 )
2018-11-15 17:45:47 -08:00
Evan Hunt
69b892edc7
convert time_test
...
(cherry picked from commit 3bf9a1e567 )
(cherry picked from commit 8d0396737c )
2018-11-15 17:45:47 -08:00
Evan Hunt
caac5988d8
convert taskpool_test
...
(cherry picked from commit c9ff174dce )
(cherry picked from commit 98bff81bae )
2018-11-15 17:45:46 -08:00
Evan Hunt
f2b40a2b6c
convert pool_test
...
(cherry picked from commit 4f84acb788 )
(cherry picked from commit 16d2d27b04 )
2018-11-15 17:45:46 -08:00
Evan Hunt
886eb41ac4
convert sockaddr_test
...
(cherry picked from commit 231436039d )
(cherry picked from commit be41574a20 )
2018-11-15 17:45:46 -08:00
Evan Hunt
da13efce9d
convert netaddr_test
...
(cherry picked from commit 7ab8c5b583 )
(cherry picked from commit ba2262910a )
2018-11-15 17:45:46 -08:00
Evan Hunt
6aaaea3e61
convert symtab_test
...
(cherry picked from commit 5f377136be )
(cherry picked from commit 7b2288483f )
2018-11-15 17:45:46 -08:00
Evan Hunt
7ba2676176
convert queue_test
...
(cherry picked from commit b3db0266cb )
(cherry picked from commit b59107e687 )
2018-11-15 17:45:46 -08:00
Evan Hunt
cf3bc94608
convert file_test
...
(cherry picked from commit 8161be27db )
(cherry picked from commit 3b95658020 )
2018-11-15 17:45:46 -08:00
Evan Hunt
ff466ef5aa
convert lex_test
...
(cherry picked from commit 4133fd86f1 )
(cherry picked from commit 0e08dc2e2b )
2018-11-15 17:45:46 -08:00
Evan Hunt
2ac235d08c
convert errno_test
...
(cherry picked from commit 049a3a7c0e )
(cherry picked from commit df41c2668f )
2018-11-15 17:45:45 -08:00
Evan Hunt
c5e86b2f3d
convert safe_test
...
(cherry picked from commit c1c8d8846f )
(cherry picked from commit 5f3ba36436 )
2018-11-15 17:45:45 -08:00
Evan Hunt
e975371c4d
convert radix_test
...
(cherry picked from commit 718ca3166c )
(cherry picked from commit 5640841732 )
2018-11-15 17:45:45 -08:00
Evan Hunt
726f335c37
convert heap_test
...
(cherry picked from commit cc6ab2416b )
(cherry picked from commit 57d78a76e5 )
2018-11-15 17:45:45 -08:00
Evan Hunt
65640c6743
convert parse_test
...
(cherry picked from commit a7c308df9c )
(cherry picked from commit f29a9d5bc5 )
2018-11-15 17:45:45 -08:00
Evan Hunt
802b551d42
convert counter_test
...
(cherry picked from commit 52b86f0abe )
(cherry picked from commit 856add745a )
2018-11-15 17:45:45 -08:00
Evan Hunt
2f4c3cf019
convert buffer_test
...
(cherry picked from commit 02a5db7631 )
(cherry picked from commit 3095574c1c )
2018-11-15 17:45:45 -08:00
Evan Hunt
b85a5b0dcd
convert aes_test
...
(cherry picked from commit dc88db015b )
(cherry picked from commit c679b85424 )
2018-11-15 17:45:45 -08:00
Evan Hunt
f533ab528d
improvements to test setup and teardown
...
- assert if {isc,dns,ns}_test_begin() is called when a prior test is running
- add dns_test_init() and dns_test_final(), which can be run before and
after all tests. this ensures openssl doesn't have to be reinitialized.
2018-11-15 17:44:13 -08:00
Evan Hunt
099883e2b1
remove .NOTPARALLEL so unit tests can build faster
...
(cherry picked from commit b434b0a4b6 )
(cherry picked from commit 03c7a096c6 )
2018-11-16 01:05:35 +00:00
Mark Andrews
03f2cc49e3
remove lib/isc/tests/result_test as it is now cmocka
...
(cherry picked from commit 9024cf0c15 )
2018-11-13 07:50:51 +11:00
Evan Hunt and Mark Andrews
181c5442b9
convert result tests to use CMocka instead of ATF
...
(cherry picked from commit 471110933a )
2018-11-12 15:38:50 +11:00
Mark Andrews
af5a051e4d
check result tables are complete
...
(cherry picked from commit 4f04a79250 )
2018-11-12 15:32:58 +11:00
Ondřej Surý and Mark Andrews
22c0f129ae
Add support for cmocka assert testing by overriding REQUIRE/INSIST/... macros when UNIT_TESTING is defined
...
(cherry picked from commit 52731c000d )
2018-11-12 12:56:15 +11:00
Ondřej Surý and Mark Andrews
b0745fb156
Integrate cmocka unit testing framework to kyua
...
(cherry picked from commit 07910f0153 )
2018-11-12 12:53:15 +11:00
Ondřej Surý
9000f73ba3
Properly use ATOMIC_*_LOCK_FREE preprocessor constants
...
The ATOMIC_*_LOCK_FREE can evalutate either 0, 1, or 2 which indicate the
lock-free property of the corresponding atomic types (both signed and unsigned).
Value Explanation
----- --------------------------------------
0 The atomic type is never lock-free
1 The atomic type is sometimes lock-free
2 The atomic type is always lock-free
----- --------------------------------------
(cherry picked from commit a5e7901eb9 )
2018-11-09 05:00:32 +07:00
Ondřej Surý
ba263b5b7e
isc_stdtime_t is always 32-bit now, so remove the always true macro STDTIME_ON_32BITS
...
(cherry picked from commit 6f5fe11f5a )
2018-11-09 03:04:22 +07:00
Ondřej Surý
2079e44fb9
Define PK11_UTIMACO_FLAVOR and add detection code to configure.ac
2018-11-09 00:07:44 +07:00
Ondřej Surý
c5b54803cd
Remove dummy ISLOCKED macro
...
(cherry picked from commit 68ca987792 )
(cherry picked from commit 5ad72603a8 )
2018-11-08 22:42:52 +07:00
Ondřej Surý
2f8b28efad
Hint the compiler with ISC_UNREACHABLE(); that code after INSIST(0); cannot be reached
...
(cherry picked from commit 23fff6c569 )
(cherry picked from commit 4568669807 )
2018-11-08 22:42:52 +07:00
Ondřej Surý
c576cb2ff6
Don't assert on failed getrlimit call to allow called to handle this gracefully as it already does, just abort where we need to know the numbers
...
(cherry picked from commit e2e138a801 )
(cherry picked from commit 1e6329038b )
2018-11-08 22:03:31 +07:00
Ondřej Surý
f1224b4af1
When ISC assertions are disabled, still execute the condition to prevent unused variable warnings/errors from the compiler
...
(cherry picked from commit a831e0f72d )
(cherry picked from commit 3d834566f1 )
2018-11-08 22:03:00 +07:00
Ondřej Surý
12a266211e
Turn (int & flag) into (int & flag) != 0 when implicitly typed to bool
...
(cherry picked from commit b2b43fd235 )
(cherry picked from commit fcd1569e2b )
2018-11-08 22:02:58 +07:00
Ondřej Surý
9d15323e24
Add small tweaks to the code to fix compilation when ISC assertions are disabled
...
While implementing the new unit testing framework cmocka, it was found that the
BIND 9 code doesn't compile when assertions are disabled or replaced with any
function (such as mock_assert() from cmocka unit testing framework) that's not
directly recognized as assertion by the compiler.
This made the compiler to complain about blocks of code that was recognized as
unreachable before, but now it isn't.
The changes in this commit include:
* assigns default values to couple of local variables,
* moves some return statements around INSIST assertions,
* adds __builtin_unreachable(); annotations after some INSIST assertions,
* fixes one broken assertion (= instead of ==)
(cherry picked from commit fbd2e47f51 )
(cherry picked from commit b222783ae9 )
2018-11-08 22:00:49 +07:00
Evan Hunt
6690b9e5a3
silence warning from missing print.h
...
(cherry picked from commit a0de6707c0 )
2018-10-30 08:09:44 -07:00