Update nsupdate test

The nsupdate system test did not record failures from the
'update_test.pl' Perl script. This was because the 'ret' value was
not being saved outside the '{ $PERL ... || ret=1 } cat_i' scope.

Change this piece to store the output in a separate file and then
cat its contents. Now the 'ret' value is being saved.

Also record failures in 'update_test.pl' if sending the update
failed.

Add missing 'n' incrementals to 'nsupdate/test.sh' to keep track of
test numbers.
This commit is contained in:
Matthijs Mekking
2021-04-30 11:03:46 +02:00
parent 9d04a731ba
commit 5b31811b5f
3 changed files with 30 additions and 16 deletions

View File

@@ -58,7 +58,7 @@ sub assert {
my ($cond, $explanation) = @_;
if (!$cond) {
print "Test Failed: $explanation ***\n";
$failures++
$failures++;
}
}
@@ -79,6 +79,7 @@ sub test {
assert($rcode eq $expected, "expected $expected, got $rcode");
} else {
print "Update failed: ", $res->errorstring, "\n";
$failures++;
}
}