Skip to content

Commit

Permalink
test-ipmi-hiomap: Ensure the completion code is set
Browse files Browse the repository at this point in the history
[ Upstream commit 5293333 ]

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>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
  • Loading branch information
amboar authored and Vasant Hegde committed Mar 4, 2019
1 parent 3056fcd commit 7cb5eca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libflash/test/test-ipmi-hiomap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7cb5eca

Please sign in to comment.