]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix the "dnssec" system test on Windows
authorMichał Kępień <michal@isc.org>
Fri, 19 Apr 2019 09:21:43 +0000 (11:21 +0200)
committerMichał Kępień <michal@isc.org>
Fri, 19 Apr 2019 09:30:27 +0000 (11:30 +0200)
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

index f17413723d4b3b352ed40c8ff72ada1f3957e01d..6ce7abd3db3acf452e680e07f72697229ec7fb7b 100644 (file)
@@ -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)"