"Fossies" - the Fresh Open Source Software Archive

Member "chrony-3.5/test/simulation/104-driftfile" (10 May 2019, 466 Bytes) of package /linux/misc/chrony-3.5.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/bash
    2 
    3 . ./test.common
    4 test_start "driftfile directive"
    5 
    6 servers=0
    7 time_offset=0.0
    8 wander=0.0
    9 limit=10
   10 freq_max_limit=1e-9
   11 min_sync_time=1
   12 max_sync_time=1
   13 client_conf="driftfile tmp/drift"
   14 
   15 for freq_offset in -5e-2 -5e-4 -5e-6 5e-6 5e-4 5e-2; do
   16     awk "BEGIN {printf \"%.9e 1\", 1e6 - 1 / (1 + $freq_offset) * 1e6}" > tmp/drift
   17     run_test || test_fail
   18     check_chronyd_exit || test_fail
   19     check_packet_interval || test_fail
   20     check_sync || test_fail
   21 done
   22 
   23 test_pass