summaryrefslogtreecommitdiff
path: root/tests/lib/memrange-test.c
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2022-08-10 22:01:35 +0200
committerMartin Roth <martin.roth@amd.corp-partner.google.com>2022-08-26 17:35:54 +0000
commitc0e3004af0ab9c3c91b55c438630e5a425171b5e (patch)
treee247cc6784bb2383de371b99a44f5da338a6ccfc /tests/lib/memrange-test.c
parent3741e99bd604777e824d169f3ff5f375d03e26b3 (diff)
tests/memrange-test: Correct final end test in test_memrange_steal()
If an inserted region's base wasn't aligned, the resulting range should still cover the original end (original region's base + size) and not the aligned-down base + size. Change-Id: I8f1c9456d6dbab4fa868de5c93fa3656397e54c1 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/66607 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'tests/lib/memrange-test.c')
-rw-r--r--tests/lib/memrange-test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/lib/memrange-test.c b/tests/lib/memrange-test.c
index f5922066df..557ade4c89 100644
--- a/tests/lib/memrange-test.c
+++ b/tests/lib/memrange-test.c
@@ -529,7 +529,7 @@ static void test_memrange_steal(void **state)
ALIGN_DOWN(res_mock[READONLY_TAG].base, MEMRANGE_ALIGN));
assert_int_equal(
range_entry_end(ptr),
- ALIGN_UP(range_entry_base(ptr) + res_mock[READONLY_TAG].size,
+ ALIGN_UP(res_mock[READONLY_TAG].base + res_mock[READONLY_TAG].size,
MEMRANGE_ALIGN));
}
count++;