Attention is currently required from: Arthur Heymans, Jakub Czapiga, Patrick Rudolph.
Julius Werner has posted comments on this change by Arthur Heymans. ( https://review.coreboot.org/c/coreboot/+/82421?usp=email )
Change subject: lib/malloc.c: Move heap as part of BSS ......................................................................
Patch Set 4:
(1 comment)
File tests/lib/malloc-test.c:
https://review.coreboot.org/c/coreboot/+/82421/comment/f20553f1_50a10b24?usp... : PS4, Line 34: TEST_SYMBOL(heap, _test_heap); I'm not really sure there's a point for any of these four lines in this test. TEST_SYMBOL() and TEST_REGION() are only necessary when you need to mock a particular linker script symbol name because the coreboot code under test directly accesses that symbol. In this test I think all they needed was a local byte array.
And now, that you have the byte array in malloc.c already, I think the test can just use it? I think all you need to do here is have `setup_test()` reinitialize the three globals to point to the full array again.