Attention is currently required from: Jakub Czapiga, Jan Dabros.
4 comments:
File tests/lib/bootmem-test.c:
Patch Set #6, Line 9: #define assert(statement) mock_assert(statement, #statement, __FILE__, __LINE__)
(Sorry for holding this patch up again but you added yet another new thing that requires discussion now. ;) )
Having a mechanism to mock asserts is great, but let's not hack it individually at the top of every test. We need something generic to do this that other tests can reuse. I think the only good option there is to put this into coreboot's <assert.h>.
So first, we need a way to distinguish building for tests from building normally. You should add a -D__TEST__ to TEST_CFLAGS, and then you can define an ENV_TEST in <rules.h> based on that (similar to what we have for stages). Then you can use that in <assert.h> to define different behavior for tests.
Patch Set #6, Line 13: #include <string.h>
nit: alphabetize?
Patch Set #6, Line 167: assert_memory_equal(sentinel_value_buffer,
nit: I've seen this construct (malloc() and memset() something just to compare it) in a couple of tests now, maybe we should have a global assert_memory_filled_with() helper for that.
Patch Set #6, Line 381: 0xE0000000
0xF0000000
To view, visit change 43510. To unsubscribe, or for help writing mail filters, visit settings.