summaryrefslogtreecommitdiffstats
path: root/test/networkd-test.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 02:23:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 02:23:16 +0000
commit2ac0841d6fcb577cb485140d70f5b5355a45b85a (patch)
treef7ed0c18149279bfa3f52a1fe5e4aa64d897ce07 /test/networkd-test.py
parentReleasing progress-linux version 252.25-1~deb12u1~progress6.99u1. (diff)
downloadsystemd-2ac0841d6fcb577cb485140d70f5b5355a45b85a.tar.xz
systemd-2ac0841d6fcb577cb485140d70f5b5355a45b85a.zip
Merging upstream version 252.26.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xtest/networkd-test.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/test/networkd-test.py b/test/networkd-test.py
index 84013e7..ebb5553 100755
--- a/test/networkd-test.py
+++ b/test/networkd-test.py
@@ -1037,13 +1037,16 @@ DNS=127.0.0.1
self.create_iface(dhcpserver_opts='EmitTimezone=yes\nTimezone=Pacific/Honolulu')
self.do_test(coldplug=None, extra_opts='IPv6AcceptRA=false\n[DHCP]\nUseTimezone=true', dhcp_mode='ipv4')
- # should have applied the received timezone
- try:
- self.assertEqual(get_tz(), 'Pacific/Honolulu')
- except AssertionError:
+ # Should have applied the received timezone. This is asynchronous, so we need to wait for a while:
+ for _ in range(20):
+ tz = get_tz()
+ if tz == 'Pacific/Honolulu':
+ break
+ time.sleep(0.5)
+ else:
self.show_journal('systemd-networkd.service')
- self.show_journal('systemd-hostnamed.service')
- raise
+ self.show_journal('systemd-timedated.service')
+ self.fail(f'Timezone: {tz}, expected: Pacific/Honolulu')
class MatchClientTest(unittest.TestCase, NetworkdTestingUtilities):