]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove LDMB checks from system tests
authorMatthijs Mekking <matthijs@isc.org>
Wed, 18 Mar 2026 09:42:57 +0000 (10:42 +0100)
committerOndřej Surý <ondrej@sury.org>
Wed, 18 Mar 2026 10:02:33 +0000 (11:02 +0100)
Now that LMDB is required, there is no need to check if the feature is
enabled in the system tests.

bin/tests/system/addzone/tests.sh
bin/tests/system/checkconf/tests.sh
bin/tests/system/feature-test.c
bin/tests/system/isctest/vars/features.py

index 0cf8be2a7537ac51e79ee37106e1753c46790814..9634bd5777f1e23f9e9c33de491cc90e0f493ea1 100755 (executable)
@@ -67,13 +67,11 @@ n=$((n + 1))
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$((status + ret))
 
-if $FEATURETEST --with-lmdb; then
-  echo_i "checking that existing NZF file was renamed after migration ($n)"
-  [ -e ns2/3bf305731dd26307.nzf~ ] || ret=1
-  n=$((n + 1))
-  if [ $ret != 0 ]; then echo_i "failed"; fi
-  status=$((status + ret))
-fi
+echo_i "checking that existing NZF file was renamed after migration ($n)"
+[ -e ns2/3bf305731dd26307.nzf~ ] || ret=1
+n=$((n + 1))
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
 
 echo_i "adding new zone ($n)"
 ret=0
@@ -146,16 +144,6 @@ n=$((n + 1))
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$((status + ret))
 
-if ! $FEATURETEST --with-lmdb; then
-  echo_i "verifying no comments in NZF file ($n)"
-  ret=0
-  hcount=$(grep "^# New zone file for view: _default" ns2/3bf305731dd26307.nzf | wc -l)
-  [ $hcount -eq 0 ] || ret=1
-  n=$((n + 1))
-  if [ $ret != 0 ]; then echo_i "failed"; fi
-  status=$((status + ret))
-fi
-
 echo_i "checking rndc showzone with previously added zone ($n)"
 ret=0
 $RNDCCMD 10.53.0.2 showzone previous.example >rndc.out.ns2.$n
@@ -165,13 +153,11 @@ n=$((n + 1))
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$((status + ret))
 
-if $FEATURETEST --with-lmdb; then
-  echo_i "checking zone is present in NZD ($n)"
-  ret=0
-  $NZD2NZF ns2/_default.nzd | grep previous.example >/dev/null || ret=1
-  if [ $ret != 0 ]; then echo_i "failed"; fi
-  status=$((status + ret))
-fi
+echo_i "checking zone is present in NZD ($n)"
+ret=0
+$NZD2NZF ns2/_default.nzd | grep previous.example >/dev/null || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
 
 echo_i "deleting previously added zone ($n)"
 ret=0
@@ -191,22 +177,10 @@ check_nzd2nzf() (
     && ! grep previous.example nzd2nzf.out.$n >/dev/null
 )
 
-if $FEATURETEST --with-lmdb; then
-  echo_i "checking zone was deleted from NZD ($n)"
-  retry_quiet 10 check_nzd2nzf || ret=1
-  if [ $ret != 0 ]; then echo_i "failed"; fi
-  status=$((status + ret))
-fi
-
-if ! $FEATURETEST --with-lmdb; then
-  echo_i "checking NZF file now has comment ($n)"
-  ret=0
-  hcount=$(grep "^# New zone file for view: _default" ns2/3bf305731dd26307.nzf | wc -l)
-  [ $hcount -eq 1 ] || ret=1
-  n=$((n + 1))
-  if [ $ret != 0 ]; then echo_i "failed"; fi
-  status=$((status + ret))
-fi
+echo_i "checking zone was deleted from NZD ($n)"
+retry_quiet 10 check_nzd2nzf || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
 
 echo_i "deleting newly added zone added.example ($n)"
 ret=0
@@ -526,24 +500,12 @@ n=$((n + 1))
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$((status + ret))
 
-if ! $FEATURETEST --with-lmdb; then
-  echo_i "checking new NZF file has comment ($n)"
-  ret=0
-  hcount=$(grep "^# New zone file for view: external" ns2/external.nzf | wc -l)
-  [ $hcount -eq 1 ] || ret=1
-  n=$((n + 1))
-  if [ $ret != 0 ]; then echo_i "failed"; fi
-  status=$((status + ret))
-fi
-
-if $FEATURETEST --with-lmdb; then
-  echo_i "verifying added.example in external view created an external.nzd DB ($n)"
-  ret=0
-  [ -e ns2/external.nzd ] || ret=1
-  n=$((n + 1))
-  if [ $ret != 0 ]; then echo_i "failed"; fi
-  status=$((status + ret))
-fi
+echo_i "verifying added.example in external view created an external.nzd DB ($n)"
+ret=0
+[ -e ns2/external.nzd ] || ret=1
+n=$((n + 1))
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
 
 echo_i "checking rndc reload causes named to reload the external view's new zone config ($n)"
 ret=0
