Skip to contentSkip to conversation

tests/runqueue: Ensure hashserv exits before deleting files

PATCH New Richard Purdie 1 participant 1 message Oct 14, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/runqueue: Ensure hashserv exits before deleting files

We've seen races where the socket may be gone but the server is still writing out it's database. Handle that case too to avoid cleanup tracebacks.

[YOCTO #14440]

---
 lib/bb/tests/runqueue.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/tests/runqueue.py +1 -1
index 3d51779d6c..4f335b8f19 100644
@@ -361,7 +361,7 @@ class RunQueueTests(unittest.TestCase):
 
     def shutdown(self, tempdir):
         # Wait for the hashserve socket to disappear else we'll see races with the tempdir cleanup
-        while os.path.exists(tempdir + "/hashserve.sock"):
+        while (os.path.exists(tempdir + "/hashserve.sock") or os.path.exists(tempdir + "cache/hashserv.db-wal")):
             time.sleep(0.5)
 
 
Signature · 1 line
2.32.0