diff mbox series

[v2,08/52] test-ipmi-hiomap: Ensure the completion code is set

Message ID 20190221062851.21958-9-andrew@aj.id.au
State Accepted
Headers show
Series ipmi-hiomap: Tests and fixes for event handling | expand

Commit Message

Andrew Jeffery Feb. 21, 2019, 6:28 a.m. UTC
ipmi_queue_msg_sync() intercepts and implements the IPMI transfers for
the test scenarios. In some scenarios we want to return IPMI error
codes, so make sure the msg->cc field is set.

Cc: stable
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 libflash/test/test-ipmi-hiomap.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/libflash/test/test-ipmi-hiomap.c b/libflash/test/test-ipmi-hiomap.c
index e2330fe85486..738352cc89f1 100644
--- a/libflash/test/test-ipmi-hiomap.c
+++ b/libflash/test/test-ipmi-hiomap.c
@@ -164,6 +164,8 @@  void ipmi_queue_msg_sync(struct ipmi_msg *msg)
 		}
 		assert(false);
 	}
+
+	msg->cc = cmd->cc;
 	memcpy(msg->data, &cmd->resp, msg->resp_size);
 
 	msg->complete(msg);