[master] new dnssec-coverage options
3702. [func] 'dnssec-coverage -l' option specifies a length of time to check for coverage; events further into the future are ignored. 'dnssec-coverage -z' checks only ZSK events, and 'dnssec-coverage -k' checks only KSK events. (Thanks to Peter Palfrader.) [RT #35168]
This commit is contained in:
@@ -42,22 +42,38 @@ for dir in [0-9][0-9]-*; do
|
||||
$COVERAGE $args -K $dir example.com > coverage.$n 2>&1
|
||||
|
||||
# check that return code matches expectations
|
||||
[ $? -eq $retcode ] || ret=1
|
||||
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`
|
||||
[ $found -eq $error ] || ret=1
|
||||
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`
|
||||
[ $found -eq $warn ] || ret=1
|
||||
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`
|
||||
[ $found -eq $ok ] || ret=1
|
||||
if [ $found -ne $ok ]; then
|
||||
echo "good count was $found expected $ok"
|
||||
ret=1
|
||||
fi
|
||||
|
||||
found=`matchall coverage.$n "$match"`
|
||||
[ "$found" = "FAIL" ] && ret=1
|
||||
if [ "$found" = "FAIL" ]; then
|
||||
echo "no match on '$match'"
|
||||
ret=1
|
||||
fi
|
||||
|
||||
n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
|
||||
Reference in New Issue
Block a user