summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/runtime/cases/oe_syslog.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/meta/lib/oeqa/runtime/cases/oe_syslog.py b/meta/lib/oeqa/runtime/cases/oe_syslog.py
index f987dccfb1..449df233d1 100644
--- a/meta/lib/oeqa/runtime/cases/oe_syslog.py
+++ b/meta/lib/oeqa/runtime/cases/oe_syslog.py
@@ -40,7 +40,7 @@ class SyslogTestConfig(OERuntimeTestCase):
40 return 0, pids 40 return 0, pids
41 41
42 42
43 def restart_sanity(self, names, restart_cmd): 43 def restart_sanity(self, names, restart_cmd, pidchange=True):
44 status, original_pids = self.verify_running(names) 44 status, original_pids = self.verify_running(names)
45 if status: 45 if status:
46 return False 46 return False
@@ -50,6 +50,9 @@ class SyslogTestConfig(OERuntimeTestCase):
50 msg = ('Could not restart %s service. Status and output: %s and %s' % (names, status, output)) 50 msg = ('Could not restart %s service. Status and output: %s and %s' % (names, status, output))
51 self.assertEqual(status, 0, msg) 51 self.assertEqual(status, 0, msg)
52 52
53 if not pidchange:
54 return True
55
53 # Always check for an error, most likely a race between shutting down and starting up 56 # Always check for an error, most likely a race between shutting down and starting up
54 timeout = time.time() + 30 57 timeout = time.time() + 30
55 58
@@ -95,7 +98,7 @@ class SyslogTestConfig(OERuntimeTestCase):
95 98
96 @OETestDepends(['oe_syslog.SyslogTest.test_syslog_running']) 99 @OETestDepends(['oe_syslog.SyslogTest.test_syslog_running'])
97 def test_syslog_restart(self): 100 def test_syslog_restart(self):
98 if self.restart_sanity(['systemd-journald'], 'systemctl restart syslog.service'): 101 if self.restart_sanity(['systemd-journald'], 'systemctl restart syslog.service', pidchange=False):
99 pass 102 pass
100 elif self.restart_sanity(['rsyslogd'], '/etc/init.d/rsyslog restart'): 103 elif self.restart_sanity(['rsyslogd'], '/etc/init.d/rsyslog restart'):
101 pass 104 pass