]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Accept either 2 or 3 old versions of log file
authorMark Andrews <marka@isc.org>
Thu, 21 Oct 2021 06:22:58 +0000 (17:22 +1100)
committerMatthijs Mekking <matthijs@isc.org>
Tue, 28 Mar 2023 10:03:33 +0000 (10:03 +0000)
Depending upon when the directory is sampled there may be 2
(oldest version removed and rename / reopen is in progresss) or
3 old versions of the log file.

(cherry picked from commit f485bb19c081df368cd39ca81ca1a578b5502dc5)

bin/tests/system/logfileconfig/tests.sh

index 11ade7df6edc207d7ec7f01f982dccb099bb5183..2cfb558316e027c7a2ed9dbb5b9e800ecb860368 100644 (file)
@@ -203,11 +203,11 @@ _found2() (
 
         # we are configured to keep three versions, so the oldest
         # timestamped versions should be gone, and there should
-        # be two new ones.
+        # be two or three backup ones.
         [ -f ns1/named_ts.1480039317 ] && return 1
         [ -f ns1/named_ts.20150101120000120 ] && return 1
         set -- ns1/named_ts.*
-        [ "$#" -eq 2 ] || return 1
+        [ "$#" -eq 2 -o "$#" -eq 3 ] || return 1
 )
 retry_quiet 5 _found2 || ret=1
 if [ "$ret" -ne 0 ]; then echo_i "failed"; fi