diff --git a/regress/sys/kern/extent/extest.awk b/regress/sys/kern/extent/extest.awk index 97246da7dcae..154407db5547 100644 --- a/regress/sys/kern/extent/extest.awk +++ b/regress/sys/kern/extent/extest.awk @@ -1,4 +1,4 @@ -# $NetBSD: extest.awk,v 1.3 2000/06/06 17:30:41 thorpej Exp $ +# $NetBSD: extest.awk,v 1.4 2000/06/16 18:50:45 drochner Exp $ BEGIN { first = 1; @@ -37,6 +37,14 @@ $1 == "extent" { first = 0; } +$1 == "align" { + align = $2; +} + +$1 == "boundary" { + boundary = $2; +} + $1 == "alloc_region" { printf("error = extent_alloc_region(ex, %s, %s, 0);\n", $2, $3) diff --git a/regress/sys/kern/extent/extest.exp b/regress/sys/kern/extent/extest.exp index 77993e4566e3..b00adbe6cd42 100644 --- a/regress/sys/kern/extent/extest.exp +++ b/regress/sys/kern/extent/extest.exp @@ -1,4 +1,4 @@ -# $NetBSD: extest.exp,v 1.1 1999/05/11 19:14:50 drochner Exp $ +# $NetBSD: extest.exp,v 1.2 2000/06/16 18:50:46 drochner Exp $ # real output must start in line 4 output for test1 @@ -16,3 +16,12 @@ extent `test3' (0x0 - 0x3f), flags = 0x2 0x0 - 0x1f 0x20 - 0x2f 0x30 - 0x3f +output for test4 +result: 0xf0000000 +extent `test4' (0xf0000000 - 0xffffffff), flags = 0x0 + 0xf0000000 - 0xf0000000 + 0xf1000000 - 0xf1000000 +output for test5 +result: 0xf0000000 +extent `test5' (0xf0000000 - 0xffffffff), flags = 0x0 + 0xf0000000 - 0xf0000000 diff --git a/regress/sys/kern/extent/tests b/regress/sys/kern/extent/tests index 02884a0cea44..cc76aa0f0a43 100644 --- a/regress/sys/kern/extent/tests +++ b/regress/sys/kern/extent/tests @@ -1,4 +1,4 @@ -# $NetBSD: tests,v 1.1 1999/05/11 19:14:50 drochner Exp $ +# $NetBSD: tests,v 1.2 2000/06/16 18:50:46 drochner Exp $ #fill up an extent, should coalesce into one allocation extent test1 0 0x4f @@ -21,3 +21,16 @@ alloc_region 0x00 0x20 alloc_region 0x30 0x10 alloc_subregion 0x10 0x3f 0x10 print + +#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