From 241e85ef0c2d9ce71aecb13357369b5e92250aa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Wed, 28 Apr 2021 07:56:47 +0200 Subject: [PATCH] Warn when log files grow too big in system tests Exerting excessive I/O load on the host running system tests should be avoided in order to limit the number of false positives reported by the system test suite. In some cases, running named with "-d 99" (which is the default for system tests) results in a massive amount of logs being generated, most of which are useless. Implement a log file size check to draw developers' attention to overly verbose named instances used in system tests. The warning threshold of 200,000 lines was chosen arbitrarily. --- bin/tests/system/run.sh.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/tests/system/run.sh.in b/bin/tests/system/run.sh.in index 67185a02aa..3460ede612 100644 --- a/bin/tests/system/run.sh.in +++ b/bin/tests/system/run.sh.in @@ -321,6 +321,11 @@ else fi fi +NAMED_RUN_LINES_THRESHOLD=200000 +find "${systest}" -type f -name "named.run" -exec wc -l {} \; | awk "\$1 > ${NAMED_RUN_LINES_THRESHOLD} { print \$2 }" | sort | while read -r LOG_FILE; do + echowarn "I:${systest}:${LOG_FILE} contains more than ${NAMED_RUN_LINES_THRESHOLD} lines, consider tweaking the test to limit disk I/O" +done + echoend "E:$systest:$(date_with_args)" exit $status