]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Special case tests for lmdb
authorMatthijs Mekking <matthijs@isc.org>
Wed, 9 Dec 2020 13:14:43 +0000 (14:14 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Tue, 19 Jan 2021 09:12:40 +0000 (10:12 +0100)
When compiling BIND 9 without lmdb, this is promoted from
'not operational' to 'not configured', resulting in a failure (and no
longer a warning) if ldmb-related configuration options are set.

Special case certain system tests to avoid test failures on systems
that do not have lmdb.

bin/tests/system/checkconf/lmdb-mapsize-largest.conf [moved from bin/tests/system/checkconf/good-lmdb-mapsize-largest.conf with 100% similarity]
bin/tests/system/checkconf/lmdb-mapsize-smallest.conf [moved from bin/tests/system/checkconf/good-lmdb-mapsize-smallest.conf with 100% similarity]
bin/tests/system/checkconf/tests.sh

index d2350d4e5bdfb51b075436d67a846422040a5f92..47bf31b5d3c314c85e420c93436b568116ee40d6 100644 (file)
@@ -78,6 +78,24 @@ do
        status=`expr $status + $ret`
 done
 
+for lmdb in lmdb-*.conf
+do
+       n=`expr $n + 1`
+       ret=0
+
+       $FEATURETEST --with-lmdb
+       if [ $? -eq 0 ]; then
+               echo_i "checking that named-checkconf detects no error in $lmdb ($n)"
+               $CHECKCONF $lmdb > checkconf.out$n 2>&1
+               if [ $? != 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
+               if [ $? == 0 ]; then echo_i "failed"; ret=1; fi
+       fi
+       status=`expr $status + $ret`
+done
+
 n=`expr $n + 1`
 echo_i "checking that ancient options report a fatal error ($n)"
 ret=0