mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-02-02 19:59:28 -05:00
- Fix unbound-control test so it counts the new flush_negative output,
also answers the _ta probe from testns and prints command output and skip a thread specific test when no threads are available.
This commit is contained in:
parent
8b38fe5ab6
commit
a7704ad49f
3 changed files with 26 additions and 3 deletions
|
|
@ -3,6 +3,11 @@
|
|||
'gcc-15 -Wbuiltin-declaration-mismatch' error in compat/malloc.c.
|
||||
- For #1262, ifdef is no longer needed.
|
||||
|
||||
2 April 2025: Wouter
|
||||
- Fix unbound-control test so it counts the new flush_negative output,
|
||||
also answers the _ta probe from testns and prints command output
|
||||
and skip a thread specific test when no threads are available.
|
||||
|
||||
1 April 2025: Wouter
|
||||
- Fix escape more characters when printing an RR type with an unquoted
|
||||
string.
|
||||
|
|
|
|||
|
|
@ -68,9 +68,12 @@ fail_answer () {
|
|||
|
||||
# Issue an unbound-control command
|
||||
# $@: command arguments
|
||||
control_command () {
|
||||
control_command() {
|
||||
echo "$PRE/unbound-control $@"
|
||||
$PRE/unbound-control $@ > outfile
|
||||
exitstatus=$?
|
||||
cat outfile
|
||||
return $exitstatus
|
||||
}
|
||||
|
||||
# Reload the server and check the reload has finished processing
|
||||
|
|
@ -249,6 +252,10 @@ expect_exit_value 1
|
|||
teststep "clean reload"
|
||||
clean_reload
|
||||
|
||||
# The flush negative only works if the server is either on 1 thread,
|
||||
# or there is threading enabled. Multiple processes does not work for the
|
||||
# test, since the printout does not have the stats of a global cache.
|
||||
if test $num_threads -le 1 -o "$have_threads" = "yes"; then
|
||||
teststep "Check negative flushing"
|
||||
query always.empty.
|
||||
expect_answer "SERVFAIL"
|
||||
|
|
@ -256,10 +263,13 @@ query always.empty. DNSKEY
|
|||
expect_answer "SERVFAIL"
|
||||
control_command -c ub.conf flush_negative
|
||||
expect_exit_value 0
|
||||
expect_answer "^ok removed .*, 2 messages and 1 key"
|
||||
expect_answer "^ok removed .*, 3 messages and 1 key entries"
|
||||
control_command -c ub.conf flush_negative
|
||||
expect_exit_value 0
|
||||
expect_answer "^ok removed .*, 0 messages and 0 key"
|
||||
expect_answer "^ok removed .*, 0 messages and 0 key entries"
|
||||
else
|
||||
echo "> skip Check negative flushing, because no threads"
|
||||
fi
|
||||
|
||||
teststep "create a new local zone"
|
||||
control_command -c ub.conf local_zone example.net static
|
||||
|
|
|
|||
|
|
@ -34,3 +34,11 @@ ADJUST copy_id
|
|||
SECTION QUESTION
|
||||
always.empty. IN DNSKEY
|
||||
ENTRY_END
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
REPLY QR AA NOERROR
|
||||
ADJUST copy_id
|
||||
SECTION QUESTION
|
||||
_ta-c5aa.always.empty. IN NULL
|
||||
ENTRY_END
|
||||
|
|
|
|||
Loading…
Reference in a new issue