Commit Graph
3390 Commits
Author SHA1 Message Date
JoeyandEvan Hunt 9eea00cd3c convert socket_test; remove ATF from lib/isc/tests 2018-11-14 20:17:04 -08:00
Evan Hunt bd009b34a6 convert regex_test 2018-11-14 20:17:04 -08:00
Evan Hunt 6ad7acd787 convert random_test 2018-11-14 20:17:04 -08:00
JoeyandEvan Hunt 683094e308 convert mem_test 2018-11-14 20:17:04 -08:00
Evan Hunt 20cef35ece convert timer_test 2018-11-14 20:17:04 -08:00
Evan Hunt 3e52987229 convert task_test 2018-11-14 20:17:04 -08:00
JoeyandEvan Hunt 72f60bdd84 convert hash_test 2018-11-14 20:17:04 -08:00
Evan Hunt c701f036ea convert ht_test 2018-11-14 20:17:04 -08:00
Evan Hunt 3bf9a1e567 convert time_test 2018-11-14 20:17:04 -08:00
Evan Hunt c9ff174dce convert taskpool_test 2018-11-14 20:17:04 -08:00
Evan Hunt 4f84acb788 convert pool_test 2018-11-14 20:17:04 -08:00
Evan Hunt 231436039d convert sockaddr_test 2018-11-14 20:17:04 -08:00
Evan Hunt 7ab8c5b583 convert netaddr_test 2018-11-14 20:17:04 -08:00
Evan Hunt 5f377136be convert symtab_test 2018-11-14 20:17:04 -08:00
Evan Hunt b3db0266cb convert queue_test 2018-11-14 20:17:04 -08:00
Evan Hunt 8161be27db convert file_test 2018-11-14 20:17:04 -08:00
Evan Hunt 4133fd86f1 convert lex_test 2018-11-14 20:17:04 -08:00
Evan Hunt 049a3a7c0e convert errno_test 2018-11-14 20:17:04 -08:00
Evan Hunt c1c8d8846f convert safe_test 2018-11-14 20:17:04 -08:00
Evan Hunt 718ca3166c convert radix_test 2018-11-14 20:17:04 -08:00
Evan Hunt cc6ab2416b convert heap_test 2018-11-14 20:17:04 -08:00
Evan Hunt a7c308df9c convert parse_test 2018-11-14 20:17:04 -08:00
Evan Hunt 52b86f0abe convert counter_test 2018-11-14 20:17:04 -08:00
Evan Hunt 02a5db7631 convert buffer_test 2018-11-14 20:17:04 -08:00
Evan Hunt dc88db015b convert aes_test 2018-11-14 20:17:04 -08:00
Evan Hunt d8766293ab assert if {isc,dns,ns}_test_begin() is called when a prior test is running 2018-11-14 20:17:04 -08:00
Evan Hunt b434b0a4b6 remove .NOTPARALLEL so unit tests can build faster 2018-11-14 20:17:04 -08:00
Evan Hunt f456e64736 set HAVE_CMOCKA correctly when using --with-cmocka=yes
(note: this is still broken if using --with-cmocka=path)
2018-11-14 20:17:04 -08:00
Ondřej SurýandMark Andrews de6f43d071 Use static assertion to check for correct alignment size 2018-11-14 18:18:27 -05:00
Ondřej SurýandMark Andrews 5e44a1008f Define STATIC_ASSERT(cond, msg) to be _Static_assert(cond, msg) everywhere but on Windows where it stays to be INSIST(cond) 2018-11-14 18:18:27 -05:00
Mark Andrews 9024cf0c15 remove lib/isc/tests/result_test as it is now cmocka 2018-11-13 07:26:29 +11:00
Evan Hunt 471110933a convert result tests to use CMocka instead of ATF 2018-11-10 12:29:40 -08:00
Mark Andrews 4f04a79250 check result tables are complete 2018-11-10 10:30:43 +11:00
Ondřej Surý 6f5fe11f5a isc_stdtime_t is always 32-bit now, so remove the always true macro STDTIME_ON_32BITS 2018-11-09 02:27:06 +07:00
Ondřej Surý 68ca987792 Remove dummy ISLOCKED macro 2018-11-08 12:22:26 +07:00
Ondřej Surý 23fff6c569 Hint the compiler with ISC_UNREACHABLE(); that code after INSIST(0); cannot be reached 2018-11-08 12:22:17 +07:00
Ondřej Surý e2e138a801 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 2018-11-08 12:21:53 +07:00
Ondřej Surý a831e0f72d When ISC assertions are disabled, still execute the condition to prevent unused variable warnings/errors from the compiler 2018-11-08 12:21:53 +07:00
Ondřej Surý b2b43fd235 Turn (int & flag) into (int & flag) != 0 when implicitly typed to bool 2018-11-08 12:21:53 +07:00
Ondřej Surý fbd2e47f51 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 ==)
2018-11-08 12:21:53 +07:00
Witold Kręcicki ce478b4fc9 Fix a typo in lib/isc/unix/thread.c 2018-11-07 19:31:06 +00:00
Witold Kręcicki 460c8038c1 Use a single wake_all_queues() function to wake all queues 2018-11-06 08:19:50 +00:00
Witold Kręcicki b3827319e0 Switch from privileged to un-privileged mode under lock 2018-11-06 08:19:50 +00:00
Witold Kręcicki f166cabcae Document isc_task_sendto properly, make sure that cpu we're sending to is always sane 2018-11-06 08:19:50 +00:00
Witold Kręcicki 025c74adee Use proper memory ordering for tasks_running/tasks_ready 2018-11-06 08:19:50 +00:00
Witold Kręcicki 8fb5bc783f Comment about taskmgr exclusive mode, fix a REQUIRE. 2018-11-06 08:19:50 +00:00
Witold Kręcicki 913856911a Saner exclusive task handling in taskmgr 2018-11-06 08:19:50 +00:00
Witold Kręcicki 17d46fd48b Formatting 2018-11-06 08:19:50 +00:00
Witold Kręcicki c80e25e482 Get rid of isc_taskmgr_setmode, we only use it to set privileged mode 2018-11-06 08:19:50 +00:00
Witold Kręcicki 64020dd7bc Make sure all priority tasks are done before entering normal execution 2018-11-06 08:19:50 +00:00