From: Mark Andrews Date: Tue, 4 May 2021 07:55:49 +0000 (+1000) Subject: Check journal compaction X-Git-Tag: v9.17.13~12^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ae1ae07b03dd2ab9ba64931adbd4ae78b221338f;p=thirdparty%2Fbind9.git Check journal compaction --- diff --git a/bin/tests/system/journal/clean.sh b/bin/tests/system/journal/clean.sh index 189a5023c84..dc275f43917 100644 --- a/bin/tests/system/journal/clean.sh +++ b/bin/tests/system/journal/clean.sh @@ -14,3 +14,4 @@ rm -f */named.run rm -f dig.out* rm -f journalprint.out.* rm -f ns1/managed-keys.bind +rm -f tmp.jnl diff --git a/bin/tests/system/journal/tests.sh b/bin/tests/system/journal/tests.sh index acb6ad08e1f..3c20925dbc3 100644 --- a/bin/tests/system/journal/tests.sh +++ b/bin/tests/system/journal/tests.sh @@ -156,6 +156,32 @@ c2=$(cat -v ns1/*.jnl | grep -c "BIND LOG V9.2") [ $ret -eq 0 ] || echo_i "failed" status=`expr $status + $ret` +n=`expr $n + 1` +echo_i "Check that journal with mixed headers can be compacted (version 1,2,1,2) ($n)" +ret=0 +journal=ns1/d1212.jnl.saved +seriallist=$($JOURNALPRINT -x $journal | awk '$1 == "Transaction:" { print $11 }') +for serial in $seriallist +do + cp $journal tmp.jnl + $JOURNALPRINT -c $serial tmp.jnl || ret=1 +done +[ $ret -eq 0 ] || echo_i "failed" +status=`expr $status + $ret` + +n=`expr $n + 1` +echo_i "Check that journal with mixed headers can be compacted (version 2,1,2,1) ($n)" +ret=0 +journal=ns1/d2121.jnl.saved +seriallist=$($JOURNALPRINT -x $journal | awk '$1 == "Transaction:" { print $11 }') +for serial in $seriallist +do + cp ns1/d1212.jnl.saved tmp.jnl + $JOURNALPRINT -c $serial tmp.jnl || ret=1 +done +[ $ret -eq 0 ] || echo_i "failed" +status=`expr $status + $ret` + n=`expr $n + 1` echo_i "check upgrade of managed-keys.bind.jnl succeeded($n)" ret=0