From c2e60f9a5ada0b220cf3cff8264a1eef1ca262e2 Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Tue, 18 Mar 2025 16:10:49 +0100 Subject: [PATCH] Fix the log-report-channel zones check The check looks for logs that are not present, fails to make the possible failure visible, and fails to bump the check enumerator: I:checking that log-report-channel zones fail if '*._er/TXT' is missing (129) grep: test.out4.129: No such file or directory grep: test.out4.129: No such file or directory I:checking that raw zone with bad class is handled (129) --- bin/tests/system/checkzone/tests.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/tests/system/checkzone/tests.sh b/bin/tests/system/checkzone/tests.sh index 928ff0075d..db9b570654 100644 --- a/bin/tests/system/checkzone/tests.sh +++ b/bin/tests/system/checkzone/tests.sh @@ -131,11 +131,13 @@ status=$((status + ret)) echo_i "checking that log-report-channel zones fail if '*._er/TXT' is missing ($n)" ret=0 $CHECKZONE -R fail example zones/er.db >test.out2.$n 2>&1 || ret=1 -grep -F "no '*._er/TXT' wildcard found" test.out4.$n >/dev/null && ret=1 +grep -F "no '*._er/TXT' wildcard found" test.out2.$n >/dev/null && ret=1 $CHECKZONE example zones/er-missing.db >test.out3.$n 2>&1 || ret=1 -grep -F "no '*._er/TXT' wildcard found" test.out4.$n >/dev/null && ret=1 +grep -F "no '*._er/TXT' wildcard found" test.out3.$n >/dev/null && ret=1 $CHECKZONE -R fail example zones/er-missing.db >test.out4.$n 2>&1 && ret=1 grep -F "no '*._er/TXT' wildcard found" test.out4.$n >/dev/null || ret=1 +n=$((n + 1)) +if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status + ret)) echo_i "checking that raw zone with bad class is handled ($n)"