From f46ed4f7ee79f7093c3a8d494052f5d8656e6101 Mon Sep 17 00:00:00 2001 From: Andrew Jeffery Date: Thu, 21 Feb 2019 16:58:08 +1030 Subject: test-ipmi-hiomap: Print some information on early 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 Signed-off-by: Stewart Smith --- libflash/test/test-ipmi-hiomap.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libflash') diff --git a/libflash/test/test-ipmi-hiomap.c b/libflash/test/test-ipmi-hiomap.c index 738352cc..4e1232f2 100644 --- a/libflash/test/test-ipmi-hiomap.c +++ b/libflash/test/test-ipmi-hiomap.c @@ -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)), -- cgit v1.2.1