From: Michał Kępień Date: Thu, 6 Feb 2020 14:17:38 +0000 (+0100) Subject: Fix the "dnssec" system test on Windows X-Git-Tag: v9.11.16~17^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=9d5d2c9d2072c878edfb3bb5816928b17f30c381;p=thirdparty%2Fbind9.git Fix the "dnssec" system test on Windows Make sure carriage return characters are stripped from awk input to enable the "dnssec" system test to pass on Windows. (cherry picked from commit 2f694f0b779a50918cdd24f05de04ab6bad043e9) --- diff --git a/bin/tests/system/dnssec/tests.sh b/bin/tests/system/dnssec/tests.sh index 39d5c907bcd..dc07c3daf4b 100644 --- a/bin/tests/system/dnssec/tests.sh +++ b/bin/tests/system/dnssec/tests.sh @@ -3373,7 +3373,7 @@ echo send $DIG $DIGOPTS +noall +answer @10.53.0.2 cds cds-update.secure > dig.out.test$n lines=`awk '$4 == "CDS" {print}' dig.out.test$n | wc -l` test "${lines:-10}" -eq 1 || ret=1 -lines=`awk '$4 == "CDS" && $5 == "0" && $6 == "0" && $7 == "0" && $8 == "00" {print}' dig.out.test$n | wc -l` +lines=`tr -d '\r' < dig.out.test$n | awk '$4 == "CDS" && $5 == "0" && $6 == "0" && $7 == "0" && $8 == "00" {print}' | wc -l` test "$lines" -eq 1 || ret=1 n=`expr $n + 1` test "$ret" -eq 0 || echo_i "failed" @@ -3539,7 +3539,7 @@ echo send $DIG $DIGOPTS +noall +answer @10.53.0.2 cdnskey cdnskey-update.secure > dig.out.test$n lines=`awk '$4 == "CDNSKEY" {print}' dig.out.test$n | wc -l` test "${lines:-10}" -eq 1 || ret=1 -lines=`awk '$4 == "CDNSKEY" && $5 == "0" && $6 == "3" && $7 == "0" && $8 == "AA==" {print}' dig.out.test$n | wc -l` +lines=`tr -d '\r' < dig.out.test$n | awk '$4 == "CDNSKEY" && $5 == "0" && $6 == "3" && $7 == "0" && $8 == "AA==" {print}' | wc -l` test "${lines:-10}" -eq 1 || ret=1 n=`expr $n + 1` test "$ret" -eq 0 || echo_i "failed"