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>
diff --git a/test/copy_flash.c b/test/copy_flash.c
index 14ce854..5c40b53 100644
--- a/test/copy_flash.c
+++ b/test/copy_flash.c
@@ -51,6 +51,8 @@
 
 	atexit(cleanup);
 
+	mbox_vlog = &mbox_log_console;
+
 	src = malloc(TEST_SIZE);
 	dst = malloc(TEST_SIZE);
 	if (!(src && dst)) {
diff --git a/test/erase_flash.c b/test/erase_flash.c
index 23a536f..71e87b5 100644
--- a/test/erase_flash.c
+++ b/test/erase_flash.c
@@ -120,6 +120,8 @@
 	if (rc)
 		return rc;
 
+	mbox_vlog = &mbox_log_console;
+
 	n_ioctls = 0;
 	recorded = NULL;
 
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 @@
 
 	atexit(cleanup);
 
+	mbox_vlog = &mbox_log_console;
+
 	rc = init_flash_dev(context);
 	assert(rc == 0);