Skip to content

Commit

Permalink
test-ipmi-hiomap: Print some information on early
Browse files Browse the repository at this point in the history
[ Upstream commit f46ed4f ]
 scenario_exit()

Now we dump the index of the event that we exited on if it's not the
appropriate scenario event type.

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 cfaabae commit ea7d8f1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libflash/test/test-ipmi-hiomap.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ static void scenario_advance(void)

static void scenario_exit(void)
{
assert(ipmi_msg_ctx.cursor->type == scenario_sentinel);
if (ipmi_msg_ctx.cursor->type != scenario_sentinel) {
ptrdiff_t d = ipmi_msg_ctx.cursor - ipmi_msg_ctx.scenario;
printf("%s: Exiting on event %tu with event type %d \n",
__func__, d, ipmi_msg_ctx.cursor->type);
assert(false);
}
}

void ipmi_init_msg(struct ipmi_msg *msg, int interface __attribute__((unused)),
Expand Down

0 comments on commit ea7d8f1

Please sign in to comment.