From d9688b58c8385c289bc0f12713446b55f7d9751d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Fri, 19 Apr 2019 11:21:43 +0200 Subject: [PATCH 1/3] Do not wait for lock file cleanup on Windows As signals are currently not handled by named on Windows, instances terminated using signals are not able to perform a clean shutdown, which involves e.g. removing the lock file. Thus, waiting for a given instance's lock file to be removed beforing assuming it is shut down is pointless on Windows, so do not even attempt it. (cherry picked from commit 761ba4514f7eceab8019d71dc9cabd269d274597) --- bin/tests/system/stop.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/tests/system/stop.pl b/bin/tests/system/stop.pl index 4183981596..e3bb212037 100644 --- a/bin/tests/system/stop.pl +++ b/bin/tests/system/stop.pl @@ -141,6 +141,8 @@ exit($errors); sub server_lock_file { my ( $server ) = @_; + return if (defined($ENV{'CYGWIN'})); + return $testdir . "/" . $server . "/named.lock" if ($server =~ /^ns/); return if ($server =~ /^ans/); return $testdir . "/" . $server . "/lwresd.lock" if ($server =~ /^lwresd/); From 4f992ab35f5e0e5a5806eb52a15c8dcf8360b4ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Fri, 19 Apr 2019 11:21:43 +0200 Subject: [PATCH 2/3] Fix the "dnssec" system test on Windows On Windows, the bin/tests/system/dnssec/signer/example.db.signed file contains carriage return characters at the end of each line. Remove them before passing the aforementioned file to the awk script extracting key IDs so that the latter can work properly. (cherry picked from commit e4280ed9f561bc22e5c4f7817536d344598fcf3a) --- bin/tests/system/dnssec/tests.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/tests/system/dnssec/tests.sh b/bin/tests/system/dnssec/tests.sh index f17413723d..6ce7abd3db 100644 --- a/bin/tests/system/dnssec/tests.sh +++ b/bin/tests/system/dnssec/tests.sh @@ -1402,6 +1402,7 @@ if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` get_rsasha1_key_ids_from_sigs() { + tr -d '\r' < signer/example.db.signed | \ awk ' NF < 8 { next } $(NF-5) != "RRSIG" { next } @@ -1411,7 +1412,8 @@ get_rsasha1_key_ids_from_sigs() { getline; print $3; } - ' signer/example.db.signed | sort -u + ' | \ + sort -u } echo_i "checking that a key using an unsupported algorithm cannot be generated ($n)" From f78f6439b7e7907338697acc0fff7e1a3595077a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Fri, 19 Apr 2019 11:21:43 +0200 Subject: [PATCH 3/3] Update interface lists in ifconfig scripts Make bin/tests/system/ifconfig.bat also configure addresses ending with 9 and 10, so that the script is in sync with its Unix counterpart. Update comments listing the interfaces created by ifconfig.{bat,sh} so that they do not include addresses whose last octet is zero (since an address like 10.53.1.0/24 is not a valid host address and thus the aforementioned scripts do not even attempt configuring them). (cherry picked from commit b6c1cdfffe956d92f4b716262a7ca5ecf9141845) --- bin/tests/system/ifconfig.bat | 6 +++--- bin/tests/system/ifconfig.sh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/tests/system/ifconfig.bat b/bin/tests/system/ifconfig.bat index d4ba3f2dc7..3d31c8dd60 100644 --- a/bin/tests/system/ifconfig.bat +++ b/bin/tests/system/ifconfig.bat @@ -10,8 +10,8 @@ rem ifconfig.bat rem Set up interface aliases for bind9 system tests. rem rem IPv4: 10.53.0.{1..10} RFC 1918 -rem 10.53.1.{0..2} -rem 10.53.2.{0..2} +rem 10.53.1.{1..2} +rem 10.53.2.{1..2} rem IPv6: fd92:7065:b8e:ffff::{1..10} ULA rem fd92:7065:b8e:99ff::{1..2} rem fd92:7065:b8e:ff::{1..2} @@ -31,7 +31,7 @@ rem exit line echo on -FOR %%I IN (1,2,3,4,5,6,7,8) DO ( +FOR %%I IN (1,2,3,4,5,6,7,8,9,10) DO ( netsh interface ipv4 add address name=Loopback 10.53.0.%%I 255.255.255.0 netsh interface ipv6 add address interface=Loopback fd92:7065:b8e:ffff::%%I/64 ) diff --git a/bin/tests/system/ifconfig.sh b/bin/tests/system/ifconfig.sh index c6b412a8f2..aedb35fd0c 100755 --- a/bin/tests/system/ifconfig.sh +++ b/bin/tests/system/ifconfig.sh @@ -13,8 +13,8 @@ # Set up interface aliases for bind9 system tests. # # IPv4: 10.53.0.{1..10} RFC 1918 -# 10.53.1.{0..2} -# 10.53.2.{0..2} +# 10.53.1.{1..2} +# 10.53.2.{1..2} # IPv6: fd92:7065:b8e:ffff::{1..10} ULA # fd92:7065:b8e:99ff::{1..2} # fd92:7065:b8e:ff::{1..2}