mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 12:49:46 +00:00
oeqa/runtime/date: stop systemd-timesyncd during test
There's a race between systemd-timesyncd manipulating the system time (with NTP lookups) and the test case's time manipulation. Prevent this by stopping systemd-timesyncd for the duration of the test case. Thanks to Khem Raj for root-causing this. (From OE-Core rev: 5334f1b1e9363fa9c128289b51ade55c7ae1a0a3) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
e20c9ea497
commit
44ae903e30
@@ -4,6 +4,14 @@ import re
|
|||||||
|
|
||||||
class DateTest(oeRuntimeTest):
|
class DateTest(oeRuntimeTest):
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
if oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", True) == "systemd":
|
||||||
|
self.target.run('systemctl stop systemd-timesyncd')
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
if oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", True) == "systemd":
|
||||||
|
self.target.run('systemctl start systemd-timesyncd')
|
||||||
|
|
||||||
@testcase(211)
|
@testcase(211)
|
||||||
@skipUnlessPassed("test_ssh")
|
@skipUnlessPassed("test_ssh")
|
||||||
def test_date(self):
|
def test_date(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user