]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Warn when log files grow too big in system tests
authorMichał Kępień <michal@isc.org>
Wed, 28 Apr 2021 05:56:47 +0000 (07:56 +0200)
committerMichał Kępień <michal@isc.org>
Wed, 28 Apr 2021 05:56:47 +0000 (07:56 +0200)
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

index 67185a02aae7244682f88af696bb95f0a6356a3e..3460ede61219622098417ca32f9758fa01023660 100644 (file)
@@ -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