summaryrefslogtreecommitdiff
path: root/test/lib
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2023-10-10 08:54:17 -0400
committerTom Rini <[email protected]>2023-10-10 08:54:17 -0400
commit833ff23047c50e4053fb1bda21f4e2c9f6a3aa6a (patch)
tree422a1ac1688b75a6c4edcbaa2024346acbaddfb8 /test/lib
parentd9bb6d779b69c2548891e568e5e2a23e1b7eedaa (diff)
parent3f876cb7c57511174d1b6a3e089443ccbaf236ec (diff)
Merge branch '2023-10-09-assorted-fixes'
- Cleanup how we pick what to launch in SPL, a few test changes, some TI K3 platform updates, top-level Makefile fixes and related cleanup, correct a problem with LMB overlap, other assorted fixes.
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/lmb.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/lib/lmb.c b/test/lib/lmb.c
index 16288750358..15c68ce3961 100644
--- a/test/lib/lmb.c
+++ b/test/lib/lmb.c
@@ -451,12 +451,23 @@ static int lib_test_lmb_overlapping_reserve(struct unit_test_state *uts)
ut_asserteq(ret, 0);
ASSERT_LMB(&lmb, ram, ram_size, 2, 0x40010000, 0x10000,
0x40030000, 0x10000, 0, 0);
- /* allocate 2nd region */
+ /* allocate 2nd region , This should coalesced all region into one */
ret = lmb_reserve(&lmb, 0x40020000, 0x10000);
ut_assert(ret >= 0);
ASSERT_LMB(&lmb, ram, ram_size, 1, 0x40010000, 0x30000,
0, 0, 0, 0);
+ /* allocate 2nd region, which should be added as first region */
+ ret = lmb_reserve(&lmb, 0x40000000, 0x8000);
+ ut_assert(ret >= 0);
+ ASSERT_LMB(&lmb, ram, ram_size, 2, 0x40000000, 0x8000,
+ 0x40010000, 0x30000, 0, 0);
+
+ /* allocate 3rd region, coalesce with first and overlap with second */
+ ret = lmb_reserve(&lmb, 0x40008000, 0x10000);
+ ut_assert(ret >= 0);
+ ASSERT_LMB(&lmb, ram, ram_size, 1, 0x40000000, 0x40000,
+ 0, 0, 0, 0);
return 0;
}