]> git.ipfire.org Git - thirdparty/systemd.git/commit - Makefile.am
clock-util: make clock_is_localtime() testable and add initial tests
authorMartin Pitt <martin.pitt@ubuntu.com>
Fri, 26 Feb 2016 10:25:22 +0000 (11:25 +0100)
committerMartin Pitt <martin.pitt@ubuntu.com>
Fri, 26 Feb 2016 10:28:49 +0000 (11:28 +0100)
commit6369641d6f594557114b78fe740544ecf69a6d37
tree9970181e381ca65c923bec9ef8ab711b705eb397
parent06fb28b16eb4b6170c2e2c0cf1f673730309509b
clock-util: make clock_is_localtime() testable and add initial tests

Add path argument to clock_is_localtime() and default to "/etc/adjtime" if it's
NULL. This makes the function testable.

Add test-clock: initial test cases for some scenarios, using a temporary file.
This also checks the behaviour with a NULL (i. e. the system's /etc/adjtime)
file.
.gitignore
Makefile.am
src/basic/clock-util.c
src/basic/clock-util.h
src/core/dbus-manager.c
src/core/main.c
src/test/test-clock.c [new file with mode: 0644]
src/timedate/timedated.c
src/timesync/timesyncd.c