Commit Graph

12 Commits

Author SHA1 Message Date
Michael Biebl
85438481ca d/t/timedated: Ignore return code of dbus-monitor in wait_mon()
We are not really interested in the return code and error messages from
dbus-monitor after killing it, so ignore them to avoid undesired
autopkgtest failures.

Follow-up for commit 3de342799c.
2020-12-03 23:52:50 +01:00
Balint Reczey
3de342799c debian/tests/timedated: Wait for the killed child only
There may be other children of the script due to autopkgtest machinery
and they exit after the script exited.

LP: #1904406
2020-12-02 23:24:06 +01:00
Michael Biebl
d21ae0f7c4 Revert "d/t/timedated: use /bin/bash to work around job handling issue in dash"
This reverts commit e437da1e4f.
2020-12-01 19:45:17 +01:00
Michael Biebl
e437da1e4f d/t/timedated: use /bin/bash to work around job handling issue in dash
See: #975010
2020-11-18 01:12:08 +01:00
Dan Streetman
37fa56d3c0 d/t/timedated: replace systemctl is-active with systemctl show
is-active return code isn't the correct way to verify a service is
fully stopped; instead use show --property=ActiveState to verify it
is 'inactive'

This also could use the text output of is-active, but (per manpage)
the show command is "intended to be used whenever computer-parsable
output is required."

systemctl is-active returns non-zero even while the service is
'deactivating', but not actually stopped, which allows the testcase
to fail intermittently on slow machines, if the service hasn't
actually stopped before reaching the check to verify the service
stopped.

For example:
$ systemctl is-active systemd-timesyncd
active
$ timedatectl set-ntp false ; systemctl is-active systemd-timesyncd ; echo $?
deactivating
3

So the test code which does:
$ while systemctl is-active --quiet systemd-timesyncd; do sleep 1; done
will never actually perform that sleep.
2019-07-17 20:45:06 -04:00
Martin Pitt
57465d928d debian/tests/timedated: Fix race condition
If timesyncd is running in the testbed, set-ntp does not synchronously
disable it, so wait until it goes down.

Gbp-Dch: Ignore
2019-03-11 08:09:33 +01:00
Martin Pitt
0cd41d3692 debian/tests/timedated: Check enabling/disabling NTP
Assert that `timedatectl set-ntp` correctly controls the service, sets
the `org.freedesktop.timedate1 NTP` property, and sends the right
`PropertiesChanged` signal.

This reproduces <https://github.com/systemd/systemd/issues/11944> and
also the earlier <https://github.com/systemd/systemd/issues/9672>.
2019-03-10 20:52:27 +01:00
Martin Pitt
45f38dcccc debian/tests/timedated: Add tests for "timedatectl set-local-rtc"
This requires the fix for https://github.com/systemd/systemd/issues/2638.
2016-02-29 07:35:44 +01:00
Martin Pitt
8618891905 debian/tests/timedated: Adjust for testing upstream builds
Verify /etc/localtime symlink. Skip verifying the /etc/timezone file (which is
Debian specific) if $TEST_UPSTREAM is set.
2016-01-31 22:10:29 +01:00
Martin Pitt
bb8bab30b3 autopkgtests: Factorize out "assert.sh" utility functions
Use them in the tests for useful failure messages.
2015-02-24 16:00:22 +01:00
Martin Pitt
1faef90590 Adjust debian/tests/timedated to current upstream version
"Timezone" got renamed to "Time zone".
2014-10-26 19:46:27 -04:00
Martin Pitt
3e589263a1 Add autopkgtests
This covers smoke-testing logind, hostnamed, timedated, localed, and a
compile/link/run test against libsystemd-login-dev.
2014-04-26 20:53:53 +02:00