[master] improve rrchecker test

4203.	[test]		The rrchecker system test now tests conversion
			to and from unkonwn-type format. [RT #40584]
This commit is contained in:
Evan Hunt
2015-09-11 00:24:47 -07:00
parent 4523c3b371
commit aec8a3b7cf
3 changed files with 33 additions and 6 deletions

View File

@@ -38,19 +38,42 @@ $*
EOF
}
echo "I:check conversions to canonical format"
ret=0
$SHELL ../genzone.sh 0 > tempzone
$CHECKZONE -Dq . tempzone | sed '/^;/d' |
while read -r n tt cl ty rest
do
myecho "$cl $ty $rest" | $RRCHECKER -p > checker.out || {
ret=1;
echo "I: '$cl $ty $rest' not handled.";
ret=1
echo "I: '$cl $ty $rest' not handled."
}
read -r cl0 ty0 rest0 < checker.out
test "$cl $ty $rest" = "$cl0 $ty0 $rest0" || {
ret=1;
echo "I: '$cl $ty $rest' != '$cl0 $ty0 $rest0'";
ret=1
echo "I: '$cl $ty $rest' != '$cl0 $ty0 $rest0'"
}
done
test $ret -eq 0 || { echo "I:failed"; status=`expr $status + 1`; }
echo "I:check conversions to and from unknown record format"
ret=0
$CHECKZONE -Dq . tempzone | sed '/^;/d' |
while read -r n tt cl ty rest
do
myecho "$cl $ty $rest" | $RRCHECKER -u > checker.out || {
ret=1
echo "I: '$cl $ty $rest' not converted to unknown record format"
}
read -r clu tyu restu < checker.out
myecho "$clu $tyu $restu" | $RRCHECKER -p > checker.out || {
ret=1
echo "I: '$cl $ty $rest' not converted back to canonical format"
}
read -r cl0 ty0 rest0 < checker.out
test "$cl $ty $rest" = "$cl0 $ty0 $rest0" || {
ret=1
echo "I: '$cl $ty $rest' != '$cl0 $ty0 $rest0'"
}
done
test $ret -eq 0 || { echo "I:failed"; status=`expr $status + 1`; }