diff --git a/Makefile b/Makefile index a36999c3d..dedcc1730 100644 --- a/Makefile +++ b/Makefile @@ -143,6 +143,7 @@ check: unit itest itest-only: @$(call print, "Running integration tests with ${backend} backend.") $(ITEST) + lntest/itest/log_check_errors.sh itest: btcd build-itest itest-only diff --git a/fundingmanager.go b/fundingmanager.go index ae4c1f934..6ae890c4a 100644 --- a/fundingmanager.go +++ b/fundingmanager.go @@ -2725,8 +2725,9 @@ func (f *fundingManager) handleFundingLocked(fmsg *fundingLockedMsg) { if err := fmsg.peer.AddNewChannel(channel, f.quit); err != nil { fndgLog.Errorf("Unable to add new channel %v with peer %x: %v", + channel.FundingOutpoint, fmsg.peer.IdentityKey().SerializeCompressed(), - channel.FundingOutpoint, err) + err) } } diff --git a/lntest/itest/log_check_errors.sh b/lntest/itest/log_check_errors.sh new file mode 100755 index 000000000..80d6a07d3 --- /dev/null +++ b/lntest/itest/log_check_errors.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +BASEDIR=$(dirname "$0") + +# 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 | \ +sort | uniq | \ +grep -Fv -f $BASEDIR/log_error_whitelist.txt + +# If something shows up (not on whitelist) exit with error code 1. +test $? -eq 1 diff --git a/lntest/itest/log_error_whitelist.txt b/lntest/itest/log_error_whitelist.txt new file mode 100644 index 000000000..171560008 --- /dev/null +++ b/lntest/itest/log_error_whitelist.txt @@ -0,0 +1,158 @@ +