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`; }
static void
usage(void) {
- fprintf(stderr, "usage: named-rrchecker [-o origin] [-hpCPT]\n");
+ fprintf(stderr, "usage: named-rrchecker [-o origin] [-hpCPTu]\n");
fprintf(stderr, "\t-h: print this help message\n");
fprintf(stderr, "\t-o origin: set origin to be used when interpeting the record\n");
fprintf(stderr, "\t-p: print the record in cannonical format\n");
fprintf(stderr, "\t-C: list the supported class names\n");
- fprintf(stderr, "\t-T: list the supported standard type names\n");
fprintf(stderr, "\t-P: list the supported private type names\n");
+ fprintf(stderr, "\t-T: list the supported standard type names\n");
+ fprintf(stderr, "\t-u: print the record in unknown record format\n");
}
int