aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/cases/date.py
diff options
context:
space:
mode:
authorWes Lindauer <wesley.lindauer@gmail.com>2021-04-11 23:50:34 -0400
committerAnuj Mittal <anuj.mittal@intel.com>2021-04-23 16:14:22 +0800
commit49a6632aa789fca8085a91b5b7c749aef3db4e0e (patch)
tree8ef9c1338c60724f38fb99cac1d0ca2c0669cee7 /meta/lib/oeqa/runtime/cases/date.py
parent4f9921db882ed06e0902d34ae06a0eabff4ba86e (diff)
downloadopenembedded-core-49a6632aa789fca8085a91b5b7c749aef3db4e0e.tar.gz
openembedded-core-49a6632aa789fca8085a91b5b7c749aef3db4e0e.tar.bz2
openembedded-core-49a6632aa789fca8085a91b5b7c749aef3db4e0e.zip
oeqa/runtime/cases: Only disable/enable for current boot
Previously doing a stop/start worked, but using a disable/enable does not work on a read-only rootfs. Add a --runtime flag to systemctl so that systemd only modifies the current boot and does not attempt to write to the filesystem. This also keeps the test from making a permanent (one could argue policy) change to the running system being tested. i.e. What if the image being tested had intentionally disabled the timesyncd service in preference to using chrony or ntpd? The test shouldn't assume that the user wants the timesyncd service enabled. Signed-off-by: Wes Lindauer <wesley.lindauer@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 43dd83b6a325589368c980a3f17cab90935aaeb0) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'meta/lib/oeqa/runtime/cases/date.py')
-rw-r--r--meta/lib/oeqa/runtime/cases/date.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/runtime/cases/date.py b/meta/lib/oeqa/runtime/cases/date.py
index fdd2a6ae58..e14322911d 100644
--- a/meta/lib/oeqa/runtime/cases/date.py
+++ b/meta/lib/oeqa/runtime/cases/date.py
@@ -13,12 +13,12 @@ class DateTest(OERuntimeTestCase):
def setUp(self):
if self.tc.td.get('VIRTUAL-RUNTIME_init_manager') == 'systemd':
self.logger.debug('Stopping systemd-timesyncd daemon')
- self.target.run('systemctl disable --now systemd-timesyncd')
+ self.target.run('systemctl disable --now --runtime systemd-timesyncd')
def tearDown(self):
if self.tc.td.get('VIRTUAL-RUNTIME_init_manager') == 'systemd':
self.logger.debug('Starting systemd-timesyncd daemon')
- self.target.run('systemctl enable --now systemd-timesyncd')
+ self.target.run('systemctl enable --now --runtime systemd-timesyncd')
@OETestDepends(['ssh.SSHTest.test_ssh'])
@OEHasPackage(['coreutils', 'busybox'])