]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa/selftest/tinfoil: Fix intermittent event loss issue in test
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 24 Mar 2022 17:37:25 +0000 (17:37 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 26 Mar 2022 09:33:28 +0000 (09:33 +0000)
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 <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/lib/oeqa/selftest/cases/tinfoil.py

index 63ceddf118a8b906cedd3b0eb00b4ec01093c37a..6f26af23d545916ecb4ed26f0614103279738fbb 100644 (file)
@@ -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