]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
capture named-journalprint output
authorMark Andrews <marka@isc.org>
Tue, 25 Feb 2020 01:17:11 +0000 (12:17 +1100)
committerMark Andrews <marka@isc.org>
Thu, 27 Feb 2020 23:14:02 +0000 (10:14 +1100)
(cherry picked from commit 88c828cb9ff876319f01ce37d26ad4a052201ec5)

bin/tests/system/inline/tests.sh

index 163277182192652b16b7c38fc7a6e4ab4c092c08..9cbae0e494b4f84d9407efc0a0c39cc14f52c502 100755 (executable)
@@ -418,7 +418,8 @@ status=`expr $status + $ret`
 n=`expr $n + 1`
 echo_i "checking master zone that was updated while offline is correct ($n)"
 ret=0
-serial=`$DIG $DIGOPTS +nodnssec +short @10.53.0.3 updated SOA | awk '{print $3}'`
+$DIG $DIGOPTS +nodnssec +short @10.53.0.3 updated SOA >dig.out.ns2.soa.test$n
+serial=`awk '{print $3}' dig.out.ns2.soa.test$n`
 # serial should have changed
 [ "$serial" = "2000042407" ] && ret=1
 # e.updated should exist and should be signed
@@ -429,9 +430,10 @@ grep "ANSWER: 2," dig.out.ns3.test$n > /dev/null || ret=1
 # of master2.db, and should show a minimal diff: no more than 8 added
 # records (SOA/RRSIG, 2 x NSEC/RRSIG, A/RRSIG), and 4 removed records
 # (SOA/RRSIG, NSEC/RRSIG).
-serial=`$JOURNALPRINT ns3/updated.db.signed.jnl | head -1 | awk '{print $4}'`
+$JOURNALPRINT ns3/updated.db.signed.jnl >journalprint.out.test$n
+serial=`awk '/Source serial =/ {print $4}' journalprint.out.test$n`
 [ "$serial" = "2000042408" ] || ret=1
-diffsize=`$JOURNALPRINT ns3/updated.db.signed.jnl | wc -l`
+diffsize=`wc -l < journalprint.out.test$n`
 [ "$diffsize" -le 13 ] || ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`