Skip to content

Commit

Permalink
test-ipmi-hiomap: Print some information on early scenario_exit()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
amboar authored and stewartsmith committed Feb 22, 2019
1 parent 5293333 commit f46ed4f
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 f46ed4f

Please sign in to comment.