From fd9e956d271aada69e53f1b437a68224ee470365 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 6 Aug 2024 10:45:55 +0200 Subject: [PATCH] test: extend 008-confload test --- test/system/008-confload | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/test/system/008-confload b/test/system/008-confload index 7e80698..b978c19 100755 --- a/test/system/008-confload +++ b/test/system/008-confload @@ -77,7 +77,32 @@ check_chronyc_output "^[^=]* .. 127\.123\.5\.3 *[05] 7 [^^]* .. 127\.123\.5\.6 [^^]*$" || test_fail +run_chronyc "reload sources" || test_fail +run_chronyc "reload sources" || test_fail + +rm $TEST_DIR/conf5.d/{3,5,6}.sources +echo "server 127.123.5.7" > $TEST_DIR/conf5.d/7.sources + +run_chronyc "reload sources" || test_fail + +run_chronyc "sources" || test_fail +check_chronyc_output "^[^=]* +=* +.. 127\.123\.1\.1 [^^]* +.. 127\.123\.1\.3 [^^]* +.. 127\.123\.1\.4 [^^]* +.. 127\.123\.3\.1 [^^]* +.. 127\.123\.2\.2 [^^]* +.. 127\.123\.2\.3 [^^]* +.. 127\.123\.4\.4 [^^]* +.. 127\.123\.1\.2 *[05] 6 [^^]* +.. 127\.123\.5\.2 *[05] 5 [^^]* +.. 127\.123\.5\.7 [^^]*$" || test_fail + +run_chronyc "reload sources" || test_fail + stop_chronyd || test_fail -check_chronyd_message_count "Could not add source" 1 1 || 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 test_pass