summaryrefslogtreecommitdiffstats
path: root/test/process_unittest.cpp
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2019-01-10 13:12:20 -0800
committerPatrick Venture <venture@google.com>2019-01-14 17:02:48 +0000
commitd1c3e86f2368ec69098a4e786a5c4e9d2455ae1d (patch)
treebc8d15ec7233090f803d7be76bbd94b87a57e731 /test/process_unittest.cpp
parent2f58151ea0f49929eb7d1ebaa42b429883677670 (diff)
downloadphosphor-ipmi-blobs-d1c3e86f2368ec69098a4e786a5c4e9d2455ae1d.tar.gz
phosphor-ipmi-blobs-d1c3e86f2368ec69098a4e786a5c4e9d2455ae1d.zip
bugfix: process: can be only crc
The read command, if returning 0 bytes of data, does return the CRC. Tested: Verified via a client implementation that it now behaves as expected on returning 0 bytes from a read (returns only the CRC). Change-Id: I84200c0fbe8400cc9234b55991fee750cb84faa2 Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'test/process_unittest.cpp')
-rw-r--r--test/process_unittest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/process_unittest.cpp b/test/process_unittest.cpp
index a908ee6..0f683e5 100644
--- a/test/process_unittest.cpp
+++ b/test/process_unittest.cpp
@@ -250,8 +250,8 @@ TEST(ProcessBlobCommandTest, CommandReturnsOkWithNoPayload)
TEST(ProcessBlobCommandTest, CommandReturnsOkWithInvalidPayloadLength)
{
- // There is a minimum payload length of 3 bytes, this command returns a
- // payload of 2 bytes.
+ // There is a minimum payload length of 2 bytes (the CRC only, no data, for
+ // read), this returns 1.
StrictMock<CrcMock> crc;
StrictMock<ManagerMock> manager;
@@ -261,7 +261,7 @@ TEST(ProcessBlobCommandTest, CommandReturnsOkWithInvalidPayloadLength)
IpmiBlobHandler h = [](ManagerInterface* mgr, const uint8_t* reqBuf,
uint8_t* replyCmdBuf, size_t* dataLen) {
- (*dataLen) = sizeof(uint16_t);
+ (*dataLen) = sizeof(uint8_t);
return IPMI_CC_OK;
};
OpenPOWER on IntegriCloud