named-checkconf -z could exit with an incorrect staatus
the CHECK() macro resets result, so an error code from an earlier
view could be erased if the last view loaded had no errors.
(cherry picked from commit 7e73660206)
This commit is contained in:
@@ -365,6 +365,13 @@ grep "zone shared.example/IN: loaded serial" < checkconf.out$n > /dev/null || re
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "check that named-checkconf -z returns error when a later view is okay ($n)"
|
||||
ret=0
|
||||
$CHECKCONF -z check-missing-zone.conf > checkconf.out$n 2>&1 && ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "check that named-checkconf prints max-cache-size <percentage> correctly ($n)"
|
||||
ret=0
|
||||
|
||||
Reference in New Issue
Block a user