From 437d271483064deec2f4160c0ebcaea1e8c218be Mon Sep 17 00:00:00 2001 From: Matthijs Mekking Date: Wed, 9 Dec 2020 14:14:43 +0100 Subject: [PATCH] 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. --- ...-largest.conf => lmdb-mapsize-largest.conf} | 0 ...mallest.conf => lmdb-mapsize-smallest.conf} | 0 bin/tests/system/checkconf/tests.sh | 18 ++++++++++++++++++ 3 files changed, 18 insertions(+) rename bin/tests/system/checkconf/{good-lmdb-mapsize-largest.conf => lmdb-mapsize-largest.conf} (100%) rename bin/tests/system/checkconf/{good-lmdb-mapsize-smallest.conf => lmdb-mapsize-smallest.conf} (100%) 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 d2350d4e5b..47bf31b5d3 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