]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
test: add 152-maxtxbuffers test
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 18 Nov 2025 15:47:32 +0000 (16:47 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 18 Nov 2025 15:47:32 +0000 (16:47 +0100)
test/simulation/152-maxtxbuffers [new file with mode: 0755]

diff --git a/test/simulation/152-maxtxbuffers b/test/simulation/152-maxtxbuffers
new file mode 100755 (executable)
index 0000000..fd45a6a
--- /dev/null
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+
+. ./test.common
+
+test_start "maxtxbuffers directive"
+
+check_config_h 'FEAT_DEBUG 1' || test_skip
+check_config_h 'HAVE_LINUX_TIMESTAMPING 1' || test_skip
+
+server_conf="maxtxbuffers 4"
+client_conf="maxtxbuffers 4
+logdir tmp
+log measurements"
+server_chronyd_options="-d"
+client_chronyd_options="-d"
+
+run_test || test_fail
+
+check_chronyd_exit || test_fail
+check_source_selection || test_fail
+check_packet_interval || test_fail
+check_sync || test_fail
+
+check_log_messages "Transmit ID not supported" 0 0 || test_skip
+check_log_messages "maxtxbuffers too small" 0 0 || test_fail
+check_log_messages "Found saved message" 30 60 || test_fail
+check_file_messages "111 111 1111.* 4B K K\$" 30 60 measurements.log || test_fail
+check_file_messages "111 111 1111.* 4B [^K] .\$" 0 0 measurements.log || test_fail
+
+test_pass