mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix unit test for unbound-control to work when threads are disabled,
and fix cache dump check.
This commit is contained in:
parent
be53e37b15
commit
6e43145382
2 changed files with 18 additions and 1 deletions
|
|
@ -5,6 +5,8 @@
|
||||||
status=11/SEGV. Fixes cachedb configuration handling.
|
status=11/SEGV. Fixes cachedb configuration handling.
|
||||||
- Fix #923: processQueryResponse() THROWAWAY should be mindful of
|
- Fix #923: processQueryResponse() THROWAWAY should be mindful of
|
||||||
fail_reply.
|
fail_reply.
|
||||||
|
- Fix unit test for unbound-control to work when threads are disabled,
|
||||||
|
and fix cache dump check.
|
||||||
|
|
||||||
18 August 2023: Wouter
|
18 August 2023: Wouter
|
||||||
- Fix for iter_dec_attempts that could cause a hang, part of
|
- Fix for iter_dec_attempts that could cause a hang, part of
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,7 @@ query www.example.com.
|
||||||
cache_dump -c ub.conf
|
cache_dump -c ub.conf
|
||||||
expect_exit_value 0
|
expect_exit_value 0
|
||||||
cat cache.dump
|
cat cache.dump
|
||||||
expect_in_cache "10.20.30.40"
|
expect_in_cache_dump "10.20.30.40"
|
||||||
|
|
||||||
control_command -c ub.conf lookup www.example.com
|
control_command -c ub.conf lookup www.example.com
|
||||||
expect_exit_value 0
|
expect_exit_value 0
|
||||||
|
|
@ -264,6 +264,7 @@ control_command -c ub.conf reload_keep_cache
|
||||||
expect_exit_value 0
|
expect_exit_value 0
|
||||||
cache_dump -c ub.conf
|
cache_dump -c ub.conf
|
||||||
expect_exit_value 0
|
expect_exit_value 0
|
||||||
|
cat cache.dump
|
||||||
expect_in_cache_dump "www.example.com.*10.20.30.40"
|
expect_in_cache_dump "www.example.com.*10.20.30.40"
|
||||||
expect_in_cache_dump "msg www.example.com. IN A"
|
expect_in_cache_dump "msg www.example.com. IN A"
|
||||||
query www.example.com +nordflag
|
query www.example.com +nordflag
|
||||||
|
|
@ -291,6 +292,14 @@ fail_in_cache_dump "msg www.example.com. IN A"
|
||||||
query www.example.com
|
query www.example.com
|
||||||
expect_answer "10.20.30.40"
|
expect_answer "10.20.30.40"
|
||||||
|
|
||||||
|
# See if this part of the test can be enabled, it needs threads for combined
|
||||||
|
# output.
|
||||||
|
have_threads="no"
|
||||||
|
if grep "define HAVE_PTHREAD 1" $PRE/config.h; then have_threads="yes"; fi
|
||||||
|
if grep "define HAVE_SOLARIS_THREADS 1" $PRE/config.h; then have_threads="yes"; fi
|
||||||
|
if grep "define HAVE_WINDOWS_THREADS 1" $PRE/config.h; then have_threads="yes"; fi
|
||||||
|
if test "$have_threads" = "yes"; then
|
||||||
|
|
||||||
teststep "change num-threads and reload_keep_cache - should be empty"
|
teststep "change num-threads and reload_keep_cache - should be empty"
|
||||||
echo "server: num-threads: 2" >> ub.conf
|
echo "server: num-threads: 2" >> ub.conf
|
||||||
control_command -c ub.conf reload_keep_cache
|
control_command -c ub.conf reload_keep_cache
|
||||||
|
|
@ -311,6 +320,12 @@ expect_exit_value 0
|
||||||
expect_in_cache_dump "www.example.com.*10.20.30.40"
|
expect_in_cache_dump "www.example.com.*10.20.30.40"
|
||||||
expect_in_cache_dump "msg www.example.com. IN A"
|
expect_in_cache_dump "msg www.example.com. IN A"
|
||||||
|
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "> skip test parts that need threads, have_threads=no"
|
||||||
|
# end of check for have_threads
|
||||||
|
fi
|
||||||
|
|
||||||
teststep "now stop the server"
|
teststep "now stop the server"
|
||||||
control_command -c ub.conf stop
|
control_command -c ub.conf stop
|
||||||
expect_exit_value 0
|
expect_exit_value 0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue