All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] oeqa/selftest/devtool: Add sync call to test teardown
@ 2020-09-29 22:25 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2020-09-29 22:25 UTC (permalink / raw)
  To: openembedded-core

Devtool tests are heavy on IO and if bitbake can't write out its caches, we see
timeouts. Call "sync" around the tests to ensure the IO queue doesn't get too
large, taking any IO hit here rather than in bitbake shutdown.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/lib/oeqa/selftest/cases/devtool.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index a3d2e9ea7cc..4a791ff40e0 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -107,6 +107,13 @@ class DevtoolBase(OESelftestTestCase):
                         'under the build directory')
         self.append_config(self.sstate_conf)
 
+    def tearDown(self):
+        # devtools tests are heavy on IO and if bitbake can't write out its caches, we see timeouts.
+        # call sync around the tests to ensure the IO queue doesn't get too large, taking any IO
+        # hit here rather than in bitbake shutdown.
+        super().tearDown()
+        os.system("sync")
+
     def _check_src_repo(self, repo_dir):
         """Check srctree git repository"""
         self.assertTrue(os.path.isdir(os.path.join(repo_dir, '.git')),
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-29 22:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29 22:25 [PATCH] oeqa/selftest/devtool: Add sync call to test teardown Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.