Patrick Venture | 61d2ed4 | 2019-05-23 18:16:31 -0700 | [diff] [blame] | 1 | /** |
| 2 | * The goal of these tests is to verify the behavior of all blob commands given |
| 3 | * the current state is verificationPending. This state is achieved as a |
| 4 | * transition out of uploadInProgress. |
| 5 | */ |
| 6 | #include "firmware_handler.hpp" |
| 7 | #include "firmware_unittest.hpp" |
Patrick Venture | 01a3327 | 2019-05-23 19:48:22 -0700 | [diff] [blame] | 8 | #include "status.hpp" |
Patrick Venture | 61d2ed4 | 2019-05-23 18:16:31 -0700 | [diff] [blame] | 9 | #include "util.hpp" |
| 10 | |
Patrick Venture | 930c7b7 | 2019-05-24 11:11:08 -0700 | [diff] [blame] | 11 | #include <algorithm> |
Patrick Venture | 61d2ed4 | 2019-05-23 18:16:31 -0700 | [diff] [blame] | 12 | #include <cstdint> |
| 13 | #include <string> |
| 14 | #include <vector> |
| 15 | |
| 16 | #include <gtest/gtest.h> |
| 17 | |
| 18 | namespace ipmi_flash |
| 19 | { |
| 20 | namespace |
| 21 | { |
| 22 | |
Patrick Venture | 2567ebc | 2019-05-24 10:02:53 -0700 | [diff] [blame] | 23 | using ::testing::IsEmpty; |
Patrick Venture | 61d2ed4 | 2019-05-23 18:16:31 -0700 | [diff] [blame] | 24 | using ::testing::Return; |
Patrick Venture | efba42d | 2019-05-24 10:48:16 -0700 | [diff] [blame] | 25 | using ::testing::UnorderedElementsAreArray; |
Patrick Venture | 61d2ed4 | 2019-05-23 18:16:31 -0700 | [diff] [blame] | 26 | |
| 27 | /* |
| 28 | * There are the following calls (parameters may vary): |
| 29 | * canHandleBlob(blob) |
| 30 | * getBlobIds |
| 31 | * deleteBlob(blob) |
| 32 | * stat(blob) |
| 33 | * stat(session) |
| 34 | * open(blob) |
| 35 | * close(session) |
| 36 | * writemeta(session) |
| 37 | * write(session) |
| 38 | * read(session) |
| 39 | * commit(session) |
| 40 | * |
| 41 | * Testing canHandleBlob is uninteresting in this state. Getting the BlobIDs |
| 42 | * will inform what canHandleBlob will return. |
| 43 | */ |
| 44 | |
| 45 | class FirmwareHandlerVerificationPendingTest : public IpmiOnlyFirmwareStaticTest |
| 46 | { |
Patrick Venture | 61d2ed4 | 2019-05-23 18:16:31 -0700 | [diff] [blame] | 47 | }; |
| 48 | |
| 49 | /* |
| 50 | * getBlobIds |
Patrick Venture | 61d2ed4 | 2019-05-23 18:16:31 -0700 | [diff] [blame] | 51 | */ |
Patrick Venture | 61d2ed4 | 2019-05-23 18:16:31 -0700 | [diff] [blame] | 52 | TEST_F(FirmwareHandlerVerificationPendingTest, VerifyBlobIdAvailableInState) |
| 53 | { |
| 54 | /* Only in the verificationPending state (and later), should the |
Patrick Venture | 0f82ce4 | 2019-05-28 14:06:04 -0700 | [diff] [blame] | 55 | * verifyBlobId be present. |
| 56 | */ |
Patrick Venture | 930c7b7 | 2019-05-24 11:11:08 -0700 | [diff] [blame] | 57 | EXPECT_FALSE(handler->canHandleBlob(verifyBlobId)); |
| 58 | |
Patrick Venture | 61d2ed4 | 2019-05-23 18:16:31 -0700 | [diff] [blame] | 59 | getToVerificationPending(staticLayoutBlobId); |
Patrick Venture | 930c7b7 | 2019-05-24 11:11:08 -0700 | [diff] [blame] | 60 | |
Patrick Venture | 61d2ed4 | 2019-05-23 18:16:31 -0700 | [diff] [blame] | 61 | EXPECT_TRUE(handler->canHandleBlob(verifyBlobId)); |
Patrick Venture | b386b86 | 2019-05-23 18:42:54 -0700 | [diff] [blame] | 62 | EXPECT_TRUE(handler->canHandleBlob(activeImageBlobId)); |
Patrick Venture | 0f82ce4 | 2019-05-28 14:06:04 -0700 | [diff] [blame] | 63 | EXPECT_FALSE(handler->canHandleBlob(updateBlobId)); |
Patrick Venture | 61d2ed4 | 2019-05-23 18:16:31 -0700 | [diff] [blame] | 64 | } |
| 65 | |
Patrick Venture | b386b86 | 2019-05-23 18:42:54 -0700 | [diff] [blame] | 66 | /* |
Patrick Venture | 2ca6652 | 2019-06-17 11:58:38 -0700 | [diff] [blame] | 67 | * delete(blob) |
Patrick Venture | b386b86 | 2019-05-23 18:42:54 -0700 | [diff] [blame] | 68 | */ |
Patrick Venture | 2ca6652 | 2019-06-17 11:58:38 -0700 | [diff] [blame] | 69 | TEST_F(FirmwareHandlerVerificationPendingTest, DeleteVerifyPendingAbortsProcess) |
| 70 | { |
| 71 | /* It doesn't matter what blob id is used to delete in the design, so just |
| 72 | * delete the verify blob id |
| 73 | */ |
| 74 | getToVerificationPending(staticLayoutBlobId); |
| 75 | |
| 76 | EXPECT_CALL(*verifyMockPtr, abort()).Times(0); |
| 77 | |
| 78 | ASSERT_TRUE(handler->canHandleBlob(verifyBlobId)); |
| 79 | EXPECT_TRUE(handler->deleteBlob(verifyBlobId)); |
| 80 | |
| 81 | std::vector<std::string> expectedBlobs = {staticLayoutBlobId, hashBlobId}; |
| 82 | EXPECT_THAT(handler->getBlobIds(), |
| 83 | UnorderedElementsAreArray(expectedBlobs)); |
| 84 | expectedState(FirmwareBlobHandler::UpdateState::notYetStarted); |
| 85 | } |
| 86 | |
| 87 | TEST_F(FirmwareHandlerVerificationPendingTest, DeleteActiveImageAbortsProcess) |
| 88 | { |
| 89 | getToVerificationPending(staticLayoutBlobId); |
| 90 | |
| 91 | EXPECT_CALL(*verifyMockPtr, abort()).Times(0); |
| 92 | |
| 93 | ASSERT_TRUE(handler->canHandleBlob(activeImageBlobId)); |
| 94 | EXPECT_TRUE(handler->deleteBlob(activeImageBlobId)); |
| 95 | |
| 96 | std::vector<std::string> expectedBlobs = {staticLayoutBlobId, hashBlobId}; |
| 97 | EXPECT_THAT(handler->getBlobIds(), |
| 98 | UnorderedElementsAreArray(expectedBlobs)); |
| 99 | expectedState(FirmwareBlobHandler::UpdateState::notYetStarted); |
| 100 | } |
| 101 | |
| 102 | TEST_F(FirmwareHandlerVerificationPendingTest, DeleteStaticLayoutAbortsProcess) |
| 103 | { |
| 104 | getToVerificationPending(staticLayoutBlobId); |
| 105 | |
| 106 | EXPECT_CALL(*verifyMockPtr, abort()).Times(0); |
| 107 | |
| 108 | ASSERT_TRUE(handler->canHandleBlob(staticLayoutBlobId)); |
| 109 | EXPECT_TRUE(handler->deleteBlob(staticLayoutBlobId)); |
| 110 | |
| 111 | std::vector<std::string> expectedBlobs = {staticLayoutBlobId, hashBlobId}; |
| 112 | EXPECT_THAT(handler->getBlobIds(), |
| 113 | UnorderedElementsAreArray(expectedBlobs)); |
| 114 | expectedState(FirmwareBlobHandler::UpdateState::notYetStarted); |
| 115 | } |
| 116 | |
| 117 | TEST_F(FirmwareHandlerVerificationPendingTest, DeleteHashAbortsProcess) |
| 118 | { |
| 119 | getToVerificationPending(staticLayoutBlobId); |
| 120 | |
| 121 | EXPECT_CALL(*verifyMockPtr, abort()).Times(0); |
| 122 | |
| 123 | ASSERT_TRUE(handler->canHandleBlob(hashBlobId)); |
| 124 | EXPECT_TRUE(handler->deleteBlob(hashBlobId)); |
| 125 | |
| 126 | std::vector<std::string> expectedBlobs = {staticLayoutBlobId, hashBlobId}; |
| 127 | EXPECT_THAT(handler->getBlobIds(), |
| 128 | UnorderedElementsAreArray(expectedBlobs)); |
| 129 | expectedState(FirmwareBlobHandler::UpdateState::notYetStarted); |
| 130 | } |
Patrick Venture | b386b86 | 2019-05-23 18:42:54 -0700 | [diff] [blame] | 131 | |
| 132 | /* |
| 133 | * stat(blob) |
| 134 | */ |
| 135 | TEST_F(FirmwareHandlerVerificationPendingTest, StatOnActiveImageReturnsFailure) |
| 136 | { |
| 137 | getToVerificationPending(staticLayoutBlobId); |
Patrick Venture | 930c7b7 | 2019-05-24 11:11:08 -0700 | [diff] [blame] | 138 | ASSERT_TRUE(handler->canHandleBlob(activeImageBlobId)); |
Patrick Venture | b386b86 | 2019-05-23 18:42:54 -0700 | [diff] [blame] | 139 | |
| 140 | blobs::BlobMeta meta; |
| 141 | EXPECT_FALSE(handler->stat(activeImageBlobId, &meta)); |
| 142 | } |
| 143 | |
| 144 | TEST_F(FirmwareHandlerVerificationPendingTest, StatOnActiveHashReturnsFailure) |
| 145 | { |
| 146 | getToVerificationPending(hashBlobId); |
Patrick Venture | 930c7b7 | 2019-05-24 11:11:08 -0700 | [diff] [blame] | 147 | ASSERT_TRUE(handler->canHandleBlob(activeHashBlobId)); |
Patrick Venture | b386b86 | 2019-05-23 18:42:54 -0700 | [diff] [blame] | 148 | |
| 149 | blobs::BlobMeta meta; |
| 150 | EXPECT_FALSE(handler->stat(activeHashBlobId, &meta)); |
| 151 | } |
| 152 | |
| 153 | TEST_F(FirmwareHandlerVerificationPendingTest, |
| 154 | StatOnVerificationBlobReturnsFailure) |
| 155 | { |
Patrick Venture | 1999eef | 2019-07-01 11:44:09 -0700 | [diff] [blame] | 156 | getToVerificationPending(staticLayoutBlobId); |
Patrick Venture | 0f82ce4 | 2019-05-28 14:06:04 -0700 | [diff] [blame] | 157 | ASSERT_TRUE(handler->canHandleBlob(verifyBlobId)); |
Patrick Venture | b386b86 | 2019-05-23 18:42:54 -0700 | [diff] [blame] | 158 | |
| 159 | blobs::BlobMeta meta; |
| 160 | EXPECT_FALSE(handler->stat(verifyBlobId, &meta)); |
| 161 | } |
| 162 | |
Patrick Venture | 1999eef | 2019-07-01 11:44:09 -0700 | [diff] [blame] | 163 | TEST_F(FirmwareHandlerVerificationPendingTest, |
| 164 | VerificationBlobNotFoundWithoutStaticDataAsWell) |
| 165 | { |
| 166 | /* If you only ever open the hash blob id, and never the firmware blob id, |
| 167 | * the verify blob isn't added. |
| 168 | */ |
| 169 | getToVerificationPending(hashBlobId); |
| 170 | EXPECT_FALSE(handler->canHandleBlob(verifyBlobId)); |
| 171 | } |
| 172 | |
Patrick Venture | b386b86 | 2019-05-23 18:42:54 -0700 | [diff] [blame] | 173 | TEST_F(FirmwareHandlerVerificationPendingTest, StatOnNormalBlobsReturnsSuccess) |
| 174 | { |
| 175 | getToVerificationPending(staticLayoutBlobId); |
| 176 | |
Patrick Venture | b386b86 | 2019-05-23 18:42:54 -0700 | [diff] [blame] | 177 | std::vector<std::string> testBlobs = {staticLayoutBlobId, hashBlobId}; |
| 178 | for (const auto& blob : testBlobs) |
| 179 | { |
Patrick Venture | 930c7b7 | 2019-05-24 11:11:08 -0700 | [diff] [blame] | 180 | ASSERT_TRUE(handler->canHandleBlob(blob)); |
Patrick Venture | b386b86 | 2019-05-23 18:42:54 -0700 | [diff] [blame] | 181 | blobs::BlobMeta meta = {}; |
| 182 | EXPECT_TRUE(handler->stat(blob, &meta)); |
Benjamin Fair | 1290198 | 2019-11-12 13:55:46 -0800 | [diff] [blame^] | 183 | EXPECT_EQ(expectedIdleMeta, meta); |
Patrick Venture | b386b86 | 2019-05-23 18:42:54 -0700 | [diff] [blame] | 184 | } |
| 185 | } |
| 186 | |
| 187 | /* |
Patrick Venture | b386b86 | 2019-05-23 18:42:54 -0700 | [diff] [blame] | 188 | * open(blob) |
| 189 | */ |
Patrick Venture | da8fcd1 | 2019-05-23 18:53:50 -0700 | [diff] [blame] | 190 | TEST_F(FirmwareHandlerVerificationPendingTest, OpenVerifyBlobSucceeds) |
| 191 | { |
| 192 | getToVerificationPending(staticLayoutBlobId); |
| 193 | |
| 194 | /* the session is safe because it was already closed to get to this state. |
| 195 | */ |
| 196 | EXPECT_TRUE(handler->open(session, flags, verifyBlobId)); |
| 197 | } |
| 198 | |
Patrick Venture | 0f82ce4 | 2019-05-28 14:06:04 -0700 | [diff] [blame] | 199 | TEST_F(FirmwareHandlerVerificationPendingTest, OpenActiveBlobsFail) |
Patrick Venture | da8fcd1 | 2019-05-23 18:53:50 -0700 | [diff] [blame] | 200 | { |
| 201 | /* Try opening the active blob Id. This test is equivalent to trying to |
| 202 | * open the active hash blob id, in that neither are ever allowed. |
| 203 | */ |
| 204 | getToVerificationPending(staticLayoutBlobId); |
| 205 | EXPECT_FALSE(handler->open(session, flags, activeImageBlobId)); |
Patrick Venture | 0f82ce4 | 2019-05-28 14:06:04 -0700 | [diff] [blame] | 206 | EXPECT_FALSE(handler->open(session, flags, activeHashBlobId)); |
Patrick Venture | da8fcd1 | 2019-05-23 18:53:50 -0700 | [diff] [blame] | 207 | } |
| 208 | |
| 209 | TEST_F(FirmwareHandlerVerificationPendingTest, |
| 210 | OpenImageBlobTransitionsToUploadInProgress) |
| 211 | { |
| 212 | getToVerificationPending(staticLayoutBlobId); |
Patrick Venture | efba42d | 2019-05-24 10:48:16 -0700 | [diff] [blame] | 213 | |
| 214 | /* Verify the active blob for the image is in the list once to start. |
| 215 | * Note: This is truly tested under the notYetStarted::open() test. |
| 216 | */ |
| 217 | std::vector<std::string> expectedBlobs = {staticLayoutBlobId, hashBlobId, |
| 218 | verifyBlobId, activeImageBlobId}; |
| 219 | |
| 220 | EXPECT_THAT(handler->getBlobIds(), |
| 221 | UnorderedElementsAreArray(expectedBlobs)); |
| 222 | |
Patrick Venture | 6d7735d | 2019-06-21 10:03:19 -0700 | [diff] [blame] | 223 | /* Verifies it isn't triggered again. */ |
| 224 | EXPECT_CALL(*prepareMockPtr, trigger()).Times(0); |
| 225 | |
Patrick Venture | d4e20de | 2019-07-18 12:48:05 -0700 | [diff] [blame] | 226 | EXPECT_CALL(*imageMock2, open(staticLayoutBlobId)).WillOnce(Return(true)); |
Patrick Venture | da8fcd1 | 2019-05-23 18:53:50 -0700 | [diff] [blame] | 227 | EXPECT_TRUE(handler->open(session, flags, staticLayoutBlobId)); |
Patrick Venture | 6fdd02e | 2019-05-28 13:02:04 -0700 | [diff] [blame] | 228 | expectedState(FirmwareBlobHandler::UpdateState::uploadInProgress); |
Patrick Venture | efba42d | 2019-05-24 10:48:16 -0700 | [diff] [blame] | 229 | |
Patrick Venture | 930c7b7 | 2019-05-24 11:11:08 -0700 | [diff] [blame] | 230 | expectedBlobs.erase( |
Patrick Venture | 6fdd02e | 2019-05-28 13:02:04 -0700 | [diff] [blame] | 231 | std::remove(expectedBlobs.begin(), expectedBlobs.end(), verifyBlobId), |
| 232 | expectedBlobs.end()); |
Patrick Venture | 930c7b7 | 2019-05-24 11:11:08 -0700 | [diff] [blame] | 233 | |
| 234 | /* Verify the active blob ID was not added to the list twice and |
| 235 | * verifyBlobId is removed |
| 236 | */ |
Patrick Venture | efba42d | 2019-05-24 10:48:16 -0700 | [diff] [blame] | 237 | EXPECT_THAT(handler->getBlobIds(), |
| 238 | UnorderedElementsAreArray(expectedBlobs)); |
Patrick Venture | da8fcd1 | 2019-05-23 18:53:50 -0700 | [diff] [blame] | 239 | } |
| 240 | |
| 241 | /* |
Patrick Venture | 1e389c9 | 2019-05-23 19:15:05 -0700 | [diff] [blame] | 242 | * close(session) |
| 243 | */ |
| 244 | TEST_F(FirmwareHandlerVerificationPendingTest, |
Patrick Venture | 6fdd02e | 2019-05-28 13:02:04 -0700 | [diff] [blame] | 245 | ClosingVerifyBlobWithoutCommitDoesNotChangeState) |
Patrick Venture | 1e389c9 | 2019-05-23 19:15:05 -0700 | [diff] [blame] | 246 | { |
Patrick Venture | 6fdd02e | 2019-05-28 13:02:04 -0700 | [diff] [blame] | 247 | /* commit() will change the state, closing post-commit is part of |
| 248 | * verificationStarted testing. |
| 249 | */ |
Patrick Venture | 1e389c9 | 2019-05-23 19:15:05 -0700 | [diff] [blame] | 250 | getToVerificationPending(staticLayoutBlobId); |
| 251 | EXPECT_TRUE(handler->open(session, flags, verifyBlobId)); |
Patrick Venture | 6fdd02e | 2019-05-28 13:02:04 -0700 | [diff] [blame] | 252 | expectedState(FirmwareBlobHandler::UpdateState::verificationPending); |
Patrick Venture | 1e389c9 | 2019-05-23 19:15:05 -0700 | [diff] [blame] | 253 | |
| 254 | handler->close(session); |
Patrick Venture | 6fdd02e | 2019-05-28 13:02:04 -0700 | [diff] [blame] | 255 | expectedState(FirmwareBlobHandler::UpdateState::verificationPending); |
Patrick Venture | 1e389c9 | 2019-05-23 19:15:05 -0700 | [diff] [blame] | 256 | } |
| 257 | |
| 258 | /* |
Patrick Venture | 19044e1 | 2019-05-23 19:30:28 -0700 | [diff] [blame] | 259 | * commit(session) |
| 260 | */ |
| 261 | TEST_F(FirmwareHandlerVerificationPendingTest, |
| 262 | CommitOnVerifyBlobTriggersVerificationAndStateTransition) |
| 263 | { |
| 264 | getToVerificationPending(staticLayoutBlobId); |
| 265 | EXPECT_TRUE(handler->open(session, flags, verifyBlobId)); |
Patrick Venture | 1d66fe6 | 2019-06-03 14:57:27 -0700 | [diff] [blame] | 266 | EXPECT_CALL(*verifyMockPtr, trigger()).WillOnce(Return(true)); |
Patrick Venture | 19044e1 | 2019-05-23 19:30:28 -0700 | [diff] [blame] | 267 | |
| 268 | EXPECT_TRUE(handler->commit(session, {})); |
Patrick Venture | 6fdd02e | 2019-05-28 13:02:04 -0700 | [diff] [blame] | 269 | expectedState(FirmwareBlobHandler::UpdateState::verificationStarted); |
Patrick Venture | 19044e1 | 2019-05-23 19:30:28 -0700 | [diff] [blame] | 270 | } |
| 271 | |
| 272 | /* |
Patrick Venture | da8fcd1 | 2019-05-23 18:53:50 -0700 | [diff] [blame] | 273 | * stat(session) - in this state, you can only open(verifyBlobId) without |
| 274 | * changing state. |
| 275 | */ |
Patrick Venture | 01a3327 | 2019-05-23 19:48:22 -0700 | [diff] [blame] | 276 | TEST_F(FirmwareHandlerVerificationPendingTest, StatOnVerifyBlobIdReturnsState) |
| 277 | { |
| 278 | /* If this is called before commit(), it's still verificationPending, so it |
| 279 | * just returns the state is other |
| 280 | */ |
| 281 | getToVerificationPending(staticLayoutBlobId); |
| 282 | EXPECT_TRUE(handler->open(session, flags, verifyBlobId)); |
Patrick Venture | 1d66fe6 | 2019-06-03 14:57:27 -0700 | [diff] [blame] | 283 | EXPECT_CALL(*verifyMockPtr, trigger()).Times(0); |
Patrick Venture | f1f0f65 | 2019-06-03 09:10:19 -0700 | [diff] [blame] | 284 | EXPECT_CALL(*verifyMockPtr, status()).Times(0); |
Patrick Venture | 01a3327 | 2019-05-23 19:48:22 -0700 | [diff] [blame] | 285 | |
| 286 | blobs::BlobMeta meta, expectedMeta = {}; |
| 287 | expectedMeta.size = 0; |
| 288 | expectedMeta.blobState = flags; |
| 289 | expectedMeta.metadata.push_back( |
Patrick Venture | da66fd8 | 2019-06-03 11:11:24 -0700 | [diff] [blame] | 290 | static_cast<std::uint8_t>(ActionStatus::unknown)); |
Patrick Venture | 01a3327 | 2019-05-23 19:48:22 -0700 | [diff] [blame] | 291 | |
| 292 | EXPECT_TRUE(handler->stat(session, &meta)); |
| 293 | EXPECT_EQ(expectedMeta, meta); |
| 294 | } |
| 295 | |
Patrick Venture | b386b86 | 2019-05-23 18:42:54 -0700 | [diff] [blame] | 296 | /* |
Patrick Venture | b386b86 | 2019-05-23 18:42:54 -0700 | [diff] [blame] | 297 | * writemeta(session) |
| 298 | */ |
Patrick Venture | b611a08 | 2019-05-23 20:27:28 -0700 | [diff] [blame] | 299 | TEST_F(FirmwareHandlerVerificationPendingTest, WriteMetaAgainstVerifyFails) |
| 300 | { |
| 301 | /* The verifyBlobId has no data handler, which means write meta fails. */ |
| 302 | getToVerificationPending(staticLayoutBlobId); |
| 303 | |
| 304 | EXPECT_TRUE(handler->open(session, flags, verifyBlobId)); |
| 305 | |
| 306 | std::vector<std::uint8_t> bytes = {0x01, 0x02}; |
| 307 | EXPECT_FALSE(handler->writeMeta(session, 0, bytes)); |
| 308 | } |
| 309 | |
Patrick Venture | b386b86 | 2019-05-23 18:42:54 -0700 | [diff] [blame] | 310 | /* |
| 311 | * write(session) |
| 312 | */ |
Patrick Venture | ab731e9 | 2019-05-24 09:58:00 -0700 | [diff] [blame] | 313 | TEST_F(FirmwareHandlerVerificationPendingTest, WriteAgainstVerifyBlobIdFails) |
| 314 | { |
| 315 | getToVerificationPending(staticLayoutBlobId); |
| 316 | |
| 317 | EXPECT_TRUE(handler->open(session, flags, verifyBlobId)); |
| 318 | |
| 319 | std::vector<std::uint8_t> bytes = {0x01, 0x02}; |
| 320 | EXPECT_FALSE(handler->write(session, 0, bytes)); |
| 321 | } |
| 322 | |
Patrick Venture | b386b86 | 2019-05-23 18:42:54 -0700 | [diff] [blame] | 323 | /* |
| 324 | * read(session) |
| 325 | */ |
Patrick Venture | 2567ebc | 2019-05-24 10:02:53 -0700 | [diff] [blame] | 326 | TEST_F(FirmwareHandlerVerificationPendingTest, |
| 327 | ReadAgainstVerifyBlobIdReturnsEmpty) |
| 328 | { |
| 329 | getToVerificationPending(staticLayoutBlobId); |
| 330 | |
| 331 | EXPECT_TRUE(handler->open(session, flags, verifyBlobId)); |
Patrick Venture | 0f82ce4 | 2019-05-28 14:06:04 -0700 | [diff] [blame] | 332 | EXPECT_THAT(handler->read(session, 0, 1), IsEmpty()); |
Patrick Venture | 2567ebc | 2019-05-24 10:02:53 -0700 | [diff] [blame] | 333 | } |
Patrick Venture | b386b86 | 2019-05-23 18:42:54 -0700 | [diff] [blame] | 334 | |
Patrick Venture | 61d2ed4 | 2019-05-23 18:16:31 -0700 | [diff] [blame] | 335 | } // namespace |
| 336 | } // namespace ipmi_flash |