diff options
author | Patrick Venture <venture@google.com> | 2018-11-13 12:52:30 -0800 |
---|---|---|
committer | Patrick Venture <venture@google.com> | 2018-11-13 15:24:53 -0800 |
commit | ebf7b9b60cb57913ac20b669203cd9192b660b7e (patch) | |
tree | 23688ab2d25677f54c884d266436d19745e64598 /test/process_unittest.cpp | |
parent | 4125880028cc4a825f710b9e1b09986aacd4e1bb (diff) | |
download | phosphor-ipmi-blobs-ebf7b9b60cb57913ac20b669203cd9192b660b7e.tar.gz phosphor-ipmi-blobs-ebf7b9b60cb57913ac20b669203cd9192b660b7e.zip |
bugfix: skip 0'd crc bytes on reply computation
Skip the 0'd CRC bytes on reply computation, mirroring the skipping
during request validation.
Tested: Verified via client the CRC for the reply now matches
expectations.
Change-Id: I18da28604a388fb4210c55f3e54410a067b9f10a
Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'test/process_unittest.cpp')
-rw-r--r-- | test/process_unittest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/process_unittest.cpp b/test/process_unittest.cpp index 4f8c9a6..a908ee6 100644 --- a/test/process_unittest.cpp +++ b/test/process_unittest.cpp @@ -294,7 +294,7 @@ TEST(ProcessBlobCommandTest, CommandReturnsOkWithValidPayloadLength) dataLen = sizeof(request); EXPECT_CALL(crc, clear()); - EXPECT_CALL(crc, compute(_, payloadLen)); + EXPECT_CALL(crc, compute(_, payloadLen - sizeof(uint16_t))); EXPECT_CALL(crc, get()).WillOnce(Return(0x3412)); EXPECT_EQ(IPMI_CC_OK, |