3 comments:
File tests/lib/bootmem-test.c:
Patch Set #1, Line 93: test_
How about test_bootmem_write_mem_table, setup_bootmem_write_mem_table, and teardown_bootmem_write_me […]
Done
Patch Set #1, Line 122: /* This test need to be run first, in order to use bootmem library API */
You are right, I'm making use of one memory table across all the tests. […]
Done
File tests/lib/bootmem-test.c:
struct lb_memory *lb_mem;
will_return_always(search_global_resources, &mem_device_mock);
/* Allocate space for 5 lb_mem entries to be safe */
lb_mem = malloc(sizeof(*lb_mem) + 5 * sizeof(struct lb_memory_range));
/* We need to call this only to initialize library */
bootmem_write_memory_table(lb_mem);
free(lb_mem);
Rather than copy/pasting this code into three tests, put it in a function (call it something like "init_memory_table_library"), add comments to the function about why it needs to be called, and then call the function from each of these tests.
To view, visit change 43510. To unsubscribe, or for help writing mail filters, visit settings.