Skip to contentSkip to conversation

cooker: Reset unpon clientComplete

PATCH New Richard Purdie 1 participant 1 message Mar 1, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cooker: Reset unpon clientComplete

If for example a tinfoil connection edits the datastore, a subsequent connection can be "corrupted" by those changes. By calling the cooker reset function at exit, the behaviour becomes the same as a newly setup server.

This avoids problems in tests when BB_SERVER_TIMEOUT is set as the server is properly reset between connections.

[YOCTO #13812]

---
 lib/bb/cooker.py | 1 +
 1 file changed, 1 insertion(+)
lib/bb/cooker.py +1 -0
index 2d937a413c..2a17c67373 100644
@@ -1665,6 +1665,7 @@ class BBCooker:
         self.command.reset()
         self.databuilder.reset()
         self.data = self.databuilder.data
+        self.reset()
 
 
 class CookerExit(bb.event.Event):
Signature · 1 line
2.25.0