diff --git a/conf.c b/conf.c index f18dfa9..858099f 100644 --- a/conf.c +++ b/conf.c @@ -1751,7 +1751,7 @@ reload_source_dirs(void) if (s == NSR_UnresolvedName) { unresolved++; - } else if (s != NSR_Success) { + } else if (s != NSR_Success && (d > 0 || s != prev_sources[i].status)) { LOG(LOGS_ERR, "Could not add source %s : %s", source->params.name, NSR_StatusToString(s)); } diff --git a/test/system/008-confload b/test/system/008-confload index b978c19..b107d70 100755 --- a/test/system/008-confload +++ b/test/system/008-confload @@ -102,7 +102,7 @@ check_chronyc_output "^[^=]* run_chronyc "reload sources" || test_fail stop_chronyd || test_fail -check_chronyd_message_count "Could not add source.*\.5\.5.*in use" 3 3 || test_fail -check_chronyd_message_count "Could not add source" 3 3 || test_fail +check_chronyd_message_count "Could not add source.*\.5\.5.*in use" 1 1 || test_fail +check_chronyd_message_count "Could not add source" 1 1 || test_fail test_pass