From: Richard Purdie Date: Thu, 24 Mar 2022 17:37:25 +0000 (+0000) Subject: oeqa/selftest/tinfoil: Fix intermittent event loss issue in test X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~4626 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2292983c717b8cadcf0c443bb7b649a84ea5ad57;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git oeqa/selftest/tinfoil: Fix intermittent event loss issue in test We've been seeing occasional test failures on the autobuilder where we don't see the expected events. It turns out this is due to run_command being helpful and eating them if the server is fast and the client slow. Adding a sleep into the run_command code makes the failure consistent. Use a new "handle_events" argument to allow us to handle all the events which is what this test requires. [YOCTO #14585] Signed-off-by: Richard Purdie Signed-off-by: Alexandre Belloni --- diff --git a/meta/lib/oeqa/selftest/cases/tinfoil.py b/meta/lib/oeqa/selftest/cases/tinfoil.py index 63ceddf118a..6f26af23d54 100644 --- a/meta/lib/oeqa/selftest/cases/tinfoil.py +++ b/meta/lib/oeqa/selftest/cases/tinfoil.py @@ -94,7 +94,7 @@ class TinfoilTests(OESelftestTestCase): pass pattern = 'conf' - res = tinfoil.run_command('testCookerCommandEvent', pattern) + res = tinfoil.run_command('testCookerCommandEvent', pattern, handle_events=False) self.assertTrue(res) eventreceived = False