[chrony-dev] [PATCH v5 0/5] support leap-seconds.list |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: [chrony-dev] [PATCH v5 0/5] support leap-seconds.list
- From: patrick.oppenlander@xxxxxxxxx
- Date: Thu, 8 Feb 2024 14:36:24 +1100
- Cc: Patrick Oppenlander <patrick.oppenlander@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707363406; x=1707968206; darn=chrony.tuxfamily.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=7idwzapOPLDbvxZL2J+ivHXv7HIVrrMS8MtlndjSbUI=; b=Rk5A5vLimWjMhwgXvlQWC6HHHjSzDlWXlIJlMpeRo33t0Y8wa0C92+xlppYfZyVbb3 38zOrZntvs4pgR0dz/6LDjIxAQAGnHIUfexbJ2AORERpxOSNZ5ng9olPXZJ0sVSqMfgW QaxY1qivhn7r8au3EGu8vtvCIAyMulGnayqLWFhg/6ItinubSDsds4stHz/t/+4Re7lH 8YqyPsp2vb2igeHJFm9k3todItCHhRJOWmfdPMqZEDdYn+yUMBKrbi37ceEWU2gVnfgL R2hFzrTFsxre4tYR8L1T6JslIp2jlTCz7UuByPOxPKR0SckkCccQoq0+3jLs+1p/bKbS t0KQ==
From: Patrick Oppenlander <patrick.oppenlander@xxxxxxxxx>
Hi Miroslav,
thanks for the feedback. Here's an updated series.
Changes from v4:
* Fix test on systems where mktime() doesn't support leap seconds or where the
right/UTC timezone is not installed.
* Add a test with a negative leap second.
* Newer leap-second.list doesn't wrap at 80 chars, make the line buffer bigger.
* Fix error path in get_list_leap so that if leap-seconds.list fails to parse
we don't return new values.
Changes from v3:
* Include cut down leap second database for unit test.
* Add a comment about leap-seconds.list format to chrony.conf.adoc.
* Use UTI_OpenFile() instead of fopen(), fgets() instead of getline().
* Fix handling of blank lines while parsing leap-seconds.list.
* Comment fixes, function & enumerator naming and other minor cleanups.
Changes from v2:
* Fix copyright notices.
* Rework to avoid storing leap-seconds.list in memory, parse on the fly.
* Minimise function pointer use.
* Comment fixes, include ordering, naming and other minor cleanups.
Changes from v1:
* Add a new leapdb module with unit test.
* Make 12 hour caching logic common.
* Make sanity checking logic common.
* Don't cache leap-seconds.list contents between calls.
* Naming and other minor cleanups.
Thanks,
Patrick Oppenlander (5):
reference: move leap second source into leapdb
leapdb: make twice per day check logic common
leapdb: move source check into separate function
leapdb: support leap-seconds.list as second source
test/unit: add leapdb test
Makefile.in | 2 +-
conf.c | 14 +++
conf.h | 1 +
doc/chrony.conf.adoc | 20 +++-
leapdb.c | 270 ++++++++++++++++++++++++++++++++++++++++++
leapdb.h | 37 ++++++
main.c | 3 +
reference.c | 99 +---------------
test/unit/leapdb.c | 104 ++++++++++++++++
test/unit/leapdb.list | 22 ++++
10 files changed, 475 insertions(+), 97 deletions(-)
create mode 100644 leapdb.c
create mode 100644 leapdb.h
create mode 100644 test/unit/leapdb.c
create mode 100644 test/unit/leapdb.list
--
2.43.0
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.