]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Clean up keys directory in checkconf test
authorTom Krizek <tkrizek@isc.org>
Mon, 24 Jul 2023 16:35:13 +0000 (18:35 +0200)
committerTom Krizek <tkrizek@isc.org>
Tue, 25 Jul 2023 07:19:55 +0000 (09:19 +0200)
The keys directory should be cleaned up in clean.sh. Doing that in the
test itself isn't reliable which may lead to failing mkdir which causes
the test to fail with set -e.

bin/tests/system/checkconf/clean.sh
bin/tests/system/checkconf/tests.sh

index 3b424be321cfb5732e4a6a6efae2d5cf18fd0073..088c2f4731a6548b6aaedac15dc770f45fddcaf9 100644 (file)
@@ -22,5 +22,6 @@ rm -f diff.out*
 rm -f good-kasp.conf.in
 rm -f good-server-christmas-tree.conf
 rm -f good.conf good.conf.raw good.conf.out badzero.conf *.out
+rm -rf keys
 rm -f ns*/named.lock
 rm -rf test.keydir
index f21746f0e1f39a0941a72d6afba77026782d17ef..6c18835c1605481cdd98240f247c33ef3b669766 100644 (file)
@@ -18,7 +18,7 @@ set -e
 status=0
 n=0
 
-mkdir keys
+mkdir -p keys
 
 n=$((n + 1))
 echo_i "checking that named-checkconf handles a known good config ($n)"
@@ -619,7 +619,5 @@ grep -F "warning: ownername 'foo.*.check-wildcard' contains an non-terminal wild
 if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=$((status + ret))
 
-rmdir keys
-
 echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1