Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/regress/sys/kern/extent add test cases for the boundary over...



details:   https://anonhg.NetBSD.org/src/rev/7a2a57060c79
branches:  trunk
changeset: 488012:7a2a57060c79
user:      drochner <drochner%NetBSD.org@localhost>
date:      Fri Jun 16 18:50:45 2000 +0000

description:
add test cases for the boundary overflows just fixed by mrg

diffstat:

 regress/sys/kern/extent/extest.awk |  10 +++++++++-
 regress/sys/kern/extent/extest.exp |  11 ++++++++++-
 regress/sys/kern/extent/tests      |  15 ++++++++++++++-
 3 files changed, 33 insertions(+), 3 deletions(-)

diffs (72 lines):

diff -r 69ba69539b77 -r 7a2a57060c79 regress/sys/kern/extent/extest.awk
--- a/regress/sys/kern/extent/extest.awk        Fri Jun 16 18:45:32 2000 +0000
+++ b/regress/sys/kern/extent/extest.awk        Fri Jun 16 18:50:45 2000 +0000
@@ -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 @@
        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 -r 69ba69539b77 -r 7a2a57060c79 regress/sys/kern/extent/extest.exp
--- a/regress/sys/kern/extent/extest.exp        Fri Jun 16 18:45:32 2000 +0000
+++ b/regress/sys/kern/extent/extest.exp        Fri Jun 16 18:50:45 2000 +0000
@@ -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 @@
      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 -r 69ba69539b77 -r 7a2a57060c79 regress/sys/kern/extent/tests
--- a/regress/sys/kern/extent/tests     Fri Jun 16 18:45:32 2000 +0000
+++ b/regress/sys/kern/extent/tests     Fri Jun 16 18:50:45 2000 +0000
@@ -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 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



Home | Main Index | Thread Index | Old Index