[OE-core] [PATCH v2] oe_syslog.py: Handle syslogd/klogd restart race
Richard Purdie
richard.purdie at linuxfoundation.org
Sat Jun 22 08:12:58 UTC 2019
On Sat, 2019-06-22 at 09:08 +0100, Richard Purdie wrote:
> On Fri, 2019-06-21 at 15:27 -0400, Jon Mason wrote:
> > syslogd and klogd can occasionally take too long to restart, which
> > causes tests to fail by starting before the log daemons are
> > ready. To
> > work around this problem, poll for up to 30 seconds on the
> > processes to
> > verify the old ones are killed and the new ones are up and running.
> >
> > [YOCTO #13379]
> >
> > Signed-off-by: Jon Mason <jdmason at kudzu.us>
> > ---
> > meta/lib/oeqa/runtime/cases/oe_syslog.py | 54
> > +++++++++++++++++++++---
> > 1 file changed, 48 insertions(+), 6 deletions(-)
> >
> > diff --git a/meta/lib/oeqa/runtime/cases/oe_syslog.py
> > b/meta/lib/oeqa/runtime/cases/oe_syslog.py
> > index 0f5f9f43ca..480aadedf9 100644
> > --- a/meta/lib/oeqa/runtime/cases/oe_syslog.py
> > +++ b/meta/lib/oeqa/runtime/cases/oe_syslog.py
> > @@ -6,6 +6,7 @@ from oeqa.runtime.case import OERuntimeTestCase
> > from oeqa.core.decorator.depends import OETestDepends
> > from oeqa.core.decorator.data import skipIfDataVar
> > from oeqa.runtime.decorator.package import OEHasPackage
> > +import time
> >
> > class SyslogTest(OERuntimeTestCase):
> >
> > @@ -21,6 +22,49 @@ class SyslogTest(OERuntimeTestCase):
> >
> > class SyslogTestConfig(OERuntimeTestCase):
> >
> > + def test_syslog_restart_sanity(self):
> > + status, syslogd_pid = self.target.run('pidof syslogd')
> > + status, klogd_pid = self.target.run('pidof klogd')
>
> FWIW by calling this test_, it will be run as a standalone test. This
> may have two issues:
>
> a) it won't work on a systemd image
> b) its missing dependency markup (is syslog running?) that the other
> tests have
>
> Unless we really want it as a standalone test (I think there is a
> similar one already), the fix may be just to rename it something
> other
> than starting with test_.
Sorry for all the replies, just realised I could quickly test a rename
of the function so I've done that in -next.
Cheers,
Richard
More information about the Openembedded-core
mailing list