summaryrefslogtreecommitdiffstats
path: root/test/simulation/143-manual
blob: 618cee6db69537e534f980e306d3e0f5fa021b1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/env bash

. ./test.common

export TZ=UTC

test_start "manual input"

check_config_h 'FEAT_CMDMON 1' || test_skip

limit=$[12 * 3600]
client_server_conf=" "
client_conf="manual"
chronyc_conf="timeout 4000000
settime 1:00:00
settime 2:00:00
settime 3:00:00
settime 4:00:00
manual delete 2
settime 6:00:00
manual list
settime 8:00:00
manual reset
settime 10:00:00
manual list"
chronyc_start=1800
base_delay=1800
jitter=1e-6

time_max_limit=4e-3
freq_max_limit=4e-3
time_rms_limit=2e-3
freq_rms_limit=2e-5
min_sync_time=7204
max_sync_time=7206

run_test || test_fail
check_chronyd_exit || test_fail
check_sync || test_fail

check_chronyc_output "^200 OK
Clock was 0\.4. seconds fast\.  Frequency change = 0\.00ppm, new frequency = 0\.00ppm
200 OK
Clock was 0\.3. seconds fast\.  Frequency change = (99|100)\...ppm, new frequency = (99|100)\...ppm
200 OK
Clock was \-?0\.0. seconds fast\.  Frequency change = \-?0\.[01].ppm, new frequency = (99|100)\...ppm
200 OK
Clock was \-?0\.0. seconds fast\.  Frequency change = \-?0\.[01].ppm, new frequency = (99|100)\...ppm
200 OK
200 OK
Clock was \-?0\.0. seconds fast\.  Frequency change = \-?0\.[012].ppm, new frequency = (99|100)\...ppm
210 n_samples = 4
#    Date     Time\(UTC\)    Slewed   Original   Residual
=======================================================
 0 2010-01-01 (00:59:59|01:00:00)      [- ]0\.00       0\.46      [- ]0\.00
 1 2010-01-01 (01:59:59|02:00:00)      [- ]0\.00       0\.36      [- ]0\.00
 2 2010-01-01 (03:59:59|04:00:00)      [- ]0\.00      [- ]0\.00      [- ]0\.00
 3 2010-01-01 (05:59:59|06:00:00)      [- ]0\.00      [- ]0\.00      [- ]0\.00
200 OK
Clock was \-?0\.0. seconds fast\.  Frequency change = \-?0\.[012].ppm, new frequency = (99|100)\...ppm
200 OK
200 OK
Clock was \-?0\.0. seconds fast\.  Frequency change = \-?0\.00ppm, new frequency = (99|100)\...ppm
210 n_samples = 1
#    Date     Time\(UTC\)    Slewed   Original   Residual
=======================================================
 0 2010-01-01 (09:59:59|10:00:00)      [- ]0\.00      [- ]0\.00      [- ]0\.00$" \
	|| test_fail

test_pass