mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 05:15:06 -05:00
test: ensure awk commands in 008-ntpera return an integer
Some awk interpreters (e.g. mawk) print long integers in exponential notation skewing the test result.
This commit is contained in:
committed by
Miroslav Lichvar
parent
2ac2247756
commit
b61cbed689
@@ -29,7 +29,7 @@ echo "$ntp_start" | grep -q '-' && test_skip
|
|||||||
|
|
||||||
for time_offset in -1e-1 1e-1; do
|
for time_offset in -1e-1 1e-1; do
|
||||||
for start_offset in 0 "2^32 - $limit"; do
|
for start_offset in 0 "2^32 - $limit"; do
|
||||||
export CLKNETSIM_START_DATE=$(awk "BEGIN {print $ntp_start + $start_offset}")
|
export CLKNETSIM_START_DATE=$(awk "BEGIN {printf \"%.0f\", $ntp_start + $start_offset}")
|
||||||
run_test || test_fail
|
run_test || test_fail
|
||||||
check_chronyd_exit || test_fail
|
check_chronyd_exit || test_fail
|
||||||
check_source_selection || test_fail
|
check_source_selection || test_fail
|
||||||
@@ -38,7 +38,7 @@ for time_offset in -1e-1 1e-1; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
for start_offset in -$limit "2^32"; do
|
for start_offset in -$limit "2^32"; do
|
||||||
export CLKNETSIM_START_DATE=$(awk "BEGIN {print $ntp_start + $start_offset}")
|
export CLKNETSIM_START_DATE=$(awk "BEGIN {printf \"%.0f\", $ntp_start + $start_offset}")
|
||||||
run_test || test_fail
|
run_test || test_fail
|
||||||
check_chronyd_exit || test_fail
|
check_chronyd_exit || test_fail
|
||||||
check_source_selection || test_fail
|
check_source_selection || test_fail
|
||||||
|
|||||||
Reference in New Issue
Block a user