summaryrefslogtreecommitdiffstats
path: root/test/write_flash.c
diff options
context:
space:
mode:
authorSuraj Jitindar Singh <sjitindarsingh@gmail.com>2017-05-03 16:57:25 +1000
committerAndrew Jeffery <andrew@aj.id.au>2017-05-04 01:20:23 +0000
commit6f3197df572db57f22d5ae6d8564fb1979a39259 (patch)
treef4da1ffc9a38bd61bc8fc8270586fbeae8142839 /test/write_flash.c
parent29b3e8a0bc057ed9a12a99c24cabff6998bcc3c8 (diff)
downloadphosphor-mboxd-6f3197df572db57f22d5ae6d8564fb1979a39259.tar.gz
phosphor-mboxd-6f3197df572db57f22d5ae6d8564fb1979a39259.zip
test: Set mbox_vlog in tests so we don't segfault
mbox_vlog contains the function pointer for the logging function called in MSG_<ERR/INFO/DEBUG>. Currently we don't set it in the <write/copy/erase>_flash tests meaning if there is any test output that we try to dereference a null pointer and thus segfault. Set it in these tests so that we can get test output which can be useful for debugging and most importantly so that we don't segfault which is annoying... Change-Id: If91725ded0ee5d6c3ab0a8925126065ec43b0cc3 Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Diffstat (limited to 'test/write_flash.c')
-rw-r--r--test/write_flash.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/write_flash.c b/test/write_flash.c
index 382a4a2..ebd0fb7 100644
--- a/test/write_flash.c
+++ b/test/write_flash.c
@@ -77,6 +77,8 @@ int main(void)
atexit(cleanup);
+ mbox_vlog = &mbox_log_console;
+
rc = init_flash_dev(context);
assert(rc == 0);
OpenPOWER on IntegriCloud