From: Matthijs Mekking Date: Wed, 9 Dec 2020 13:14:43 +0000 (+0100) Subject: Special case tests for lmdb X-Git-Tag: v9.17.10~31^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=437d271483064deec2f4160c0ebcaea1e8c218be;p=thirdparty%2Fbind9.git Special case tests for lmdb 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. --- diff --git a/bin/tests/system/checkconf/good-lmdb-mapsize-largest.conf b/bin/tests/system/checkconf/lmdb-mapsize-largest.conf similarity index 100% rename from bin/tests/system/checkconf/good-lmdb-mapsize-largest.conf rename to bin/tests/system/checkconf/lmdb-mapsize-largest.conf diff --git a/bin/tests/system/checkconf/good-lmdb-mapsize-smallest.conf b/bin/tests/system/checkconf/lmdb-mapsize-smallest.conf similarity index 100% rename from bin/tests/system/checkconf/good-lmdb-mapsize-smallest.conf rename to bin/tests/system/checkconf/lmdb-mapsize-smallest.conf diff --git a/bin/tests/system/checkconf/tests.sh b/bin/tests/system/checkconf/tests.sh index d2350d4e5bd..47bf31b5d3c 100644 --- a/bin/tests/system/checkconf/tests.sh +++ b/bin/tests/system/checkconf/tests.sh @@ -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