From: Michał Kępień Date: Wed, 28 Apr 2021 05:56:47 +0000 (+0200) Subject: Warn when log files grow too big in system tests X-Git-Tag: v9.17.13~38^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=241e85ef0c2d9ce71aecb13357369b5e92250aa0;p=thirdparty%2Fbind9.git 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. --- diff --git a/bin/tests/system/run.sh.in b/bin/tests/system/run.sh.in index 67185a02aae..3460ede6121 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