bmc: add preparation step before data is received
Add a preparation systemd trigger event before data is received. On
systems under memory pressure, this'll trigger a service that can do
things like flush caches.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I175177f4a91b58d9f163098572a9d2614002b718
diff --git a/test/firmware_state_verificationpending_unittest.cpp b/test/firmware_state_verificationpending_unittest.cpp
index 92ba15b..dd2df27 100644
--- a/test/firmware_state_verificationpending_unittest.cpp
+++ b/test/firmware_state_verificationpending_unittest.cpp
@@ -214,6 +214,9 @@
EXPECT_THAT(handler->getBlobIds(),
UnorderedElementsAreArray(expectedBlobs));
+ /* Verifies it isn't triggered again. */
+ EXPECT_CALL(*prepareMockPtr, trigger()).Times(0);
+
EXPECT_CALL(imageMock, open(staticLayoutBlobId)).WillOnce(Return(true));
EXPECT_TRUE(handler->open(session, flags, staticLayoutBlobId));
expectedState(FirmwareBlobHandler::UpdateState::uploadInProgress);