diff options
author | Andrew Jeffery <andrew@aj.id.au> | 2019-02-21 16:58:08 +1030 |
---|---|---|
committer | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2019-03-04 23:02:18 +0530 |
commit | ea7d8f1ae8017954b5df57852493e46fc34feabd (patch) | |
tree | 1ac7dcb415ee1de9487ae399fec0be58906d1aaf | |
parent | cfaabaeb605dccd9e709a743811cd636f624cf92 (diff) | |
download | skiboot-ea7d8f1ae8017954b5df57852493e46fc34feabd.zip skiboot-ea7d8f1ae8017954b5df57852493e46fc34feabd.tar.gz skiboot-ea7d8f1ae8017954b5df57852493e46fc34feabd.tar.bz2 |
test-ipmi-hiomap: Print some information on early
[ Upstream commit f46ed4f7ee79f7093c3a8d494052f5d8656e6101 ]
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>
-rw-r--r-- | libflash/test/test-ipmi-hiomap.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libflash/test/test-ipmi-hiomap.c b/libflash/test/test-ipmi-hiomap.c index 738352c..4e1232f 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)), |