Commit Graph
3371 Commits
Author SHA1 Message Date
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
Witold Kręcicki 669a694d3b Post shutting down tasks always to manager 0 2018-11-06 08:19:50 +00:00
Witold Kręcicki c416389d32 Separate structure for each thread/queue; 2-phase-locking for exclusive tasks 2018-11-06 08:19:50 +00:00
Witold Kręcicki 818d63a3a1 Always restart dispatchers on empty readyq 2018-11-06 08:19:50 +00:00
Witold Kręcicki d7be8afea5 Taskmgr shutdown fixes 2018-11-06 08:19:50 +00:00
Witold Kręcicki 81a85070c5 Multiple worker queues 2018-11-06 08:19:50 +00:00
Witold Krecicki 7b6721b27f isc_thread_setaffinity() 2018-11-06 08:19:50 +00:00
Michał Kępień 0e979358ee [squash] Rework code preparing a HTTP response for sending in lib/isc/httpd.c 2018-10-31 13:46:52 +01:00
Witold KręcickiandMichał Kępień 54b9690a4e Remove vector socket functions from Unix socket code and library headers
Remove the following functions in order to simplify socket code:

  - isc_socket_recvv()
  - isc_socket_sendtov()
  - isc_socket_sendtov2()
  - isc_socket_sendv()
2018-10-31 12:12:53 +01:00
Witold KręcickiandMichał Kępień 76ec6861e5 Remove vector socket functions from Windows socket code
Remove the following functions in order to simplify socket code:

  - isc_socket_recvv()
  - isc_socket_sendtov()
  - isc_socket_sendtov2()
  - isc_socket_sendv()
2018-10-31 12:12:53 +01:00
Witold KręcickiandMichał Kępień 07eebc42e4 Do not use vector socket functions in HTTP server code
Refactor code in lib/isc/httpd.c to no longer use isc_socket_sendv() as
this function will be removed shortly.
2018-10-31 12:12:50 +01:00
Evan Hunt b27630a130 remove config.h references 2018-10-30 10:42:41 -07:00
Evan Hunt a0de6707c0 silence warning from missing print.h 2018-10-30 08:06:34 -07:00
Michał Kępień e1f0aed034 Fix isc_buffer_copyregion() for auto-reallocated buffers
While isc_buffer_copyregion() calls isc_buffer_reserve() to ensure the
target buffer will have enough available space to append the contents of
the source region to it, the variables used for subsequently checking
available space are not updated accordingly after that call.  This
prevents isc_buffer_copyregion() from working as expected for
auto-reallocated buffers: ISC_R_NOSPACE will be returned if enough space
is not already available in the target buffer before it is reallocated.
Fix by calling isc_buffer_used() and isc_buffer_availablelength()
directly instead of assigning their return values to local variables.
2018-10-30 13:33:25 +01:00
Michał Kępień 15440d8027 Add unit tests for isc_buffer_copyregion()
Add some basic checks for isc_buffer_copyregion() to ensure it behaves
as expected for both fixed-size buffers and buffers which can be
automatically reallocated.  Adjust the list of headers included by
lib/isc/tests/buffer_test.c so that it matches what that test program
really uses.
2018-10-30 13:33:25 +01:00
Mark Andrews 97a680e5ce document eol 2018-10-30 11:03:02 +11:00
Evan Hunt dfe5d3330c added stdatomic.h and md.h 2018-10-29 11:26:38 -07:00
Mark Andrews 561b780ba0 Only set IPV6_USE_MIN_MTU on IPv6. 2018-10-29 16:49:33 +11:00
Ondřej Surý d6c50674bb Remove last traces of DSA and NSEC3DSA algorithm, but restore the algnumber -> name mapping 2018-10-26 11:50:11 +02:00
Ondřej Surý 8efd394c80 Remove last bits of PKCS#11 DH support that has been already removed 2018-10-26 11:50:11 +02:00