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 a test for the bug fixed in subr...



details:   https://anonhg.NetBSD.org/src/rev/1952d67c053f
branches:  trunk
changeset: 574868:1952d67c053f
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Tue Mar 15 18:27:23 2005 +0000

description:
Add a test for the bug fixed in subr_extent.c rev 1.51.

diffstat:

 regress/sys/kern/extent/extest.exp |  13 ++++++++++++-
 regress/sys/kern/extent/tests      |  16 +++++++++++++++-
 2 files changed, 27 insertions(+), 2 deletions(-)

diffs (51 lines):

diff -r 8c2cbe7cf3ca -r 1952d67c053f regress/sys/kern/extent/extest.exp
--- a/regress/sys/kern/extent/extest.exp        Tue Mar 15 18:22:24 2005 +0000
+++ b/regress/sys/kern/extent/extest.exp        Tue Mar 15 18:27:23 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: extest.exp,v 1.8 2002/02/21 03:59:25 mrg Exp $
+# $NetBSD: extest.exp,v 1.9 2005/03/15 18:27:23 bouyer Exp $
 # real output must start in line 4
 
 output for test1
@@ -63,3 +63,14 @@
 extent `test10' (0xc0002000 - 0xffffe000), flags = 0x0
      0xc0010000 - 0xc0011fff
      0xc0022000 - 0xc0031fff
+output for test11
+result: 0x10
+result: 0x1e
+result: 0x20
+error: Resource temporarily unavailable
+result: 0x14
+extent `test11' (0x10 - 0x20), flags = 0x2
+     0x10 - 0x13
+     0x14 - 0x14
+     0x1e - 0x1f
+     0x20 - 0x20
diff -r 8c2cbe7cf3ca -r 1952d67c053f regress/sys/kern/extent/tests
--- a/regress/sys/kern/extent/tests     Tue Mar 15 18:22:24 2005 +0000
+++ b/regress/sys/kern/extent/tests     Tue Mar 15 18:27:23 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: tests,v 1.8 2002/02/21 03:59:25 mrg Exp $
+# $NetBSD: tests,v 1.9 2005/03/15 18:27:23 bouyer Exp $
 
 #fill up an extent, should coalesce into one allocation
 extent test1 0 0x4f
@@ -84,3 +84,17 @@
 print
 alloc_subregion 0xc0002000 0xffffe000 0x10000
 print
+#If we have something like that in the EX_NOCOALESCE case:
+#extent `test11' (0x10 - 0x20), flags = 0x2
+#  0x10 - 0x13
+#  0x1e - 0x1f
+#  0x20 - 0x20
+#then a new extent of size 1 could be allocated at 0x20.
+# fixed in 1.51
+extent test11 0x10 0x20 EX_NOCOALESCE
+alloc_subregion 0x10 0x13 0x4
+alloc_subregion 0x1e 0x1f 0x2
+alloc_subregion 0x20 0x20 0x1
+alloc_subregion 0x20 0x20 0x1
+alloc_subregion 0x10 0x20 0x1
+print



Home | Main Index | Thread Index | Old Index