summaryrefslogtreecommitdiffstats
path: root/bin/tests/system/coverage/tests.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 23:51:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 23:51:28 +0000
commit754c7de1e91eeb28c6d3766900ead0c3e44fdb85 (patch)
tree51433c0e38731dc9ecd342555a56f876980b1834 /bin/tests/system/coverage/tests.sh
parentAdding debian version 1:9.16.44-1~deb11u1. (diff)
downloadbind9-754c7de1e91eeb28c6d3766900ead0c3e44fdb85.tar.xz
bind9-754c7de1e91eeb28c6d3766900ead0c3e44fdb85.zip
Merging upstream version 1:9.16.48.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'bin/tests/system/coverage/tests.sh')
-rw-r--r--bin/tests/system/coverage/tests.sh100
1 files changed, 50 insertions, 50 deletions
diff --git a/bin/tests/system/coverage/tests.sh b/bin/tests/system/coverage/tests.sh
index e0da919..0f75b04 100644
--- a/bin/tests/system/coverage/tests.sh
+++ b/bin/tests/system/coverage/tests.sh
@@ -19,68 +19,68 @@ COVERAGE="$COVERAGE -c ./named-compilezone"
status=0
n=1
-matchall () {
- file=$1
- echo "$2" | while read matchline; do
- grep "$matchline" $file > /dev/null 2>&1 || {
- echo "FAIL"
- return
- }
- done
+matchall() {
+ file=$1
+ echo "$2" | while read matchline; do
+ grep "$matchline" $file >/dev/null 2>&1 || {
+ echo "FAIL"
+ return
+ }
+ done
}
echo_i "checking for DNSSEC key coverage issues"
ret=0
for dir in [0-9][0-9]-*; do
- ret=0
- echo_i "$dir"
- args= warn= error= ok= retcode= match= zones=
- . $dir/expect
- $COVERAGE $args -K $dir ${zones:-example.com} > coverage.$n 2>&1
+ ret=0
+ echo_i "$dir"
+ args= warn= error= ok= retcode= match= zones=
+ . $dir/expect
+ $COVERAGE $args -K $dir ${zones:-example.com} >coverage.$n 2>&1
- # check that return code matches expectations
- found=$?
- if [ $found -ne $retcode ]; then
- echo "retcode was $found expected $retcode"
- ret=1
- fi
+ # check that return code matches expectations
+ found=$?
+ if [ $found -ne $retcode ]; then
+ echo "retcode was $found expected $retcode"
+ ret=1
+ fi
- # check for correct number of errors
- found=`grep ERROR coverage.$n | wc -l`
- if [ $found -ne $error ]; then
- echo "error count was $found expected $error"
- ret=1
- fi
+ # check for correct number of errors
+ found=$(grep ERROR coverage.$n | wc -l)
+ if [ $found -ne $error ]; then
+ echo "error count was $found expected $error"
+ ret=1
+ fi
- # check for correct number of warnings
- found=`grep WARNING coverage.$n | wc -l`
- if [ $found -ne $warn ]; then
- echo "warning count was $found expected $warn"
- ret=1
- fi
+ # check for correct number of warnings
+ found=$(grep WARNING coverage.$n | wc -l)
+ if [ $found -ne $warn ]; then
+ echo "warning count was $found expected $warn"
+ ret=1
+ fi
- # check for correct number of OKs
- found=`grep "No errors found" coverage.$n | wc -l`
- if [ $found -ne $ok ]; then
- echo "good count was $found expected $ok"
- ret=1
- fi
+ # check for correct number of OKs
+ found=$(grep "No errors found" coverage.$n | wc -l)
+ if [ $found -ne $ok ]; then
+ echo "good count was $found expected $ok"
+ ret=1
+ fi
- found=`matchall coverage.$n "$match"`
- if [ "$found" = "FAIL" ]; then
- echo "no match on '$match'"
- ret=1
- fi
+ found=$(matchall coverage.$n "$match")
+ if [ "$found" = "FAIL" ]; then
+ echo "no match on '$match'"
+ ret=1
+ fi
- found=`grep Traceback coverage.$n | wc -l`
- if [ $found -ne 0 ]; then
- echo "python exception detected"
- ret=1
- fi
+ found=$(grep Traceback coverage.$n | wc -l)
+ if [ $found -ne 0 ]; then
+ echo "python exception detected"
+ ret=1
+ fi
- n=`expr $n + 1`
- if [ $ret != 0 ]; then echo_i "failed"; fi
- status=`expr $status + $ret`
+ n=$(expr $n + 1)
+ if [ $ret != 0 ]; then echo_i "failed"; fi
+ status=$(expr $status + $ret)
done
echo_i "exit status: $status"