@@ -562,11 +524,7 @@ status=$((status + ret))
 
 echo_i "checking rndc showzone with newly added zone ($n)"
 _check_rndc_showzone_newly_added() (
-  if ! $FEATURETEST --with-lmdb; then
-    expected='zone "added.example" in external { type primary; file "added.db"; };'
-  else
-    expected='zone "added.example" { type primary; file "added.db"; };'
-  fi
+  expected='zone "added.example" { type primary; file "added.db"; };'
   $RNDCCMD 10.53.0.2 showzone added.example in external >rndc.out.ns2.$n 2>/dev/null \
     && [ "$(cat rndc.out.ns2.$n)" = "$expected" ]
 )
@@ -668,13 +626,8 @@ n=$((n + 1))
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$((status + ret))
 
-if $FEATURETEST --with-lmdb; then
-  echo_i "checking NZD file was created in new-zones-directory ($n)"
-  expect=ns2/new-zones/directory.nzd
-else
-  echo_i "checking NZF file was created in new-zones-directory ($n)"
-  expect=ns2/new-zones/directory.nzf
-fi
+echo_i "checking NZD file was created in new-zones-directory ($n)"
+expect=ns2/new-zones/directory.nzd
 $RNDCCMD 10.53.0.2 sync 'added.example IN directory' 2>&1 | sed 's/^/I:ns2 /'
 sleep 2
 [ -e "$expect" ] || ret=1
@@ -710,19 +663,6 @@ n=$((n + 1))
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$((status + ret))
 
-if ! $FEATURETEST --with-lmdb; then
-  echo_i "check that addzone is fully reversed on failure (--with-lmdb=no) ($n)"
-  ret=0
-  $RNDCCMD 10.53.0.3 addzone "test1.baz" '{ type primary; file "e.db"; };' >/dev/null 2>&1 || ret=1
-  $RNDCCMD 10.53.0.3 addzone "test2.baz" '{ type primary; file "dne.db"; };' >/dev/null 2>&1 && ret=1
-  $RNDCCMD 10.53.0.3 addzone "test3.baz" '{ type primary; file "e.db"; };' >/dev/null 2>&1 || ret=1
-  $RNDCCMD 10.53.0.3 delzone "test3.baz" >/dev/null 2>&1 || ret=1
-  grep test2.baz ns3/_default.nzf >/dev/null && ret=1
-  n=$((n + 1))
-  if [ $ret != 0 ]; then echo_i "failed"; fi
-  status=$((status + ret))
-fi
-
 _check_version_bind() (
   $DIG $DIGOPTS @10.53.0.3 version.bind txt ch >dig.out.test$n \
     && grep "status: NOERROR" dig.out.test$n >/dev/null
index a1f6a7430f3da8646f955fd2d3e63a941a7e318f..69d96b7ea86b348248c9b11c00a22e7b3bfdacc3 100644 (file)
@@ -109,26 +109,14 @@ for lmdb in lmdb-*.conf; do
   n=$((n + 1))
   ret=0
 
-  if $FEATURETEST --with-lmdb; then
-    echo_i "checking that named-checkconf detects no error in $lmdb ($n)"
-    {
-      $CHECKCONF $lmdb >checkconf.out$n 2>&1
-      rc=$?
-    } || true
-    if [ $rc -ne 0 ]; then
-      echo_i "failed"
-      ret=1
-    fi
-  else
-    echo_i "checking that named-checkconf detects error in $lmdb ($n)"
-    {
-      $CHECKCONF $lmdb >checkconf.out$n 2>&1
-      rc=$?
-    } || true
-    if [ $rc -eq 0 ]; then
-      echo_i "failed"
-      ret=1
-    fi
+  echo_i "checking that named-checkconf detects no error in $lmdb ($n)"
+  {
+    $CHECKCONF $lmdb >checkconf.out$n 2>&1
+    rc=$?
+  } || true
+  if [ $rc -ne 0 ]; then
+    echo_i "failed"
+    ret=1
   fi
   status=$((status + ret))
 done
index b0527c5fd7a9e4639a0531a18acca7a7ce637df8..feebe0315d288b4b54d904a22e5984c7d0b72c7f 100644 (file)
@@ -56,7 +56,6 @@ usage(void) {
        fprintf(stderr, "\t--rsasha1\n");
        fprintf(stderr, "\t--tsan\n");
        fprintf(stderr, "\t--with-libidn2\n");
-       fprintf(stderr, "\t--with-lmdb\n");
        fprintf(stderr, "\t--with-libnghttp2\n");
        fprintf(stderr, "\t--with-zlib\n");
 }
@@ -221,10 +220,6 @@ main(int argc, char **argv) {
 #endif /* ifdef HAVE_LIBIDN2 */
        }
 
-       if (strcmp(argv[1], "--with-lmdb") == 0) {
-               return 0;
-       }
-
        if (strcmp(argv[1], "--with-libnghttp2") == 0) {
 #ifdef HAVE_LIBNGHTTP2
                return 0;
index 4c47efa00d4be426741e81db407b1d2384443df8..3ebb0863a84a7c141afd26a29bd94c4a237a8dea 100644 (file)
@@ -26,7 +26,6 @@ FEATURES = {
     "LIBIDN2": "--with-libidn2",
     "LIBNGHTTP2": "--with-libnghttp2",
     "LIBXML2": "--have-libxml2",
-    "LMDB": "--with-lmdb",
     "MD5": "--md5",
     "QUERYTRACE": "--enable-querytrace",
     "RSASHA1": "--rsasha1",