diff --git a/test/Makefile.am.include b/test/Makefile.am.include index 845c13a58fd62baab591d28c6533ff0f22d32ace..de1bfce2be585e0a6e1d58ef1fc76624b64c736a 100644 --- a/test/Makefile.am.include +++ b/test/Makefile.am.include @@ -4,7 +4,8 @@ test_flash_copy_SOURCES = \ %reldir%/flash_copy.c \ flash.c \ common.c mtd.c \ - %reldir%/tmpf.c + %reldir%/tmpf.c \ + %reldir%/system.c test_flash_erase_SOURCES = \ %reldir%/flash_erase.c \ diff --git a/test/flash_copy.c b/test/flash_copy.c index 08dfc1a55c2356a17f7aa8398cc6b2cf77166a65..3b88b76505f3d292a27756f8c235760e7090cfd9 100644 --- a/test/flash_copy.c +++ b/test/flash_copy.c @@ -13,6 +13,7 @@ #include "mboxd.h" #include "flash.h" +#include "test/system.h" #include "test/tmpf.h" #define TEST_SIZE 4096 @@ -26,7 +27,7 @@ void cleanup(void) int main(void) { - struct mbox_context context; + struct mbox_context context = {0}; ssize_t processed; int rand_fd; char *src; @@ -35,6 +36,8 @@ int main(void) atexit(cleanup); + system_set_mtd_sizes(TEST_SIZE, TEST_SIZE); + mbox_vlog = &mbox_log_console; src = malloc(TEST_SIZE);