From c0da0675c1727191454d7043b587f276172e7a31 Mon Sep 17 00:00:00 2001 From: Joost Jager Date: Thu, 7 May 2020 22:56:32 +0200 Subject: [PATCH 1/2] itest: add error detection explanation --- lntest/itest/log_check_errors.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lntest/itest/log_check_errors.sh b/lntest/itest/log_check_errors.sh index d8425b47..15296845 100755 --- a/lntest/itest/log_check_errors.sh +++ b/lntest/itest/log_check_errors.sh @@ -2,6 +2,8 @@ BASEDIR=$(dirname "$0") +echo "" + # Filter all log files for errors, substitute variable data and match against whitelist. cat $BASEDIR/*.log | grep "\[ERR\]" | \ sed -r -f $BASEDIR/log_substitutions.txt | \ @@ -9,4 +11,16 @@ sort | uniq | \ grep -Fvi -f $BASEDIR/log_error_whitelist.txt # If something shows up (not on whitelist) exit with error code 1. -test $? -eq 1 +if [[ $? -eq 0 ]]; then + echo "" + echo "In the itest logs, the log line (patterns) above were detected." + echo "[ERR] lines are generally reserved for internal errors." + echo "Resolve the issue by either changing the log level or adding an " + echo "exception to log_error_whitelist.txt" + echo "" + + exit 1 +fi + +echo "No itest errors detected." +echo "" From e1e4c8ef6bd08f4d1718f63e42ef1b93e7e8d508 Mon Sep 17 00:00:00 2001 From: Joost Jager Date: Wed, 6 May 2020 15:57:57 +0200 Subject: [PATCH 2/2] itest: extend whitelist --- lntest/itest/log_error_whitelist.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lntest/itest/log_error_whitelist.txt b/lntest/itest/log_error_whitelist.txt index 272ffef9..0be18e80 100644 --- a/lntest/itest/log_error_whitelist.txt +++ b/lntest/itest/log_error_whitelist.txt @@ -16,6 +16,8 @@