6 comments:
File tests/lib/bootmem-test.c:
Patch Set #2, Line 171: static int setup_bootmem_walk(void **state)
I'm somewhat confused why you always need the setup and teardown, can't you just make 'ranges' and ' […]
This is because in my concept I would need to use non-constant initializers (linker symbols), which is not allowed. My idea was to somehow bind values in linker script with this used here (e.g. CACHEABLE_START == _program). This may be no longer valid once we follow your approach with using "asm()" instructions.
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 "i […]
Makes sense.
Patch Set #2, Line 247: /* Below range covers two differently tagged regions */
This comment sounds like you meant to add +1 to the size, but you actually added it to the tag.
Oops, you are right.
Patch Set #2, Line 249: assert_int_equal(ret, 0);
I think we'd want a lot more here in general to really cover the intended functionality with these t […]
As with memrange patchset - I want this to be pretty complete. Let me add more cases for next version.
double parens?
To be fixed.
File tests/lib/bootmem-test.ld:
There's a lot of coreboot code accessing linker script symbols and regions, so we gotta come up with […]
Nice trick with using asm() here. Keeping symbols definition within the same file as test harness sounds like a much better approach. Let my try whether this work nice for my case, if so, then let's go this way.
To view, visit change 43510. To unsubscribe, or for help writing mail filters, visit settings.