clean up test output

- removed a few remaing places where output wasn't being passed
  through echo_i or cat_i
- added a "digcomp" function to conf.sh.in to send digcomp.pl output
  through cat_i and return the correct exit value
- set SYSTESTDIR when calling echo_i from nsX directories, so that
  the test name will always be printed correctly
- fixed a test name typo in conf.sh.in
This commit is contained in:
Evan Hunt
2018-02-24 00:48:50 -08:00
parent e656041fd7
commit 0e52fbd0b3
37 changed files with 286 additions and 229 deletions

View File

@@ -54,7 +54,7 @@ zone "nil" {
};
EOF
$RNDCCMD 10.53.0.1 reload
$RNDCCMD 10.53.0.1 reload | sed 's/^/ns1 /' | cat_i
for i in 0 1 2 3 4 5 6 7 8 9
do
@@ -157,7 +157,7 @@ done
# modify the master
cp ns3/mytest1.db ns3/mytest.db
$RNDCCMD 10.53.0.3 reload
$RNDCCMD 10.53.0.3 reload | sed 's/^/ns3 /' | cat_i
#wait for master to reload load
for i in 0 1 2 3 4 5 6 7 8 9
@@ -202,7 +202,7 @@ echo_i "testing request-ixfr option in view vs zone"
echo_i " this result should be AXFR"
cp ns3/subtest1.db ns3/subtest.db # change to sub.test zone, should be AXFR
$RNDCCMD 10.53.0.3 reload
$RNDCCMD 10.53.0.3 reload | sed 's/^/ns3 /' | cat_i
#wait for master to reload zone
for i in 0 1 2 3 4 5 6 7 8 9
@@ -242,7 +242,7 @@ fi
echo_i " this result should be IXFR"
cp ns3/mytest2.db ns3/mytest.db # change to test zone, should be IXFR
$RNDCCMD 10.53.0.3 reload
$RNDCCMD 10.53.0.3 reload | sed 's/^/ns3 /' | cat_i
# wait for master to reload zone
for i in 0 1 2 3 4 5 6 7 8 9
@@ -296,7 +296,7 @@ ret=0
# Should be "switch to TCP" response
$DIG $DIGOPTS +notcp ixfr=1 test @10.53.0.4 > dig.out1 || ret=1
$DIG $DIGOPTS ixfr=1 +notcp test @10.53.0.4 > dig.out2 || ret=1
$PERL ../digcomp.pl dig.out1 dig.out2 || ret=1
digcomp dig.out1 dig.out2 || ret=1
awk '$4 == "SOA" { soacnt++} END {if (soacnt == 1) exit(0); else exit(1);}' dig.out1 || ret=1
awk '$4 == "SOA" { if ($7 == 4) exit(0); else exit(1);}' dig.out1 || ret=1
# Should be incremental transfer.