forked from pool/chrony
Accepting request 774160 from network:time
OBS-URL: https://build.opensuse.org/request/show/774160 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/chrony?expand=0&rev=22
This commit is contained in:
commit
1a0485a01b
41
chrony-test-fix-util-unit-test-for-NTP-era-split.patch
Normal file
41
chrony-test-fix-util-unit-test-for-NTP-era-split.patch
Normal file
@ -0,0 +1,41 @@
|
||||
From 2d9eb5b6fa5225a7300c8eed95712969249900fb Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Lichvar <mlichvar@redhat.com>
|
||||
Date: Fri, 3 Jan 2020 11:25:55 +0100
|
||||
Subject: [PATCH] test: fix util unit test for NTP era split
|
||||
|
||||
The current default NTP era split passed the Unix epoch (~50 years ago),
|
||||
which means the epoch converted to an NTP timestamp and back ends up in
|
||||
the next NTP era (year 2106).
|
||||
|
||||
Fix the test to take into account the era split.
|
||||
---
|
||||
test/unit/util.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/test/unit/util.c b/test/unit/util.c
|
||||
index f4d9f33..af9e90c 100644
|
||||
--- a/test/unit/util.c
|
||||
+++ b/test/unit/util.c
|
||||
@@ -100,11 +100,19 @@ void test_unit(void) {
|
||||
ntp_ts.hi = htonl(JAN_1970);
|
||||
ntp_ts.lo = 0xffffffff;
|
||||
UTI_Ntp64ToTimespec(&ntp_ts, &ts);
|
||||
+#if defined(HAVE_LONG_TIME_T) && NTP_ERA_SPLIT > 0
|
||||
+ TEST_CHECK(ts.tv_sec == 0x100000000LL * (1 + (NTP_ERA_SPLIT - 1) / 0x100000000LL));
|
||||
+#else
|
||||
TEST_CHECK(ts.tv_sec == 0);
|
||||
+#endif
|
||||
TEST_CHECK(ts.tv_nsec == 999999999);
|
||||
|
||||
UTI_AddDoubleToTimespec(&ts, 1e-9, &ts);
|
||||
+#if defined(HAVE_LONG_TIME_T) && NTP_ERA_SPLIT > 0
|
||||
+ TEST_CHECK(ts.tv_sec == 1 + 0x100000000LL * (1 + (NTP_ERA_SPLIT - 1) / 0x100000000LL));
|
||||
+#else
|
||||
TEST_CHECK(ts.tv_sec == 1);
|
||||
+#endif
|
||||
TEST_CHECK(ts.tv_nsec == 0);
|
||||
|
||||
ntp_fuzz.hi = 0;
|
||||
--
|
||||
2.25.0
|
||||
|
30
chrony-test-update-processing-of-packet-log.patch
Normal file
30
chrony-test-update-processing-of-packet-log.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From 62d6aed6a64b887c9e3b7f03d9e0db1deaa2696a Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Lichvar <mlichvar@redhat.com>
|
||||
Date: Tue, 18 Jun 2019 15:41:50 +0200
|
||||
Subject: [PATCH] test: update processing of packet log
|
||||
|
||||
Two new fields have been added to the packet log, which broke some
|
||||
of the simulation tests.
|
||||
---
|
||||
test/simulation/test.common | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/test/simulation/test.common b/test/simulation/test.common
|
||||
index 951a794..8ed6ad9 100644
|
||||
--- a/test/simulation/test.common
|
||||
+++ b/test/simulation/test.common
|
||||
@@ -391,9 +391,9 @@ check_packet_port() {
|
||||
for i in $(seq 1 $(get_chronyd_nodes)); do
|
||||
test_message 3 0 "node $i:"
|
||||
|
||||
- grep -E -q " $port [0-9]+\$" tmp/log.packets && \
|
||||
+ grep -E -q "^([0-9e.+-]+ ){5}$port " tmp/log.packets && \
|
||||
! grep -E "^[0-9e.+-]+ $i " tmp/log.packets | \
|
||||
- grep -E -q -v " $port [0-9]+\$" && \
|
||||
+ grep -E -q -v "^([0-9e.+-]+ ){5}$port " && \
|
||||
test_ok || test_bad
|
||||
[ $? -eq 0 ] || ret=1
|
||||
done
|
||||
--
|
||||
2.25.0
|
||||
|
@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 13 12:45:44 UTC 2020 - Martin Liška <mliska@suse.cz>
|
||||
|
||||
- Add chrony-test-update-processing-of-packet-log.patch in order
|
||||
to fix test-suite failure.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 12 09:24:24 UTC 2020 - Martin Liška <mliska@suse.cz>
|
||||
|
||||
- Update clknetsim to version 79ffe44 (fixes boo#1162964).
|
||||
- Backport chrony-test-fix-util-unit-test-for-NTP-era-split.patch.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 26 10:39:29 UTC 2019 - Arjen de Korte <suse+build@de-korte.org>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package chrony
|
||||
#
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
%define vendorzone opensuse.
|
||||
%global clknetsim_ver 58c5e8b
|
||||
%global clknetsim_ver 79ffe44
|
||||
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
||||
%if ! %{defined _fillupdir}
|
||||
%define _fillupdir %{_localstatedir}/adm/fillup-templates
|
||||
@ -46,6 +46,8 @@ Patch0: chrony-config.patch
|
||||
Patch1: chrony-service-helper.patch
|
||||
Patch2: chrony-logrotate.patch
|
||||
Patch3: chrony-service-ordering.patch
|
||||
Patch4: chrony-test-fix-util-unit-test-for-NTP-era-split.patch
|
||||
Patch5: chrony-test-update-processing-of-packet-log.patch
|
||||
BuildRequires: NetworkManager-devel
|
||||
BuildRequires: bison
|
||||
BuildRequires: gcc-c++
|
||||
@ -98,6 +100,8 @@ or a different computer.
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
|
||||
# If this is an openSUSE build, use our vendor zone
|
||||
# (2.*pool.ntp.org names include IPv6 addresses). If not
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:63566698c2c4bf70abd999666a02d52d00a85e68990bbed0361ffc50c9edf945
|
||||
size 42424
|
3
clknetsim-79ffe44.tar.gz
Normal file
3
clknetsim-79ffe44.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2d60fb5d6a12dd12fafa07b86a0ed8eba2bf552987e960c6d468c4869199dd6a
|
||||
size 45700
|
Loading…
x
Reference in New Issue
Block a user