[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    [OE-core] [PATCH 4/4] systemd.py: increase default bus timeout
From:       Chen Qi <Qi.Chen () windriver ! com>
Date:       2018-07-31 7:13:43
Message-ID: 83ced70e88d13af3c01051ffb85fd2c16f7433e5.1533021154.git.Qi.Chen () windriver ! com
[Download RAW message or body]

Use SYSTEMD_BUS_TIMEOUT to set default timeout to 240s to avoid
timeout problem on slow qemu machines.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/lib/oeqa/runtime/cases/systemd.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oeqa/runtime/cases/systemd.py b/meta/lib/oeqa/runtime/cases/systemd.py
index db69384..460b8fc 100644
--- a/meta/lib/oeqa/runtime/cases/systemd.py
+++ b/meta/lib/oeqa/runtime/cases/systemd.py
@@ -11,11 +11,11 @@ from oeqa.core.decorator.data import skipIfNotFeature
 class SystemdTest(OERuntimeTestCase):
 
     def systemctl(self, action='', target='', expected=0, verbose=False):
-        command = 'systemctl %s %s' % (action, target)
+        command = 'SYSTEMD_BUS_TIMEOUT=240s systemctl %s %s' % (action, target)
         status, output = self.target.run(command)
         message = '\n'.join([command, output])
         if status != expected and verbose:
-            cmd = 'systemctl status --full %s' % target
+            cmd = 'SYSTEMD_BUS_TIMEOUT=240s systemctl status --full %s' % target
             message += self.target.run(cmd)[1]
         self.assertEqual(status, expected, message)
         return output
@@ -63,7 +63,7 @@ class SystemdBasicTests(SystemdTest):
         """
         endtime = time.time() + (60 * 2)
         while True:
-            status, output = self.target.run('systemctl --state=activating')
+            status, output = self.target.run('SYSTEMD_BUS_TIMEOUT=240s systemctl --state=activating')
             if "0 loaded units listed" in output:
                 return (True, '')
             if time.time() >= endtime:
-- 
1.9.1

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic