]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix timing issues in catz test
authorWitold Kręcicki <wpk@culm.net>
Thu, 14 Nov 2019 11:57:18 +0000 (12:57 +0100)
committerMichał Kępień <michal@isc.org>
Wed, 8 Jan 2020 14:19:17 +0000 (15:19 +0100)
Make the log checks more precise and use the retry() function for
repeating the checks.

(cherry picked from commit 9b43e65c01174aa86ff8ff95b5cc1ee961618a7b)

bin/tests/system/catz/tests.sh

index 01f2bf45803958b55d7bfadc47c3a3e6fc400690..01585c3eeb364d63abd9ad0e0c4594f50e3b7fed 100644 (file)
@@ -122,7 +122,7 @@ try=0
 while test $try -lt 45
 do
     sleep 1
-    sed -n "$cur,"'$p' < ns2/named.run | grep "catz: deleting zone 'dom1.example' from catalog 'catalog1.example'" > /dev/null && {
+    sed -n "$cur,"'$p' < ns2/named.run | grep "zone_shutdown: zone dom1.example/IN: shutting down" > /dev/null && {
        ret=0
        break
     }
@@ -417,7 +417,7 @@ try=0
 while test $try -lt 45
 do
     sleep 1
-    sed -n "$cur,"'$p' < ns2/named.run | grep "catz: deleting zone 'dom5.example' from catalog 'catalog1.example'" > /dev/null && {
+    sed -n "$cur,"'$p' < ns2/named.run | grep "zone_shutdown: zone dom5.example/IN: shutting down" > /dev/null && {
        ret=0
        break
     }
@@ -514,7 +514,7 @@ try=0
 while test $try -lt 45
 do
     sleep 1
-    sed -n "$cur,"'$p' < ns2/named.run | grep "catz: deleting zone 'dom6.example' from catalog 'catalog1.example'" > /dev/null && {
+    sed -n "$cur,"'$p' < ns2/named.run | grep "zone_shutdown: zone dom6.example/IN: shutting down" > /dev/null && {
        ret=0
        break
     }
@@ -594,7 +594,7 @@ try=0
 while test $try -lt 45
 do
     sleep 1
-    sed -n "$cur,"'$p' < ns2/named.run | grep "catz: deleting zone 'dom6.example' from catalog 'catalog1.example'" > /dev/null && {
+    sed -n "$cur,"'$p' < ns2/named.run | grep "catz: deleting zone 'dom6.example' from catalog 'catalog1.example' - success" > /dev/null && {
        ret=0
        break
     }
@@ -914,7 +914,7 @@ try=0
 while test $try -lt 45
 do
     sleep 1
-    sed -n "$cur,"'$p' < ns2/named.run | grep "catz: deleting zone 'dom9.example' from catalog 'catalog1.example'" > /dev/null && {
+    sed -n "$cur,"'$p' < ns2/named.run | grep "catz: deleting zone 'dom9.example' from catalog 'catalog1.example' - success" > /dev/null && {
        ret=0
        break
     }
@@ -1105,7 +1105,7 @@ try=0
 while test $try -lt 45
 do
     sleep 1
-    sed -n "$cur,"'$p' < ns2/named.run | grep "catz: deleting zone 'this.is.a.very.very.long.long.long.domain.that.will.cause.catalog.zones.to.generate.hash.instead.of.using.regular.filename.dom10.example' from catalog 'catalog1.example'" > /dev/null && {
+    sed -n "$cur,"'$p' < ns2/named.run | grep "zone_shutdown: zone this.is.a.very.very.long.long.long.domain.that.will.cause.catalog.zones.to.generate.hash.instead.of.using.regular.filename.dom10.example/IN: shutting down" > /dev/null && {
        ret=0
        break
     }
@@ -1309,7 +1309,7 @@ try=0
 while test $try -lt 45
 do
     sleep 1
-    sed -n "$cur,"'$p' < ns2/named.run | grep "catz: deleting zone 'dom11.example' from catalog 'catalog1.example'" > /dev/null && {
+    sed -n "$cur,"'$p' < ns2/named.run | grep "zone_shutdown: zone dom11.example/IN: shutting down" > /dev/null && {
        ret=0
        break
     }
@@ -1352,7 +1352,7 @@ try=0
 while test $try -lt 45
 do
     sleep 1
-    sed -n "$cur,"'$p' < ns2/named.run | grep "catz: deleting zone 'subdomain.of.dom11.example' from catalog 'catalog1.example'" > /dev/null && {
+    sed -n "$cur,"'$p' < ns2/named.run | grep "zone_shutdown: zone subdomain.of.dom11.example/IN: shutting down" > /dev/null && {
        ret=0
        break
     }