From 875f7315f3fc2838b60607f334ecbb534d70ad94 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Wed, 10 Aug 2022 21:48:01 +0200 Subject: [PATCH] tests/memrange-test: Correct commentary on test_memrange_steal() Currently, memranges_steal() steals at the lowest possible address. This is actually reflected by the test code that checks if the *base* of the READONLY_TAG range changes. Furthermore, the test ends with the memranges restored, so revise the comment on the final state. Change-Id: Idef71ce464280c6805145f229de9e8913ba850bc Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/c/coreboot/+/66606 Reviewed-by: Arthur Heymans Reviewed-by: Jan Dabros Tested-by: build bot (Jenkins) --- tests/lib/memrange-test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/lib/memrange-test.c b/tests/lib/memrange-test.c index e812c74e24..f5922066df 100644 --- a/tests/lib/memrange-test.c +++ b/tests/lib/memrange-test.c @@ -461,7 +461,7 @@ static void test_memrange_holes(void **state) * memory from region with READONLY_TAG. * * Example memory ranges (res_mock1) for test_memrange_steal. - * Space marked with (/) is not covered by any region at the end of the test. + * Space marked with (/) is stolen during the test. * * +--------CACHEABLE_TAG--------+ <-0xE000 * | | @@ -471,10 +471,10 @@ static void test_memrange_holes(void **state) * * * - * +--------READONLY_TAG---------+ <-0xFF0000 + * +--------READONLY_TAG---------+ <-0xFF0000 <-stolen_base + * |/////////////////////////////| <-stolen_base + 0x4000 + * | | * | | - * |/////////////////////////////| <-stolen_base - * |/////////////////////////////| <-stolen_base + 0x4000 * +-----------------------------+ <-0x1000000 * *