Commit bf2417e5 authored by Andrew Jeffery's avatar Andrew Jeffery

test/mbox: Use assertions for error handling

No need to try to exit gracefully in the test cases.

Change-Id: Id558c5201c08bdb0b34859cb3af1a0efa1a2809b
Signed-off-by: Andrew Jeffery's avatarAndrew Jeffery <>
parent 261f61a1
......@@ -292,11 +292,8 @@ int mbox_set_mtd_data(struct mbox_context *context, const void *data,
/* Sanity check */
arg = container_of(context, struct mbox_test_context, context);
if (&test != arg)
return -1;
if (len > test.context.mtd_info.size)
return -2;
assert(&test == arg);
assert(len <= test.context.flash_size);
map = mmap(NULL, test.context.mtd_info.size, PROT_WRITE, MAP_SHARED,
test.flash.fd, 0);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment