Attention is currently required from: jacz@semihalf.com. Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46458 )
Change subject: tests: Add lib/imd_cbmem-test test case ......................................................................
Patch Set 11:
(2 comments)
File tests/lib/imd_cbmem-test.c:
https://review.coreboot.org/c/coreboot/+/46458/comment/10dee1ee_ae3e6666 PS11, Line 144: /* Expect clean initialization of cbmem */
Sure, this comment is confusing. […]
Well, the end result is that it fails. How far exactly it gets is more of an implementation detail and not interesting. The point is that it's an error result and CBMEM is not initialized afterwards because calling cbmem_initialize() implies that it needs earlier data to recover (I admit our naming isn't really great there).
I just find this comment confusing, just say something like /* cbmem_initialize() fails when there's no existing CBMEM to recover */ or something like that.
https://review.coreboot.org/c/coreboot/+/46458/comment/106eb7e9_aa08130b PS11, Line 543: memcpy(cbmem_buffer, get_cbmem_ptr(), CBMEM_SIZE);
I do not think that storing 32+KiB of raw data in a test file is a good solution. […]
Yes, storing this as a separate file sounds good as well.
I think just saying that this is an image of how CBMEM should look after your prepare_simple_cbmem() function is description enough.