2000-07-03 02:36:50 +04:00
|
|
|
# $NetBSD: tests,v 1.5 2000/07/02 22:36:50 pk Exp $
|
1999-05-11 23:14:50 +04:00
|
|
|
|
|
|
|
#fill up an extent, should coalesce into one allocation
|
|
|
|
extent test1 0 0x4f
|
|
|
|
alloc_region 0x00 0x10
|
|
|
|
alloc_region 0x20 0x10
|
|
|
|
alloc_region 0x40 0x10
|
|
|
|
alloc_region 0x10 0x10
|
|
|
|
alloc_subregion 0 0x4f 0x10
|
|
|
|
print
|
|
|
|
|
|
|
|
#check whether subregion is obeyed (PR kern/7539)
|
|
|
|
extent test2 0 0x2f EX_NOCOALESCE
|
|
|
|
alloc_region 0x00 0x10
|
|
|
|
alloc_subregion 0x20 0x30 0x10
|
|
|
|
print
|
|
|
|
|
|
|
|
#check overlap into subregion (fixed in 1.25)
|
|
|
|
extent test3 0 0x3f EX_NOCOALESCE
|
|
|
|
alloc_region 0x00 0x20
|
|
|
|
alloc_region 0x30 0x10
|
|
|
|
alloc_subregion 0x10 0x3f 0x10
|
|
|
|
print
|
2000-06-16 22:50:45 +04:00
|
|
|
|
|
|
|
#check overflow in boundary check, before an allocated region (fixed in 1.32)
|
|
|
|
extent test4 0xf0000000 0xffffffff
|
|
|
|
alloc_region 0xf1000000 0x1
|
|
|
|
boundary 0x20000000
|
|
|
|
alloc_subregion 0xf0000000 0xffffffff 0x1
|
|
|
|
print
|
|
|
|
|
|
|
|
#check overflow in boundary check, before the subregion end (fixed in 1.32)
|
|
|
|
extent test5 0xf0000000 0xffffffff
|
|
|
|
boundary 0x20000000
|
|
|
|
alloc_subregion 0xf0000000 0xffffffff 0x1
|
|
|
|
print
|
2000-06-28 01:08:30 +04:00
|
|
|
|
|
|
|
#check allocation beyond last boundary line (to be fixed)
|
2000-06-28 01:30:03 +04:00
|
|
|
# last two allocations should succeed without boundary "fixups"
|
2000-07-03 02:36:50 +04:00
|
|
|
extent test6 0 11
|
2000-06-28 01:08:30 +04:00
|
|
|
boundary 8
|
2000-07-03 02:36:50 +04:00
|
|
|
alloc_subregion 0 11 8
|
|
|
|
alloc_subregion 0 11 2
|
|
|
|
alloc_subregion 0 11 2
|
2000-06-28 01:08:30 +04:00
|
|
|
print
|
2000-06-28 01:30:03 +04:00
|
|
|
|
|
|
|
#check allocation beyond last boundary line (to be fixed)
|
|
|
|
# last allocation should be bumped to the next boundary and exactly fit
|
|
|
|
# the remaining space
|
2000-07-03 02:36:50 +04:00
|
|
|
extent test7 0 11
|
2000-06-28 01:30:03 +04:00
|
|
|
boundary 8
|
2000-07-03 02:36:50 +04:00
|
|
|
alloc_subregion 0 11 7
|
|
|
|
alloc_subregion 0 11 4
|
2000-06-28 01:30:03 +04:00
|
|
|
print
|