[OE-core] [PATCH 6/6] oeqa/runtime/systemd: skip unit enable/disable on read-only-rootfs
André Draszik
git at andred.net
Wed Oct 16 09:18:25 UTC 2019
This doesn't work on read-only-rootfs:
AssertionError: 1 != 0 : SYSTEMD_BUS_TIMEOUT=240s systemctl disable avahi-daemon.service
Failed to disable unit: File /etc/systemd/system/multi-user.target.wants/avahi-daemon.service: Read-only file system
Skip the test in that case to avoid this.
Signed-off-by: André Draszik <andre.draszik at jci.com>
Signed-off-by: André Draszik <git at andred.net>
---
meta/lib/oeqa/runtime/cases/systemd.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/runtime/cases/systemd.py b/meta/lib/oeqa/runtime/cases/systemd.py
index c11fa49b07..e33c8a41a7 100644
--- a/meta/lib/oeqa/runtime/cases/systemd.py
+++ b/meta/lib/oeqa/runtime/cases/systemd.py
@@ -9,7 +9,7 @@ from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends
from oeqa.core.decorator.data import skipIfDataVar, skipIfNotDataVar
from oeqa.runtime.decorator.package import OEHasPackage
-from oeqa.core.decorator.data import skipIfNotFeature
+from oeqa.core.decorator.data import skipIfNotFeature, skipIfFeature
class SystemdTest(OERuntimeTestCase):
@@ -114,6 +114,8 @@ class SystemdServiceTests(SystemdTest):
self.systemctl('is-active', 'avahi-daemon.service', verbose=True)
@OETestDepends(['systemd.SystemdServiceTests.test_systemd_status'])
+ @skipIfFeature('read-only-rootfs',
+ 'Test does not work with read-only-rootfs in IMAGE_FEATURES')
def test_systemd_disable_enable(self):
self.systemctl('disable', 'avahi-daemon.service')
self.systemctl('is-enabled', 'avahi-daemon.service', expected=1)
--
2.23.0.rc1
More information about the Openembedded-core
mailing list