summaryrefslogtreecommitdiffstats
path: root/tools/regression/geom/Test
diff options
context:
space:
mode:
Diffstat (limited to 'tools/regression/geom/Test')
-rw-r--r--tools/regression/geom/Test/Makefile10
-rw-r--r--tools/regression/geom/Test/Makefile.inc35
-rw-r--r--tools/regression/geom/Test/T000/Makefile3
-rw-r--r--tools/regression/geom/Test/T000/ref.conf23
-rw-r--r--tools/regression/geom/Test/T000/testprg.c66
-rw-r--r--tools/regression/geom/Test/T001/Makefile3
-rw-r--r--tools/regression/geom/Test/T001/ref.conf414
-rw-r--r--tools/regression/geom/Test/T001/testprg.c69
-rw-r--r--tools/regression/geom/Test/T002/Makefile3
-rw-r--r--tools/regression/geom/Test/T002/ref.conf115
-rw-r--r--tools/regression/geom/Test/T002/testprg.c69
-rw-r--r--tools/regression/geom/Test/T003/Makefile3
-rw-r--r--tools/regression/geom/Test/T003/ref.conf729
-rw-r--r--tools/regression/geom/Test/T003/testprg.c69
-rw-r--r--tools/regression/geom/Test/T004/Makefile3
-rw-r--r--tools/regression/geom/Test/T004/ref.conf305
-rw-r--r--tools/regression/geom/Test/T004/testprg.c69
-rw-r--r--tools/regression/geom/Test/T005/Makefile3
-rw-r--r--tools/regression/geom/Test/T005/ref.conf138
-rw-r--r--tools/regression/geom/Test/T005/testprg.c69
-rw-r--r--tools/regression/geom/Test/T006/Makefile3
-rw-r--r--tools/regression/geom/Test/T006/ref.conf47
-rw-r--r--tools/regression/geom/Test/T006/testprg.c69
-rw-r--r--tools/regression/geom/Test/T007/Makefile3
-rw-r--r--tools/regression/geom/Test/T007/ref.conf23
-rw-r--r--tools/regression/geom/Test/T007/testprg.c73
-rw-r--r--tools/regression/geom/Test/T008/Makefile3
-rw-r--r--tools/regression/geom/Test/T008/ref.conf23
-rw-r--r--tools/regression/geom/Test/T008/testprg.c75
-rw-r--r--tools/regression/geom/Test/T009/Makefile3
-rw-r--r--tools/regression/geom/Test/T009/ref.conf23
-rw-r--r--tools/regression/geom/Test/T009/testprg.c89
-rw-r--r--tools/regression/geom/Test/T010/Makefile3
-rw-r--r--tools/regression/geom/Test/T010/ref.conf88
-rw-r--r--tools/regression/geom/Test/T010/testprg.c98
-rw-r--r--tools/regression/geom/Test/T011/Makefile3
-rw-r--r--tools/regression/geom/Test/T011/ref.conf47
-rw-r--r--tools/regression/geom/Test/T011/testprg.c78
-rw-r--r--tools/regression/geom/Test/T012/Makefile3
-rw-r--r--tools/regression/geom/Test/T012/ref.conf382
-rw-r--r--tools/regression/geom/Test/T012/testprg.c73
41 files changed, 3407 insertions, 0 deletions
diff --git a/tools/regression/geom/Test/Makefile b/tools/regression/geom/Test/Makefile
new file mode 100644
index 0000000..2be96e3
--- /dev/null
+++ b/tools/regression/geom/Test/Makefile
@@ -0,0 +1,10 @@
+# $FreeBSD$
+
+SUBDIR+= T000 T001 T002 T003 T004 T005 T006 T007 T008 T009
+SUBDIR+= T010 T011 T012
+
+# SUBDIR+= T999
+
+.include <bsd.subdir.mk>
+
+test: _SUBDIRUSE
diff --git a/tools/regression/geom/Test/Makefile.inc b/tools/regression/geom/Test/Makefile.inc
new file mode 100644
index 0000000..452efc5
--- /dev/null
+++ b/tools/regression/geom/Test/Makefile.inc
@@ -0,0 +1,35 @@
+# $FreeBSD$
+
+PROG = testprg
+NOMAN = no
+NOOBJ = youbet
+CFLAGS += -g -W -Wall -Wstrict-prototypes -Wmissing-prototypes
+CFLAGS += -Wpointer-arith -static -I/usr/src/sys
+LDADD += -L../../GLib -lG
+LDADD += -L/usr/local/lib -lexpat
+DPADD += ../../GLib/libG.a
+CLEANFILES += _* *.core
+WARNS= 2
+
+foo:
+ echo ${SRCS}
+ echo ${OBJS}
+
+ttest: ${PROG}
+ ./${PROG} -t 2>&1 | tee _test
+
+tbtest: ${PROG}
+ ./${PROG} -t -b 2>&1 | tee _test
+
+test: ${PROG}
+ ./${PROG}
+.if exists(ref.conf)
+ ../../ConfCmp/ConfCmp _1.conf ref.conf
+.endif
+ echo "Passed ${.CURDIR}"
+
+mkref:
+ mv _1.conf ref.conf
+
+gdb:
+ gdb ${PROG} ${PROG}.core
diff --git a/tools/regression/geom/Test/T000/Makefile b/tools/regression/geom/Test/T000/Makefile
new file mode 100644
index 0000000..e944636
--- /dev/null
+++ b/tools/regression/geom/Test/T000/Makefile
@@ -0,0 +1,3 @@
+# $FreeBSD$
+.include "../Makefile.inc"
+.include <bsd.prog.mk>
diff --git a/tools/regression/geom/Test/T000/ref.conf b/tools/regression/geom/Test/T000/ref.conf
new file mode 100644
index 0000000..a375ddf
--- /dev/null
+++ b/tools/regression/geom/Test/T000/ref.conf
@@ -0,0 +1,23 @@
+<mesh>
+ <FreeBSD>$FreeBSD$</FreeBSD>
+ <method>
+ <ref>0x805ba60</ref>
+ <name>DEV-method</name>
+ </method>
+ <method>
+ <ref>0x805b9a0</ref>
+ <name>MBREXT-method</name>
+ </method>
+ <method>
+ <ref>0x805ba40</ref>
+ <name>MBR-method</name>
+ </method>
+ <method>
+ <ref>0x805ba80</ref>
+ <name>BSD-method</name>
+ </method>
+ <method>
+ <ref>0x805b980</ref>
+ <name>SIMDISK-method</name>
+ </method>
+</mesh>
diff --git a/tools/regression/geom/Test/T000/testprg.c b/tools/regression/geom/Test/T000/testprg.c
new file mode 100644
index 0000000..fe28455
--- /dev/null
+++ b/tools/regression/geom/Test/T000/testprg.c
@@ -0,0 +1,66 @@
+/*-
+ * Copyright (c) 2002 Poul-Henning Kamp
+ * Copyright (c) 2002 Networks Associates Technology, Inc.
+ * All rights reserved.
+ *
+ * This software was developed for the FreeBSD Project by Poul-Henning Kamp
+ * and NAI Labs, the Security Research Division of Network Associates, Inc.
+ * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+ * DARPA CHATS research program.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The names of the authors may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <err.h>
+#include <sys/errno.h>
+#include <sys/time.h>
+#include <sys/sbuf.h>
+#include <geom/geom.h>
+
+int
+thread_sim(void *ptr __unused)
+{
+
+ rattle();
+ g_simdisk_init();
+ g_bsd_init();
+ g_mbr_init();
+ g_mbrext_init();
+ g_dev_init(NULL);
+ rattle();
+ conff("1");
+ printf("Done\n");
+ done();
+ return (0);
+}
+
diff --git a/tools/regression/geom/Test/T001/Makefile b/tools/regression/geom/Test/T001/Makefile
new file mode 100644
index 0000000..e944636
--- /dev/null
+++ b/tools/regression/geom/Test/T001/Makefile
@@ -0,0 +1,3 @@
+# $FreeBSD$
+.include "../Makefile.inc"
+.include <bsd.prog.mk>
diff --git a/tools/regression/geom/Test/T001/ref.conf b/tools/regression/geom/Test/T001/ref.conf
new file mode 100644
index 0000000..80a643e
--- /dev/null
+++ b/tools/regression/geom/Test/T001/ref.conf
@@ -0,0 +1,414 @@
+<mesh>
+ <FreeBSD>$FreeBSD$</FreeBSD>
+ <method>
+ <ref>0x8071cc0</ref>
+ <name>DEV-method</name>
+ <geom>
+ <ref>0x80c1580</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s3d</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x80c1600</ref>
+ <geom><ref>0x80c1580</ref></geom>
+ <provider><ref>0x80bed00</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80c1480</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s3c</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x80c1500</ref>
+ <geom><ref>0x80c1480</ref></geom>
+ <provider><ref>0x80bec80</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80c1380</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s3a</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x80c1400</ref>
+ <geom><ref>0x80c1380</ref></geom>
+ <provider><ref>0x80bec00</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80c1280</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s2c</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x80c1300</ref>
+ <geom><ref>0x80c1280</ref></geom>
+ <provider><ref>0x80be980</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80c1180</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s1f</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x80c1200</ref>
+ <geom><ref>0x80c1180</ref></geom>
+ <provider><ref>0x80be700</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80c1080</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s1e</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x80c1100</ref>
+ <geom><ref>0x80c1080</ref></geom>
+ <provider><ref>0x80be680</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80bef80</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s1c</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x80c1000</ref>
+ <geom><ref>0x80bef80</ref></geom>
+ <provider><ref>0x80be600</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80bee80</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s1b</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x80bef00</ref>
+ <geom><ref>0x80bee80</ref></geom>
+ <provider><ref>0x80be580</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80bed80</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s1a</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x80bee00</ref>
+ <geom><ref>0x80bed80</ref></geom>
+ <provider><ref>0x80be500</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80bea00</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s3</name>
+ <rank>3</rank>
+ <consumer>
+ <ref>0x80bea80</ref>
+ <geom><ref>0x80bea00</ref></geom>
+ <provider><ref>0x80be280</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80be780</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s2</name>
+ <rank>3</rank>
+ <consumer>
+ <ref>0x80be800</ref>
+ <geom><ref>0x80be780</ref></geom>
+ <provider><ref>0x80be200</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80be300</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s1</name>
+ <rank>3</rank>
+ <consumer>
+ <ref>0x80be380</ref>
+ <geom><ref>0x80be300</ref></geom>
+ <provider><ref>0x80be180</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80ba080</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0</name>
+ <rank>2</rank>
+ <consumer>
+ <ref>0x80be080</ref>
+ <geom><ref>0x80ba080</ref></geom>
+ <provider><ref>0x80be000</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ </method>
+ <method>
+ <ref>0x8071c00</ref>
+ <name>MBREXT-method</name>
+ </method>
+ <method>
+ <ref>0x8071ca0</ref>
+ <name>MBR-method</name>
+ <geom>
+ <ref>0x80ba0c0</ref>
+ <method><ref>0x8071ca0</ref></method>
+ <name>ad0</name>
+ <rank>2</rank>
+ <config>
+ </config>
+ <consumer>
+ <ref>0x80be100</ref>
+ <geom><ref>0x80ba0c0</ref></geom>
+ <provider><ref>0x80be000</ref></provider>
+ <mode>r0w0e0</mode>
+ <config>
+ </config>
+ </consumer>
+ <provider>
+ <ref>0x80be280</ref>
+ <geom><ref>0x80ba0c0</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s3</name>
+ <config>
+ <index>2</index>
+ <length>8585256960</length>
+ <seclength>16768080</seclength>
+ <offset>8585256960</offset>
+ <secoffset>16768080</secoffset>
+ <type>165</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80be200</ref>
+ <geom><ref>0x80ba0c0</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s2</name>
+ <config>
+ <index>1</index>
+ <length>5364817920</length>
+ <seclength>10478160</seclength>
+ <offset>3220439040</offset>
+ <secoffset>6289920</secoffset>
+ <type>165</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80be180</ref>
+ <geom><ref>0x80ba0c0</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s1</name>
+ <config>
+ <index>0</index>
+ <length>3220406784</length>
+ <seclength>6289857</seclength>
+ <offset>32256</offset>
+ <secoffset>63</secoffset>
+ <type>165</type>
+ </config>
+ </provider>
+ </geom>
+ </method>
+ <method>
+ <ref>0x8071ce0</ref>
+ <name>BSD-method</name>
+ <geom>
+ <ref>0x80beb00</ref>
+ <method><ref>0x8071ce0</ref></method>
+ <name>ad0s3</name>
+ <rank>3</rank>
+ <config>
+ </config>
+ <consumer>
+ <ref>0x80beb80</ref>
+ <geom><ref>0x80beb00</ref></geom>
+ <provider><ref>0x80be280</ref></provider>
+ <mode>r0w0e0</mode>
+ <config>
+ </config>
+ </consumer>
+ <provider>
+ <ref>0x80bed00</ref>
+ <geom><ref>0x80beb00</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s3d</name>
+ <config>
+ <index>3</index>
+ <length>6488104960</length>
+ <seclength>12672080</seclength>
+ <offset>2097152000</offset>
+ <secoffset>4096000</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80bec80</ref>
+ <geom><ref>0x80beb00</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s3c</name>
+ <config>
+ <index>2</index>
+ <length>8585256960</length>
+ <seclength>16768080</seclength>
+ <offset>0</offset>
+ <secoffset>0</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80bec00</ref>
+ <geom><ref>0x80beb00</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s3a</name>
+ <config>
+ <index>0</index>
+ <length>2097152000</length>
+ <seclength>4096000</seclength>
+ <offset>0</offset>
+ <secoffset>0</secoffset>
+ </config>
+ </provider>
+ </geom>
+ <geom>
+ <ref>0x80be880</ref>
+ <method><ref>0x8071ce0</ref></method>
+ <name>ad0s2</name>
+ <rank>3</rank>
+ <config>
+ </config>
+ <consumer>
+ <ref>0x80be900</ref>
+ <geom><ref>0x80be880</ref></geom>
+ <provider><ref>0x80be200</ref></provider>
+ <mode>r0w0e0</mode>
+ <config>
+ </config>
+ </consumer>
+ <provider>
+ <ref>0x80be980</ref>
+ <geom><ref>0x80be880</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s2c</name>
+ <config>
+ <index>2</index>
+ <length>5364817920</length>
+ <seclength>10478160</seclength>
+ <offset>0</offset>
+ <secoffset>0</secoffset>
+ </config>
+ </provider>
+ </geom>
+ <geom>
+ <ref>0x80be400</ref>
+ <method><ref>0x8071ce0</ref></method>
+ <name>ad0s1</name>
+ <rank>3</rank>
+ <config>
+ </config>
+ <consumer>
+ <ref>0x80be480</ref>
+ <geom><ref>0x80be400</ref></geom>
+ <provider><ref>0x80be180</ref></provider>
+ <mode>r0w0e0</mode>
+ <config>
+ </config>
+ </consumer>
+ <provider>
+ <ref>0x80be700</ref>
+ <geom><ref>0x80be400</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s1f</name>
+ <config>
+ <index>5</index>
+ <length>2066973184</length>
+ <seclength>4037057</seclength>
+ <offset>1153433600</offset>
+ <secoffset>2252800</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80be680</ref>
+ <geom><ref>0x80be400</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s1e</name>
+ <config>
+ <index>4</index>
+ <length>524288000</length>
+ <seclength>1024000</seclength>
+ <offset>629145600</offset>
+ <secoffset>1228800</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80be600</ref>
+ <geom><ref>0x80be400</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s1c</name>
+ <config>
+ <index>2</index>
+ <length>3220406784</length>
+ <seclength>6289857</seclength>
+ <offset>0</offset>
+ <secoffset>0</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80be580</ref>
+ <geom><ref>0x80be400</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s1b</name>
+ <config>
+ <index>1</index>
+ <length>524288000</length>
+ <seclength>1024000</seclength>
+ <offset>104857600</offset>
+ <secoffset>204800</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80be500</ref>
+ <geom><ref>0x80be400</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s1a</name>
+ <config>
+ <index>0</index>
+ <length>104857600</length>
+ <seclength>204800</seclength>
+ <offset>0</offset>
+ <secoffset>0</secoffset>
+ </config>
+ </provider>
+ </geom>
+ </method>
+ <method>
+ <ref>0x8071be0</ref>
+ <name>SIMDISK-method</name>
+ <geom>
+ <ref>0x80ba040</ref>
+ <method><ref>0x8071be0</ref></method>
+ <name>ad0</name>
+ <rank>1</rank>
+ <provider>
+ <ref>0x80be000</ref>
+ <geom><ref>0x80ba040</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0</name>
+ </provider>
+ </geom>
+ </method>
+</mesh>
diff --git a/tools/regression/geom/Test/T001/testprg.c b/tools/regression/geom/Test/T001/testprg.c
new file mode 100644
index 0000000..1c7865a
--- /dev/null
+++ b/tools/regression/geom/Test/T001/testprg.c
@@ -0,0 +1,69 @@
+/*-
+ * Copyright (c) 2002 Poul-Henning Kamp
+ * Copyright (c) 2002 Networks Associates Technology, Inc.
+ * All rights reserved.
+ *
+ * This software was developed for the FreeBSD Project by Poul-Henning Kamp
+ * and NAI Labs, the Security Research Division of Network Associates, Inc.
+ * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+ * DARPA CHATS research program.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The names of the authors may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <err.h>
+#include <sys/errno.h>
+#include <sys/time.h>
+#include <sys/sbuf.h>
+#include <geom/geom.h>
+
+int
+thread_sim(void *ptr __unused)
+{
+
+ rattle();
+ g_simdisk_init();
+ g_bsd_init();
+ g_mbr_init();
+ g_mbrext_init();
+ g_dev_init(NULL);
+ rattle();
+
+ g_simdisk_xml_load("ad0", "../../Data/disk.typo.ad0.xml");
+ rattle();
+ conff("1");
+ printf("Done\n");
+ done();
+ return (0);
+}
+
diff --git a/tools/regression/geom/Test/T002/Makefile b/tools/regression/geom/Test/T002/Makefile
new file mode 100644
index 0000000..e944636
--- /dev/null
+++ b/tools/regression/geom/Test/T002/Makefile
@@ -0,0 +1,3 @@
+# $FreeBSD$
+.include "../Makefile.inc"
+.include <bsd.prog.mk>
diff --git a/tools/regression/geom/Test/T002/ref.conf b/tools/regression/geom/Test/T002/ref.conf
new file mode 100644
index 0000000..19c5200
--- /dev/null
+++ b/tools/regression/geom/Test/T002/ref.conf
@@ -0,0 +1,115 @@
+<mesh>
+ <FreeBSD>$FreeBSD$</FreeBSD>
+ <method>
+ <ref>0x8071cc0</ref>
+ <name>DEV-method</name>
+ <geom>
+ <ref>0x80bb380</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s2</name>
+ <rank>3</rank>
+ <consumer>
+ <ref>0x80bb400</ref>
+ <geom><ref>0x80bb380</ref></geom>
+ <provider><ref>0x80bb200</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80bb280</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s1</name>
+ <rank>3</rank>
+ <consumer>
+ <ref>0x80bb300</ref>
+ <geom><ref>0x80bb280</ref></geom>
+ <provider><ref>0x80bb180</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80ba080</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0</name>
+ <rank>2</rank>
+ <consumer>
+ <ref>0x80bb080</ref>
+ <geom><ref>0x80ba080</ref></geom>
+ <provider><ref>0x80bb000</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ </method>
+ <method>
+ <ref>0x8071c00</ref>
+ <name>MBREXT-method</name>
+ </method>
+ <method>
+ <ref>0x8071ca0</ref>
+ <name>MBR-method</name>
+ <geom>
+ <ref>0x80ba0c0</ref>
+ <method><ref>0x8071ca0</ref></method>
+ <name>ad0</name>
+ <rank>2</rank>
+ <config>
+ </config>
+ <consumer>
+ <ref>0x80bb100</ref>
+ <geom><ref>0x80ba0c0</ref></geom>
+ <provider><ref>0x80bb000</ref></provider>
+ <mode>r0w0e0</mode>
+ <config>
+ </config>
+ </consumer>
+ <provider>
+ <ref>0x80bb200</ref>
+ <geom><ref>0x80ba0c0</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s2</name>
+ <config>
+ <index>1</index>
+ <length>4564740096</length>
+ <seclength>8915508</seclength>
+ <offset>296884224</offset>
+ <secoffset>579852</secoffset>
+ <type>11</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80bb180</ref>
+ <geom><ref>0x80ba0c0</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s1</name>
+ <config>
+ <index>0</index>
+ <length>296821760</length>
+ <seclength>579730</seclength>
+ <offset>32256</offset>
+ <secoffset>63</secoffset>
+ <type>160</type>
+ </config>
+ </provider>
+ </geom>
+ </method>
+ <method>
+ <ref>0x8071ce0</ref>
+ <name>BSD-method</name>
+ </method>
+ <method>
+ <ref>0x8071be0</ref>
+ <name>SIMDISK-method</name>
+ <geom>
+ <ref>0x80ba040</ref>
+ <method><ref>0x8071be0</ref></method>
+ <name>ad0</name>
+ <rank>1</rank>
+ <provider>
+ <ref>0x80bb000</ref>
+ <geom><ref>0x80ba040</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0</name>
+ </provider>
+ </geom>
+ </method>
+</mesh>
diff --git a/tools/regression/geom/Test/T002/testprg.c b/tools/regression/geom/Test/T002/testprg.c
new file mode 100644
index 0000000..7ffcd68
--- /dev/null
+++ b/tools/regression/geom/Test/T002/testprg.c
@@ -0,0 +1,69 @@
+/*-
+ * Copyright (c) 2002 Poul-Henning Kamp
+ * Copyright (c) 2002 Networks Associates Technology, Inc.
+ * All rights reserved.
+ *
+ * This software was developed for the FreeBSD Project by Poul-Henning Kamp
+ * and NAI Labs, the Security Research Division of Network Associates, Inc.
+ * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+ * DARPA CHATS research program.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The names of the authors may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <err.h>
+#include <sys/errno.h>
+#include <sys/time.h>
+#include <sys/sbuf.h>
+#include <geom/geom.h>
+
+int
+thread_sim(void *ptr __unused)
+{
+
+ rattle();
+ g_simdisk_init();
+ g_bsd_init();
+ g_mbr_init();
+ g_mbrext_init();
+ g_dev_init(NULL);
+ rattle();
+
+ g_simdisk_xml_load("ad0", "../../Data/disk.far.ad0.xml");
+ rattle();
+ conff("1");
+ printf("Done\n");
+ done();
+ return (0);
+}
+
diff --git a/tools/regression/geom/Test/T003/Makefile b/tools/regression/geom/Test/T003/Makefile
new file mode 100644
index 0000000..e944636
--- /dev/null
+++ b/tools/regression/geom/Test/T003/Makefile
@@ -0,0 +1,3 @@
+# $FreeBSD$
+.include "../Makefile.inc"
+.include <bsd.prog.mk>
diff --git a/tools/regression/geom/Test/T003/ref.conf b/tools/regression/geom/Test/T003/ref.conf
new file mode 100644
index 0000000..fedaa69
--- /dev/null
+++ b/tools/regression/geom/Test/T003/ref.conf
@@ -0,0 +1,729 @@
+<mesh>
+ <FreeBSD>$FreeBSD$</FreeBSD>
+ <method>
+ <ref>0x8071cc0</ref>
+ <name>DEV-method</name>
+ <geom>
+ <ref>0x8124700</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s27</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x8124780</ref>
+ <geom><ref>0x8124700</ref></geom>
+ <provider><ref>0x8101080</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x8124600</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s26</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x8124680</ref>
+ <geom><ref>0x8124600</ref></geom>
+ <provider><ref>0x8101000</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x8124500</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s25</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x8124580</ref>
+ <geom><ref>0x8124500</ref></geom>
+ <provider><ref>0x80ccf80</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x8124400</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s24</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x8124480</ref>
+ <geom><ref>0x8124400</ref></geom>
+ <provider><ref>0x80ccf00</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x8124300</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s23</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x8124380</ref>
+ <geom><ref>0x8124300</ref></geom>
+ <provider><ref>0x80cce80</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x8124200</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s22</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x8124280</ref>
+ <geom><ref>0x8124200</ref></geom>
+ <provider><ref>0x80cce00</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x8124100</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s21</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x8124180</ref>
+ <geom><ref>0x8124100</ref></geom>
+ <provider><ref>0x80ccd80</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x8124000</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s20</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x8124080</ref>
+ <geom><ref>0x8124000</ref></geom>
+ <provider><ref>0x80ccd00</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x8101f00</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s19</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x8101f80</ref>
+ <geom><ref>0x8101f00</ref></geom>
+ <provider><ref>0x80ccc80</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x8101e00</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s18</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x8101e80</ref>
+ <geom><ref>0x8101e00</ref></geom>
+ <provider><ref>0x80ccc00</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x8101d00</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s17</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x8101d80</ref>
+ <geom><ref>0x8101d00</ref></geom>
+ <provider><ref>0x80ccb80</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x8101c00</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s16</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x8101c80</ref>
+ <geom><ref>0x8101c00</ref></geom>
+ <provider><ref>0x80ccb00</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x8101b00</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s15</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x8101b80</ref>
+ <geom><ref>0x8101b00</ref></geom>
+ <provider><ref>0x80cca80</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x8101a00</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s14</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x8101a80</ref>
+ <geom><ref>0x8101a00</ref></geom>
+ <provider><ref>0x80cca00</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x8101900</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s13</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x8101980</ref>
+ <geom><ref>0x8101900</ref></geom>
+ <provider><ref>0x80cc980</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x8101800</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s12</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x8101880</ref>
+ <geom><ref>0x8101800</ref></geom>
+ <provider><ref>0x80cc900</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x8101700</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s11</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x8101780</ref>
+ <geom><ref>0x8101700</ref></geom>
+ <provider><ref>0x80cc880</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x8101600</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s10</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x8101680</ref>
+ <geom><ref>0x8101600</ref></geom>
+ <provider><ref>0x80cc800</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x8101500</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s9</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x8101580</ref>
+ <geom><ref>0x8101500</ref></geom>
+ <provider><ref>0x80cc780</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x8101400</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s8</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x8101480</ref>
+ <geom><ref>0x8101400</ref></geom>
+ <provider><ref>0x80cc700</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x8101300</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s7</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x8101380</ref>
+ <geom><ref>0x8101300</ref></geom>
+ <provider><ref>0x80cc680</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x8101200</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s6</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x8101280</ref>
+ <geom><ref>0x8101200</ref></geom>
+ <provider><ref>0x80cc600</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x8101100</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s5</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x8101180</ref>
+ <geom><ref>0x8101100</ref></geom>
+ <provider><ref>0x80cc580</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80cc380</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s2</name>
+ <rank>3</rank>
+ <consumer>
+ <ref>0x80cc400</ref>
+ <geom><ref>0x80cc380</ref></geom>
+ <provider><ref>0x80cc200</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80cc280</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0s1</name>
+ <rank>3</rank>
+ <consumer>
+ <ref>0x80cc300</ref>
+ <geom><ref>0x80cc280</ref></geom>
+ <provider><ref>0x80cc180</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80ba080</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0</name>
+ <rank>2</rank>
+ <consumer>
+ <ref>0x80cc080</ref>
+ <geom><ref>0x80ba080</ref></geom>
+ <provider><ref>0x80cc000</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ </method>
+ <method>
+ <ref>0x8071c00</ref>
+ <name>MBREXT-method</name>
+ <geom>
+ <ref>0x80cc480</ref>
+ <method><ref>0x8071c00</ref></method>
+ <name>ad0s2</name>
+ <rank>3</rank>
+ <config>
+ </config>
+ <consumer>
+ <ref>0x80cc500</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <provider><ref>0x80cc200</ref></provider>
+ <mode>r0w0e0</mode>
+ <config>
+ </config>
+ </consumer>
+ <provider>
+ <ref>0x8101080</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s27</name>
+ <config>
+ <index>22</index>
+ <length>8193024</length>
+ <seclength>16002</seclength>
+ <offset>180988416</offset>
+ <secoffset>353493</secoffset>
+ <type>1</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x8101000</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s26</name>
+ <config>
+ <index>21</index>
+ <length>8193024</length>
+ <seclength>16002</seclength>
+ <offset>172763136</offset>
+ <secoffset>337428</secoffset>
+ <type>1</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80ccf80</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s25</name>
+ <config>
+ <index>20</index>
+ <length>8193024</length>
+ <seclength>16002</seclength>
+ <offset>164537856</offset>
+ <secoffset>321363</secoffset>
+ <type>1</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80ccf00</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s24</name>
+ <config>
+ <index>19</index>
+ <length>8193024</length>
+ <seclength>16002</seclength>
+ <offset>156312576</offset>
+ <secoffset>305298</secoffset>
+ <type>1</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80cce80</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s23</name>
+ <config>
+ <index>18</index>
+ <length>8193024</length>
+ <seclength>16002</seclength>
+ <offset>148087296</offset>
+ <secoffset>289233</secoffset>
+ <type>1</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80cce00</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s22</name>
+ <config>
+ <index>17</index>
+ <length>8193024</length>
+ <seclength>16002</seclength>
+ <offset>139862016</offset>
+ <secoffset>273168</secoffset>
+ <type>1</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80ccd80</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s21</name>
+ <config>
+ <index>16</index>
+ <length>8193024</length>
+ <seclength>16002</seclength>
+ <offset>131636736</offset>
+ <secoffset>257103</secoffset>
+ <type>1</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80ccd00</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s20</name>
+ <config>
+ <index>15</index>
+ <length>8193024</length>
+ <seclength>16002</seclength>
+ <offset>123411456</offset>
+ <secoffset>241038</secoffset>
+ <type>1</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80ccc80</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s19</name>
+ <config>
+ <index>14</index>
+ <length>8193024</length>
+ <seclength>16002</seclength>
+ <offset>115186176</offset>
+ <secoffset>224973</secoffset>
+ <type>1</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80ccc00</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s18</name>
+ <config>
+ <index>13</index>
+ <length>8193024</length>
+ <seclength>16002</seclength>
+ <offset>106960896</offset>
+ <secoffset>208908</secoffset>
+ <type>1</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80ccb80</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s17</name>
+ <config>
+ <index>12</index>
+ <length>8193024</length>
+ <seclength>16002</seclength>
+ <offset>98735616</offset>
+ <secoffset>192843</secoffset>
+ <type>1</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80ccb00</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s16</name>
+ <config>
+ <index>11</index>
+ <length>8193024</length>
+ <seclength>16002</seclength>
+ <offset>90510336</offset>
+ <secoffset>176778</secoffset>
+ <type>1</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80cca80</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s15</name>
+ <config>
+ <index>10</index>
+ <length>8193024</length>
+ <seclength>16002</seclength>
+ <offset>82285056</offset>
+ <secoffset>160713</secoffset>
+ <type>1</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80cca00</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s14</name>
+ <config>
+ <index>9</index>
+ <length>8193024</length>
+ <seclength>16002</seclength>
+ <offset>74059776</offset>
+ <secoffset>144648</secoffset>
+ <type>1</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80cc980</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s13</name>
+ <config>
+ <index>8</index>
+ <length>8193024</length>
+ <seclength>16002</seclength>
+ <offset>65834496</offset>
+ <secoffset>128583</secoffset>
+ <type>1</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80cc900</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s12</name>
+ <config>
+ <index>7</index>
+ <length>8193024</length>
+ <seclength>16002</seclength>
+ <offset>57609216</offset>
+ <secoffset>112518</secoffset>
+ <type>1</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80cc880</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s11</name>
+ <config>
+ <index>6</index>
+ <length>8193024</length>
+ <seclength>16002</seclength>
+ <offset>49383936</offset>
+ <secoffset>96453</secoffset>
+ <type>1</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80cc800</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s10</name>
+ <config>
+ <index>5</index>
+ <length>8193024</length>
+ <seclength>16002</seclength>
+ <offset>41158656</offset>
+ <secoffset>80388</secoffset>
+ <type>1</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80cc780</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s9</name>
+ <config>
+ <index>4</index>
+ <length>8193024</length>
+ <seclength>16002</seclength>
+ <offset>32933376</offset>
+ <secoffset>64323</secoffset>
+ <type>1</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80cc700</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s8</name>
+ <config>
+ <index>3</index>
+ <length>8193024</length>
+ <seclength>16002</seclength>
+ <offset>24708096</offset>
+ <secoffset>48258</secoffset>
+ <type>1</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80cc680</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s7</name>
+ <config>
+ <index>2</index>
+ <length>8193024</length>
+ <seclength>16002</seclength>
+ <offset>16482816</offset>
+ <secoffset>32193</secoffset>
+ <type>1</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80cc600</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s6</name>
+ <config>
+ <index>1</index>
+ <length>8193024</length>
+ <seclength>16002</seclength>
+ <offset>8257536</offset>
+ <secoffset>16128</secoffset>
+ <type>1</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80cc580</ref>
+ <geom><ref>0x80cc480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s5</name>
+ <config>
+ <index>0</index>
+ <length>8193024</length>
+ <seclength>16002</seclength>
+ <offset>32256</offset>
+ <secoffset>63</secoffset>
+ <type>1</type>
+ </config>
+ </provider>
+ </geom>
+ </method>
+ <method>
+ <ref>0x8071ca0</ref>
+ <name>MBR-method</name>
+ <geom>
+ <ref>0x80ba0c0</ref>
+ <method><ref>0x8071ca0</ref></method>
+ <name>ad0</name>
+ <rank>2</rank>
+ <config>
+ </config>
+ <consumer>
+ <ref>0x80cc100</ref>
+ <geom><ref>0x80ba0c0</ref></geom>
+ <provider><ref>0x80cc000</ref></provider>
+ <mode>r0w0e0</mode>
+ <config>
+ </config>
+ </consumer>
+ <provider>
+ <ref>0x80cc200</ref>
+ <geom><ref>0x80ba0c0</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s2</name>
+ <config>
+ <index>1</index>
+ <length>427714560</length>
+ <seclength>835380</seclength>
+ <offset>2146798080</offset>
+ <secoffset>4192965</secoffset>
+ <type>5</type>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80cc180</ref>
+ <geom><ref>0x80ba0c0</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s1</name>
+ <config>
+ <index>0</index>
+ <length>2146765824</length>
+ <seclength>4192902</seclength>
+ <offset>32256</offset>
+ <secoffset>63</secoffset>
+ <type>6</type>
+ </config>
+ </provider>
+ </geom>
+ </method>
+ <method>
+ <ref>0x8071ce0</ref>
+ <name>BSD-method</name>
+ </method>
+ <method>
+ <ref>0x8071be0</ref>
+ <name>SIMDISK-method</name>
+ <geom>
+ <ref>0x80ba040</ref>
+ <method><ref>0x8071be0</ref></method>
+ <name>ad0</name>
+ <rank>1</rank>
+ <provider>
+ <ref>0x80cc000</ref>
+ <geom><ref>0x80ba040</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0</name>
+ </provider>
+ </geom>
+ </method>
+</mesh>
diff --git a/tools/regression/geom/Test/T003/testprg.c b/tools/regression/geom/Test/T003/testprg.c
new file mode 100644
index 0000000..70631ef
--- /dev/null
+++ b/tools/regression/geom/Test/T003/testprg.c
@@ -0,0 +1,69 @@
+/*-
+ * Copyright (c) 2002 Poul-Henning Kamp
+ * Copyright (c) 2002 Networks Associates Technology, Inc.
+ * All rights reserved.
+ *
+ * This software was developed for the FreeBSD Project by Poul-Henning Kamp
+ * and NAI Labs, the Security Research Division of Network Associates, Inc.
+ * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+ * DARPA CHATS research program.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The names of the authors may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <err.h>
+#include <sys/errno.h>
+#include <sys/time.h>
+#include <sys/sbuf.h>
+#include <geom/geom.h>
+
+int
+thread_sim(void *ptr __unused)
+{
+
+ rattle();
+ g_simdisk_init();
+ g_bsd_init();
+ g_mbr_init();
+ g_mbrext_init();
+ g_dev_init(NULL);
+ rattle();
+
+ g_simdisk_xml_load("ad0", "../../Data/disk.msdos.ext.xml");
+ rattle();
+ conff("1");
+ printf("Done\n");
+ done();
+ return (0);
+}
+
diff --git a/tools/regression/geom/Test/T004/Makefile b/tools/regression/geom/Test/T004/Makefile
new file mode 100644
index 0000000..e944636
--- /dev/null
+++ b/tools/regression/geom/Test/T004/Makefile
@@ -0,0 +1,3 @@
+# $FreeBSD$
+.include "../Makefile.inc"
+.include <bsd.prog.mk>
diff --git a/tools/regression/geom/Test/T004/ref.conf b/tools/regression/geom/Test/T004/ref.conf
new file mode 100644
index 0000000..03e296e
--- /dev/null
+++ b/tools/regression/geom/Test/T004/ref.conf
@@ -0,0 +1,305 @@
+<mesh>
+ <FreeBSD>$FreeBSD$</FreeBSD>
+ <method>
+ <ref>0x8071ce0</ref>
+ <name>DEV-method</name>
+ <geom>
+ <ref>0x80bef00</ref>
+ <method><ref>0x8071ce0</ref></method>
+ <name>ad0s1h</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x80bef80</ref>
+ <geom><ref>0x80bef00</ref></geom>
+ <provider><ref>0x80be780</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80bee00</ref>
+ <method><ref>0x8071ce0</ref></method>
+ <name>ad0s1g</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x80bee80</ref>
+ <geom><ref>0x80bee00</ref></geom>
+ <provider><ref>0x80be700</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80bed00</ref>
+ <method><ref>0x8071ce0</ref></method>
+ <name>ad0s1f</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x80bed80</ref>
+ <geom><ref>0x80bed00</ref></geom>
+ <provider><ref>0x80be680</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80bec00</ref>
+ <method><ref>0x8071ce0</ref></method>
+ <name>ad0s1e</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x80bec80</ref>
+ <geom><ref>0x80bec00</ref></geom>
+ <provider><ref>0x80be600</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80beb00</ref>
+ <method><ref>0x8071ce0</ref></method>
+ <name>ad0s1d</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x80beb80</ref>
+ <geom><ref>0x80beb00</ref></geom>
+ <provider><ref>0x80be580</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80bea00</ref>
+ <method><ref>0x8071ce0</ref></method>
+ <name>ad0s1c</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x80bea80</ref>
+ <geom><ref>0x80bea00</ref></geom>
+ <provider><ref>0x80be500</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80be900</ref>
+ <method><ref>0x8071ce0</ref></method>
+ <name>ad0s1b</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x80be980</ref>
+ <geom><ref>0x80be900</ref></geom>
+ <provider><ref>0x80be480</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80be800</ref>
+ <method><ref>0x8071ce0</ref></method>
+ <name>ad0s1a</name>
+ <rank>4</rank>
+ <consumer>
+ <ref>0x80be880</ref>
+ <geom><ref>0x80be800</ref></geom>
+ <provider><ref>0x80be400</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80be200</ref>
+ <method><ref>0x8071ce0</ref></method>
+ <name>ad0s1</name>
+ <rank>3</rank>
+ <consumer>
+ <ref>0x80be280</ref>
+ <geom><ref>0x80be200</ref></geom>
+ <provider><ref>0x80be180</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80ba080</ref>
+ <method><ref>0x8071ce0</ref></method>
+ <name>ad0</name>
+ <rank>2</rank>
+ <consumer>
+ <ref>0x80be080</ref>
+ <geom><ref>0x80ba080</ref></geom>
+ <provider><ref>0x80be000</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ </method>
+ <method>
+ <ref>0x8071c20</ref>
+ <name>MBREXT-method</name>
+ </method>
+ <method>
+ <ref>0x8071cc0</ref>
+ <name>MBR-method</name>
+ <geom>
+ <ref>0x80ba0c0</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0</name>
+ <rank>2</rank>
+ <config>
+ </config>
+ <consumer>
+ <ref>0x80be100</ref>
+ <geom><ref>0x80ba0c0</ref></geom>
+ <provider><ref>0x80be000</ref></provider>
+ <mode>r0w0e0</mode>
+ <config>
+ </config>
+ </consumer>
+ <provider>
+ <ref>0x80be180</ref>
+ <geom><ref>0x80ba0c0</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s1</name>
+ <config>
+ <index>0</index>
+ <length>20003848704</length>
+ <seclength>39070017</seclength>
+ <offset>32256</offset>
+ <secoffset>63</secoffset>
+ <type>165</type>
+ </config>
+ </provider>
+ </geom>
+ </method>
+ <method>
+ <ref>0x8071d00</ref>
+ <name>BSD-method</name>
+ <geom>
+ <ref>0x80be300</ref>
+ <method><ref>0x8071d00</ref></method>
+ <name>ad0s1</name>
+ <rank>3</rank>
+ <config>
+ </config>
+ <consumer>
+ <ref>0x80be380</ref>
+ <geom><ref>0x80be300</ref></geom>
+ <provider><ref>0x80be180</ref></provider>
+ <mode>r0w0e0</mode>
+ <config>
+ </config>
+ </consumer>
+ <provider>
+ <ref>0x80be780</ref>
+ <geom><ref>0x80be300</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s1h</name>
+ <config>
+ <index>7</index>
+ <length>5368709120</length>
+ <seclength>10485760</seclength>
+ <offset>10187964416</offset>
+ <secoffset>19898368</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80be700</ref>
+ <geom><ref>0x80be300</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s1g</name>
+ <config>
+ <index>6</index>
+ <length>3221225472</length>
+ <seclength>6291456</seclength>
+ <offset>6966738944</offset>
+ <secoffset>13606912</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80be680</ref>
+ <geom><ref>0x80be300</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s1f</name>
+ <config>
+ <index>5</index>
+ <length>4294967296</length>
+ <seclength>8388608</seclength>
+ <offset>2671771648</offset>
+ <secoffset>5218304</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80be600</ref>
+ <geom><ref>0x80be300</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s1e</name>
+ <config>
+ <index>4</index>
+ <length>524288000</length>
+ <seclength>1024000</seclength>
+ <offset>2147483648</offset>
+ <secoffset>4194304</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80be580</ref>
+ <geom><ref>0x80be300</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s1d</name>
+ <config>
+ <index>3</index>
+ <length>4447175168</length>
+ <seclength>8685889</seclength>
+ <offset>15556673536</offset>
+ <secoffset>30384128</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80be500</ref>
+ <geom><ref>0x80be300</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s1c</name>
+ <config>
+ <index>2</index>
+ <length>20003848704</length>
+ <seclength>39070017</seclength>
+ <offset>0</offset>
+ <secoffset>0</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80be480</ref>
+ <geom><ref>0x80be300</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s1b</name>
+ <config>
+ <index>1</index>
+ <length>1073741824</length>
+ <seclength>2097152</seclength>
+ <offset>1073741824</offset>
+ <secoffset>2097152</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80be400</ref>
+ <geom><ref>0x80be300</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0s1a</name>
+ <config>
+ <index>0</index>
+ <length>1073741824</length>
+ <seclength>2097152</seclength>
+ <offset>0</offset>
+ <secoffset>0</secoffset>
+ </config>
+ </provider>
+ </geom>
+ </method>
+ <method>
+ <ref>0x8071c00</ref>
+ <name>SIMDISK-method</name>
+ <geom>
+ <ref>0x80ba040</ref>
+ <method><ref>0x8071c00</ref></method>
+ <name>ad0</name>
+ <rank>1</rank>
+ <provider>
+ <ref>0x80be000</ref>
+ <geom><ref>0x80ba040</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0</name>
+ </provider>
+ </geom>
+ </method>
+</mesh>
diff --git a/tools/regression/geom/Test/T004/testprg.c b/tools/regression/geom/Test/T004/testprg.c
new file mode 100644
index 0000000..705f6ed
--- /dev/null
+++ b/tools/regression/geom/Test/T004/testprg.c
@@ -0,0 +1,69 @@
+/*-
+ * Copyright (c) 2002 Poul-Henning Kamp
+ * Copyright (c) 2002 Networks Associates Technology, Inc.
+ * All rights reserved.
+ *
+ * This software was developed for the FreeBSD Project by Poul-Henning Kamp
+ * and NAI Labs, the Security Research Division of Network Associates, Inc.
+ * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+ * DARPA CHATS research program.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The names of the authors may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <err.h>
+#include <sys/errno.h>
+#include <sys/time.h>
+#include <sys/sbuf.h>
+#include <geom/geom.h>
+
+int
+thread_sim(void *ptr __unused)
+{
+
+ rattle();
+ g_simdisk_init();
+ g_bsd_init();
+ g_mbr_init();
+ g_mbrext_init();
+ g_dev_init(NULL);
+ rattle();
+
+ g_simdisk_xml_load("ad0", "../../Data/disk.critter.ad0.xml");
+ rattle();
+ conff("1");
+ printf("Done\n");
+ done();
+ return (0);
+}
+
diff --git a/tools/regression/geom/Test/T005/Makefile b/tools/regression/geom/Test/T005/Makefile
new file mode 100644
index 0000000..e944636
--- /dev/null
+++ b/tools/regression/geom/Test/T005/Makefile
@@ -0,0 +1,3 @@
+# $FreeBSD$
+.include "../Makefile.inc"
+.include <bsd.prog.mk>
diff --git a/tools/regression/geom/Test/T005/ref.conf b/tools/regression/geom/Test/T005/ref.conf
new file mode 100644
index 0000000..9c56e70
--- /dev/null
+++ b/tools/regression/geom/Test/T005/ref.conf
@@ -0,0 +1,138 @@
+<mesh>
+ <FreeBSD>$FreeBSD$</FreeBSD>
+ <method>
+ <ref>0x8071cc0</ref>
+ <name>DEV-method</name>
+ <geom>
+ <ref>0x80bb500</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0c</name>
+ <rank>3</rank>
+ <consumer>
+ <ref>0x80bb580</ref>
+ <geom><ref>0x80bb500</ref></geom>
+ <provider><ref>0x80bb280</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80bb400</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0b</name>
+ <rank>3</rank>
+ <consumer>
+ <ref>0x80bb480</ref>
+ <geom><ref>0x80bb400</ref></geom>
+ <provider><ref>0x80bb200</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80bb300</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0a</name>
+ <rank>3</rank>
+ <consumer>
+ <ref>0x80bb380</ref>
+ <geom><ref>0x80bb300</ref></geom>
+ <provider><ref>0x80bb180</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80ba080</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0</name>
+ <rank>2</rank>
+ <consumer>
+ <ref>0x80bb080</ref>
+ <geom><ref>0x80ba080</ref></geom>
+ <provider><ref>0x80bb000</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ </method>
+ <method>
+ <ref>0x8071c00</ref>
+ <name>MBREXT-method</name>
+ </method>
+ <method>
+ <ref>0x8071ca0</ref>
+ <name>MBR-method</name>
+ </method>
+ <method>
+ <ref>0x8071ce0</ref>
+ <name>BSD-method</name>
+ <geom>
+ <ref>0x80ba0c0</ref>
+ <method><ref>0x8071ce0</ref></method>
+ <name>ad0</name>
+ <rank>2</rank>
+ <config>
+ </config>
+ <consumer>
+ <ref>0x80bb100</ref>
+ <geom><ref>0x80ba0c0</ref></geom>
+ <provider><ref>0x80bb000</ref></provider>
+ <mode>r0w0e0</mode>
+ <config>
+ </config>
+ </consumer>
+ <provider>
+ <ref>0x80bb280</ref>
+ <geom><ref>0x80ba0c0</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0c</name>
+ <config>
+ <index>2</index>
+ <length>1474560</length>
+ <seclength>2880</seclength>
+ <offset>0</offset>
+ <secoffset>0</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80bb200</ref>
+ <geom><ref>0x80ba0c0</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0b</name>
+ <config>
+ <index>1</index>
+ <length>1474560</length>
+ <seclength>2880</seclength>
+ <offset>0</offset>
+ <secoffset>0</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80bb180</ref>
+ <geom><ref>0x80ba0c0</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0a</name>
+ <config>
+ <index>0</index>
+ <length>1474560</length>
+ <seclength>2880</seclength>
+ <offset>0</offset>
+ <secoffset>0</secoffset>
+ </config>
+ </provider>
+ </geom>
+ </method>
+ <method>
+ <ref>0x8071be0</ref>
+ <name>SIMDISK-method</name>
+ <geom>
+ <ref>0x80ba040</ref>
+ <method><ref>0x8071be0</ref></method>
+ <name>ad0</name>
+ <rank>1</rank>
+ <provider>
+ <ref>0x80bb000</ref>
+ <geom><ref>0x80ba040</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0</name>
+ </provider>
+ </geom>
+ </method>
+</mesh>
diff --git a/tools/regression/geom/Test/T005/testprg.c b/tools/regression/geom/Test/T005/testprg.c
new file mode 100644
index 0000000..119b3ed
--- /dev/null
+++ b/tools/regression/geom/Test/T005/testprg.c
@@ -0,0 +1,69 @@
+/*-
+ * Copyright (c) 2002 Poul-Henning Kamp
+ * Copyright (c) 2002 Networks Associates Technology, Inc.
+ * All rights reserved.
+ *
+ * This software was developed for the FreeBSD Project by Poul-Henning Kamp
+ * and NAI Labs, the Security Research Division of Network Associates, Inc.
+ * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+ * DARPA CHATS research program.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The names of the authors may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <err.h>
+#include <sys/errno.h>
+#include <sys/time.h>
+#include <sys/sbuf.h>
+#include <geom/geom.h>
+
+int
+thread_sim(void *ptr __unused)
+{
+
+ rattle();
+ g_simdisk_init();
+ g_bsd_init();
+ g_mbr_init();
+ g_mbrext_init();
+ g_dev_init(NULL);
+ rattle();
+
+ g_simdisk_xml_load("ad0", "../../Data/disk.kern.flp.xml");
+ rattle();
+ conff("1");
+ printf("Done\n");
+ done();
+ return (0);
+}
+
diff --git a/tools/regression/geom/Test/T006/Makefile b/tools/regression/geom/Test/T006/Makefile
new file mode 100644
index 0000000..e944636
--- /dev/null
+++ b/tools/regression/geom/Test/T006/Makefile
@@ -0,0 +1,3 @@
+# $FreeBSD$
+.include "../Makefile.inc"
+.include <bsd.prog.mk>
diff --git a/tools/regression/geom/Test/T006/ref.conf b/tools/regression/geom/Test/T006/ref.conf
new file mode 100644
index 0000000..63fc049
--- /dev/null
+++ b/tools/regression/geom/Test/T006/ref.conf
@@ -0,0 +1,47 @@
+<mesh>
+ <FreeBSD>$FreeBSD$</FreeBSD>
+ <method>
+ <ref>0x8071cc0</ref>
+ <name>DEV-method</name>
+ <geom>
+ <ref>0x80ba080</ref>
+ <method><ref>0x8071cc0</ref></method>
+ <name>ad0</name>
+ <rank>2</rank>
+ <consumer>
+ <ref>0x80bb080</ref>
+ <geom><ref>0x80ba080</ref></geom>
+ <provider><ref>0x80bb000</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ </method>
+ <method>
+ <ref>0x8071c00</ref>
+ <name>MBREXT-method</name>
+ </method>
+ <method>
+ <ref>0x8071ca0</ref>
+ <name>MBR-method</name>
+ </method>
+ <method>
+ <ref>0x8071ce0</ref>
+ <name>BSD-method</name>
+ </method>
+ <method>
+ <ref>0x8071be0</ref>
+ <name>SIMDISK-method</name>
+ <geom>
+ <ref>0x80ba040</ref>
+ <method><ref>0x8071be0</ref></method>
+ <name>ad0</name>
+ <rank>1</rank>
+ <provider>
+ <ref>0x80bb000</ref>
+ <geom><ref>0x80ba040</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0</name>
+ </provider>
+ </geom>
+ </method>
+</mesh>
diff --git a/tools/regression/geom/Test/T006/testprg.c b/tools/regression/geom/Test/T006/testprg.c
new file mode 100644
index 0000000..10296af
--- /dev/null
+++ b/tools/regression/geom/Test/T006/testprg.c
@@ -0,0 +1,69 @@
+/*-
+ * Copyright (c) 2002 Poul-Henning Kamp
+ * Copyright (c) 2002 Networks Associates Technology, Inc.
+ * All rights reserved.
+ *
+ * This software was developed for the FreeBSD Project by Poul-Henning Kamp
+ * and NAI Labs, the Security Research Division of Network Associates, Inc.
+ * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+ * DARPA CHATS research program.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The names of the authors may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <err.h>
+#include <sys/errno.h>
+#include <sys/time.h>
+#include <sys/sbuf.h>
+#include <geom/geom.h>
+
+int
+thread_sim(void *ptr __unused)
+{
+
+ rattle();
+ g_simdisk_init();
+ g_bsd_init();
+ g_mbr_init();
+ g_mbrext_init();
+ g_dev_init(NULL);
+ rattle();
+
+ g_simdisk_xml_load("ad0", "../../Data/disk.msdos.flp.xml");
+ rattle();
+ conff("1");
+ printf("Done\n");
+ done();
+ return (0);
+}
+
diff --git a/tools/regression/geom/Test/T007/Makefile b/tools/regression/geom/Test/T007/Makefile
new file mode 100644
index 0000000..e944636
--- /dev/null
+++ b/tools/regression/geom/Test/T007/Makefile
@@ -0,0 +1,3 @@
+# $FreeBSD$
+.include "../Makefile.inc"
+.include <bsd.prog.mk>
diff --git a/tools/regression/geom/Test/T007/ref.conf b/tools/regression/geom/Test/T007/ref.conf
new file mode 100644
index 0000000..69a8889
--- /dev/null
+++ b/tools/regression/geom/Test/T007/ref.conf
@@ -0,0 +1,23 @@
+<mesh>
+ <FreeBSD>$FreeBSD$</FreeBSD>
+ <method>
+ <ref>0x8071d00</ref>
+ <name>DEV-method</name>
+ </method>
+ <method>
+ <ref>0x8071c40</ref>
+ <name>MBREXT-method</name>
+ </method>
+ <method>
+ <ref>0x8071ce0</ref>
+ <name>MBR-method</name>
+ </method>
+ <method>
+ <ref>0x8071d20</ref>
+ <name>BSD-method</name>
+ </method>
+ <method>
+ <ref>0x8071c20</ref>
+ <name>SIMDISK-method</name>
+ </method>
+</mesh>
diff --git a/tools/regression/geom/Test/T007/testprg.c b/tools/regression/geom/Test/T007/testprg.c
new file mode 100644
index 0000000..e07f87e
--- /dev/null
+++ b/tools/regression/geom/Test/T007/testprg.c
@@ -0,0 +1,73 @@
+/*-
+ * Copyright (c) 2002 Poul-Henning Kamp
+ * Copyright (c) 2002 Networks Associates Technology, Inc.
+ * All rights reserved.
+ *
+ * This software was developed for the FreeBSD Project by Poul-Henning Kamp
+ * and NAI Labs, the Security Research Division of Network Associates, Inc.
+ * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+ * DARPA CHATS research program.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The names of the authors may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <err.h>
+#include <sys/errno.h>
+#include <sys/time.h>
+#include <sys/sbuf.h>
+#include <geom/geom.h>
+
+int
+thread_sim(void *ptr __unused)
+{
+
+ rattle();
+ g_simdisk_init();
+ g_bsd_init();
+ g_mbr_init();
+ g_mbrext_init();
+ g_dev_init(NULL);
+ rattle();
+
+ g_simdisk_xml_load("ad0", "../../Data/disk.typo.ad0.xml");
+ rattle();
+ sdumpf("2a");
+ g_simdisk_destroy("ad0");
+ rattle();
+ conff("1");
+ sdumpf("2b");
+ printf("Done\n");
+ done();
+ return (0);
+}
+
diff --git a/tools/regression/geom/Test/T008/Makefile b/tools/regression/geom/Test/T008/Makefile
new file mode 100644
index 0000000..e944636
--- /dev/null
+++ b/tools/regression/geom/Test/T008/Makefile
@@ -0,0 +1,3 @@
+# $FreeBSD$
+.include "../Makefile.inc"
+.include <bsd.prog.mk>
diff --git a/tools/regression/geom/Test/T008/ref.conf b/tools/regression/geom/Test/T008/ref.conf
new file mode 100644
index 0000000..69a8889
--- /dev/null
+++ b/tools/regression/geom/Test/T008/ref.conf
@@ -0,0 +1,23 @@
+<mesh>
+ <FreeBSD>$FreeBSD$</FreeBSD>
+ <method>
+ <ref>0x8071d00</ref>
+ <name>DEV-method</name>
+ </method>
+ <method>
+ <ref>0x8071c40</ref>
+ <name>MBREXT-method</name>
+ </method>
+ <method>
+ <ref>0x8071ce0</ref>
+ <name>MBR-method</name>
+ </method>
+ <method>
+ <ref>0x8071d20</ref>
+ <name>BSD-method</name>
+ </method>
+ <method>
+ <ref>0x8071c20</ref>
+ <name>SIMDISK-method</name>
+ </method>
+</mesh>
diff --git a/tools/regression/geom/Test/T008/testprg.c b/tools/regression/geom/Test/T008/testprg.c
new file mode 100644
index 0000000..21d960b
--- /dev/null
+++ b/tools/regression/geom/Test/T008/testprg.c
@@ -0,0 +1,75 @@
+/*-
+ * Copyright (c) 2002 Poul-Henning Kamp
+ * Copyright (c) 2002 Networks Associates Technology, Inc.
+ * All rights reserved.
+ *
+ * This software was developed for the FreeBSD Project by Poul-Henning Kamp
+ * and NAI Labs, the Security Research Division of Network Associates, Inc.
+ * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+ * DARPA CHATS research program.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The names of the authors may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <err.h>
+#include <sys/errno.h>
+#include <sys/time.h>
+#include <sys/sbuf.h>
+#include <geom/geom.h>
+
+int
+thread_sim(void *ptr __unused)
+{
+ struct g_consumer *cp;
+
+ rattle();
+ g_simdisk_init();
+ g_bsd_init();
+ g_mbr_init();
+ g_mbrext_init();
+ g_dev_init(NULL);
+ rattle();
+
+ g_simdisk_xml_load("ad0", "../../Data/disk.typo.ad0.xml");
+ rattle();
+ cp = g_dev_opendev("ad0s1a", 1, 0, 0);
+ sdumpf("2a");
+ g_simdisk_destroy("ad0");
+ rattle();
+ conff("1");
+ sdumpf("2b");
+ printf("Done\n");
+ done();
+ return (0);
+}
+
diff --git a/tools/regression/geom/Test/T009/Makefile b/tools/regression/geom/Test/T009/Makefile
new file mode 100644
index 0000000..e944636
--- /dev/null
+++ b/tools/regression/geom/Test/T009/Makefile
@@ -0,0 +1,3 @@
+# $FreeBSD$
+.include "../Makefile.inc"
+.include <bsd.prog.mk>
diff --git a/tools/regression/geom/Test/T009/ref.conf b/tools/regression/geom/Test/T009/ref.conf
new file mode 100644
index 0000000..9215bf4
--- /dev/null
+++ b/tools/regression/geom/Test/T009/ref.conf
@@ -0,0 +1,23 @@
+<mesh>
+ <FreeBSD>$FreeBSD$</FreeBSD>
+ <method>
+ <ref>0x8071da0</ref>
+ <name>DEV-method</name>
+ </method>
+ <method>
+ <ref>0x8071ce0</ref>
+ <name>MBREXT-method</name>
+ </method>
+ <method>
+ <ref>0x8071d80</ref>
+ <name>MBR-method</name>
+ </method>
+ <method>
+ <ref>0x8071dc0</ref>
+ <name>BSD-method</name>
+ </method>
+ <method>
+ <ref>0x8071cc0</ref>
+ <name>SIMDISK-method</name>
+ </method>
+</mesh>
diff --git a/tools/regression/geom/Test/T009/testprg.c b/tools/regression/geom/Test/T009/testprg.c
new file mode 100644
index 0000000..3b2bfaf
--- /dev/null
+++ b/tools/regression/geom/Test/T009/testprg.c
@@ -0,0 +1,89 @@
+/*-
+ * Copyright (c) 2002 Poul-Henning Kamp
+ * Copyright (c) 2002 Networks Associates Technology, Inc.
+ * All rights reserved.
+ *
+ * This software was developed for the FreeBSD Project by Poul-Henning Kamp
+ * and NAI Labs, the Security Research Division of Network Associates, Inc.
+ * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+ * DARPA CHATS research program.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The names of the authors may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <err.h>
+#include <sys/errno.h>
+#include <sys/time.h>
+#include <sys/sbuf.h>
+#include <geom/geom.h>
+
+int
+thread_sim(void *ptr __unused)
+{
+ struct g_consumer *cp;
+ struct bio *bp;
+
+ rattle();
+ g_simdisk_init();
+ g_bsd_init();
+ g_mbr_init();
+ g_mbrext_init();
+ g_dev_init(NULL);
+ rattle();
+
+ g_simdisk_xml_load("ad0", "../../Data/disk.typo.ad0.xml");
+ rattle();
+ cp = g_dev_opendev("ad0s1a", 1, 0, 0);
+ g_simdisk_stop("ad0");
+ bp = g_new_bio();
+ bp->bio_cmd = BIO_READ;
+ bp->bio_offset = 0;
+ bp->bio_length = 512;
+ bp->bio_data = g_malloc(512, M_WAITOK);
+ g_dev_request("ad0s1a", bp);
+ rattle();
+ sdumpf("2a");
+ g_simdisk_destroy("ad0");
+ rattle();
+ conff("1");
+ sdumpf("2b");
+ g_simdisk_restart("ad0");
+ rattle();
+ conff("1");
+ sdumpf("2c");
+
+ printf("Done\n");
+ done();
+ return (0);
+}
+
diff --git a/tools/regression/geom/Test/T010/Makefile b/tools/regression/geom/Test/T010/Makefile
new file mode 100644
index 0000000..e944636
--- /dev/null
+++ b/tools/regression/geom/Test/T010/Makefile
@@ -0,0 +1,3 @@
+# $FreeBSD$
+.include "../Makefile.inc"
+.include <bsd.prog.mk>
diff --git a/tools/regression/geom/Test/T010/ref.conf b/tools/regression/geom/Test/T010/ref.conf
new file mode 100644
index 0000000..4c3726e
--- /dev/null
+++ b/tools/regression/geom/Test/T010/ref.conf
@@ -0,0 +1,88 @@
+<mesh>
+ <FreeBSD>$FreeBSD$</FreeBSD>
+ <method>
+ <ref>0x80725a0</ref>
+ <name>DEV-method</name>
+ <geom>
+ <ref>0x80ba200</ref>
+ <method><ref>0x80725a0</ref></method>
+ <name>ad0c</name>
+ <rank>3</rank>
+ <consumer>
+ <ref>0x80ba280</ref>
+ <geom><ref>0x80ba200</ref></geom>
+ <provider><ref>0x80ba180</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80bb080</ref>
+ <method><ref>0x80725a0</ref></method>
+ <name>ad0</name>
+ <rank>2</rank>
+ <consumer>
+ <ref>0x80ba080</ref>
+ <geom><ref>0x80bb080</ref></geom>
+ <provider><ref>0x80ba000</ref></provider>
+ <mode>r1w0e0</mode>
+ </consumer>
+ </geom>
+ </method>
+ <method>
+ <ref>0x80724a0</ref>
+ <name>MBREXT-method</name>
+ </method>
+ <method>
+ <ref>0x8072560</ref>
+ <name>MBR-method</name>
+ </method>
+ <method>
+ <ref>0x80725e0</ref>
+ <name>BSD-method</name>
+ <geom>
+ <ref>0x80bb0c0</ref>
+ <method><ref>0x80725e0</ref></method>
+ <name>ad0</name>
+ <rank>2</rank>
+ <config>
+ </config>
+ <consumer>
+ <ref>0x80ba100</ref>
+ <geom><ref>0x80bb0c0</ref></geom>
+ <provider><ref>0x80ba000</ref></provider>
+ <mode>r0w0e0</mode>
+ <config>
+ </config>
+ </consumer>
+ <provider>
+ <ref>0x80ba180</ref>
+ <geom><ref>0x80bb0c0</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0c</name>
+ <config>
+ <index>2</index>
+ <length>1474560</length>
+ <seclength>2880</seclength>
+ <offset>0</offset>
+ <secoffset>0</secoffset>
+ </config>
+ </provider>
+ </geom>
+ </method>
+ <method>
+ <ref>0x8072460</ref>
+ <name>SIMDISK-method</name>
+ <geom>
+ <ref>0x80bb040</ref>
+ <method><ref>0x8072460</ref></method>
+ <name>ad0</name>
+ <rank>1</rank>
+ <provider>
+ <ref>0x80ba000</ref>
+ <geom><ref>0x80bb040</ref></geom>
+ <mode>r1w0e0</mode>
+ <name>ad0</name>
+ </provider>
+ </geom>
+ </method>
+</mesh>
diff --git a/tools/regression/geom/Test/T010/testprg.c b/tools/regression/geom/Test/T010/testprg.c
new file mode 100644
index 0000000..0154f5e
--- /dev/null
+++ b/tools/regression/geom/Test/T010/testprg.c
@@ -0,0 +1,98 @@
+/*-
+ * Copyright (c) 2002 Poul-Henning Kamp
+ * Copyright (c) 2002 Networks Associates Technology, Inc.
+ * All rights reserved.
+ *
+ * This software was developed for the FreeBSD Project by Poul-Henning Kamp
+ * and NAI Labs, the Security Research Division of Network Associates, Inc.
+ * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+ * DARPA CHATS research program.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The names of the authors may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <err.h>
+#include <sys/errno.h>
+#include <sys/time.h>
+#include <sys/sbuf.h>
+#include <geom/geom.h>
+
+int
+thread_sim(void *ptr __unused)
+{
+ struct g_consumer *cp;
+ struct g_geom *gp;
+
+ rattle();
+ g_simdisk_init();
+ g_bsd_init();
+ g_mbr_init();
+ g_mbrext_init();
+ g_dev_init(NULL);
+ rattle();
+
+ g_simdisk_xml_load("ad0", "../../Data/disk.empty.flp.xml");
+ rattle();
+ cp = g_dev_opendev("ad0", 1, 0, 0);
+ g_topology_lock();
+ gp = g_create_geomf("BSD-method", cp->provider, NULL);
+ g_topology_unlock();
+ printf("gp = %p\n", gp);
+ rattle();
+ conff("1");
+ sdumpf("2");
+#if 0
+ g_simdisk_stop("ad0");
+ bp = g_new_bio();
+ bp->bio_cmd = BIO_READ;
+ bp->bio_offset = 0;
+ bp->bio_length = 512;
+ bp->bio_data = g_malloc(512, M_WAITOK);
+ g_dev_request("ad0s1a", bp);
+ rattle();
+ sdumpf("2a");
+ g_simdisk_destroy("ad0");
+ rattle();
+ conff("1");
+ sdumpf("2b");
+ g_simdisk_restart("ad0");
+ rattle();
+ conff("1");
+ sdumpf("2c");
+
+#endif
+ printf("Done\n");
+ done();
+ return (0);
+}
+
diff --git a/tools/regression/geom/Test/T011/Makefile b/tools/regression/geom/Test/T011/Makefile
new file mode 100644
index 0000000..e944636
--- /dev/null
+++ b/tools/regression/geom/Test/T011/Makefile
@@ -0,0 +1,3 @@
+# $FreeBSD$
+.include "../Makefile.inc"
+.include <bsd.prog.mk>
diff --git a/tools/regression/geom/Test/T011/ref.conf b/tools/regression/geom/Test/T011/ref.conf
new file mode 100644
index 0000000..0a0716c
--- /dev/null
+++ b/tools/regression/geom/Test/T011/ref.conf
@@ -0,0 +1,47 @@
+<mesh>
+ <FreeBSD>$FreeBSD$</FreeBSD>
+ <method>
+ <ref>0x8071c40</ref>
+ <name>DEV-method</name>
+ <geom>
+ <ref>0x80b70c0</ref>
+ <method><ref>0x8071c40</ref></method>
+ <name>ad0</name>
+ <rank>2</rank>
+ <consumer>
+ <ref>0x80b7100</ref>
+ <geom><ref>0x80b70c0</ref></geom>
+ <provider><ref>0x80b7080</ref></provider>
+ <mode>r1w0e0</mode>
+ </consumer>
+ </geom>
+ </method>
+ <method>
+ <ref>0x8071b40</ref>
+ <name>MBREXT-method</name>
+ </method>
+ <method>
+ <ref>0x8071c00</ref>
+ <name>MBR-method</name>
+ </method>
+ <method>
+ <ref>0x8071c80</ref>
+ <name>BSD-method</name>
+ </method>
+ <method>
+ <ref>0x8071b00</ref>
+ <name>SIMDISK-method</name>
+ <geom>
+ <ref>0x80b7040</ref>
+ <method><ref>0x8071b00</ref></method>
+ <name>ad0</name>
+ <rank>1</rank>
+ <provider>
+ <ref>0x80b7080</ref>
+ <geom><ref>0x80b7040</ref></geom>
+ <mode>r1w0e0</mode>
+ <name>ad0</name>
+ </provider>
+ </geom>
+ </method>
+</mesh>
diff --git a/tools/regression/geom/Test/T011/testprg.c b/tools/regression/geom/Test/T011/testprg.c
new file mode 100644
index 0000000..d9dea04
--- /dev/null
+++ b/tools/regression/geom/Test/T011/testprg.c
@@ -0,0 +1,78 @@
+/*-
+ * Copyright (c) 2002 Poul-Henning Kamp
+ * Copyright (c) 2002 Networks Associates Technology, Inc.
+ * All rights reserved.
+ *
+ * This software was developed for the FreeBSD Project by Poul-Henning Kamp
+ * and NAI Labs, the Security Research Division of Network Associates, Inc.
+ * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+ * DARPA CHATS research program.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The names of the authors may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <err.h>
+#include <sys/errno.h>
+#include <sys/time.h>
+#include <sys/sbuf.h>
+#include <geom/geom.h>
+
+int
+thread_sim(void *ptr __unused)
+{
+ struct g_consumer *cp;
+ struct g_geom *gp;
+
+ rattle();
+ g_simdisk_init();
+ g_bsd_init();
+ g_mbr_init();
+ g_mbrext_init();
+ g_dev_init(NULL);
+ rattle();
+
+ g_simdisk_xml_load("ad0", "../../Data/disk.empty.flp.xml");
+ rattle();
+ cp = g_dev_opendev("ad0", 1, 0, 0);
+ g_topology_lock();
+ gp = g_insert_geom("BSD-method", cp);
+ g_topology_unlock();
+ printf("gp = %p\n", gp);
+ rattle();
+ conff("1");
+ sdumpf("2");
+ printf("Done\n");
+ done();
+ return (0);
+}
+
diff --git a/tools/regression/geom/Test/T012/Makefile b/tools/regression/geom/Test/T012/Makefile
new file mode 100644
index 0000000..e944636
--- /dev/null
+++ b/tools/regression/geom/Test/T012/Makefile
@@ -0,0 +1,3 @@
+# $FreeBSD$
+.include "../Makefile.inc"
+.include <bsd.prog.mk>
diff --git a/tools/regression/geom/Test/T012/ref.conf b/tools/regression/geom/Test/T012/ref.conf
new file mode 100644
index 0000000..640cafd
--- /dev/null
+++ b/tools/regression/geom/Test/T012/ref.conf
@@ -0,0 +1,382 @@
+<mesh>
+ <FreeBSD>$FreeBSD$</FreeBSD>
+ <method>
+ <ref>0x8072160</ref>
+ <name>SUNLABEL-method</name>
+ <geom>
+ <ref>0x80b8480</ref>
+ <method><ref>0x8072160</ref></method>
+ <name>ad0</name>
+ <rank>2</rank>
+ <config>
+ </config>
+ <consumer>
+ <ref>0x80b84c0</ref>
+ <geom><ref>0x80b8480</ref></geom>
+ <provider><ref>0x80b8440</ref></provider>
+ <mode>r0w0e0</mode>
+ <config>
+ </config>
+ </consumer>
+ <provider>
+ <ref>0x80b8680</ref>
+ <geom><ref>0x80b8480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0h</name>
+ <config>
+ <index>7</index>
+ <length>1343787008</length>
+ <seclength>2624584</seclength>
+ <offset>5638115328</offset>
+ <secoffset>11011944</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80b8640</ref>
+ <geom><ref>0x80b8480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0g</name>
+ <config>
+ <index>6</index>
+ <length>2149576704</length>
+ <seclength>4198392</seclength>
+ <offset>3488538624</offset>
+ <secoffset>6813552</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80b8600</ref>
+ <geom><ref>0x80b8480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0f</name>
+ <config>
+ <index>5</index>
+ <length>2149576704</length>
+ <seclength>4198392</seclength>
+ <offset>1338961920</offset>
+ <secoffset>2615160</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80b85c0</ref>
+ <geom><ref>0x80b8480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0d</name>
+ <config>
+ <index>3</index>
+ <length>11124240384</length>
+ <seclength>21727032</seclength>
+ <offset>6981902336</offset>
+ <secoffset>13636528</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80b8580</ref>
+ <geom><ref>0x80b8480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0c</name>
+ <config>
+ <index>2</index>
+ <length>18108555264</length>
+ <seclength>35368272</seclength>
+ <offset>0</offset>
+ <secoffset>0</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80b8540</ref>
+ <geom><ref>0x80b8480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0b</name>
+ <config>
+ <index>1</index>
+ <length>1075994624</length>
+ <seclength>2101552</seclength>
+ <offset>262967296</offset>
+ <secoffset>513608</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80b8500</ref>
+ <geom><ref>0x80b8480</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0a</name>
+ <config>
+ <index>0</index>
+ <length>262967296</length>
+ <seclength>513608</seclength>
+ <offset>0</offset>
+ <secoffset>0</secoffset>
+ </config>
+ </provider>
+ </geom>
+ <geom>
+ <ref>0x80b80c0</ref>
+ <method><ref>0x8072160</ref></method>
+ <name>ad0</name>
+ <rank>2</rank>
+ <config>
+ </config>
+ <consumer>
+ <ref>0x80b8100</ref>
+ <geom><ref>0x80b80c0</ref></geom>
+ <provider><ref>0x80b8080</ref></provider>
+ <mode>r0w0e0</mode>
+ <config>
+ </config>
+ </consumer>
+ <provider>
+ <ref>0x80b8200</ref>
+ <geom><ref>0x80b80c0</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0h</name>
+ <config>
+ <index>7</index>
+ <length>34629267456</length>
+ <seclength>67635288</seclength>
+ <offset>2069028864</offset>
+ <secoffset>4041072</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80b81c0</ref>
+ <geom><ref>0x80b80c0</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0c</name>
+ <config>
+ <index>2</index>
+ <length>36698296320</length>
+ <seclength>71676360</seclength>
+ <offset>0</offset>
+ <secoffset>0</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80b8180</ref>
+ <geom><ref>0x80b80c0</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0b</name>
+ <config>
+ <index>1</index>
+ <length>539320320</length>
+ <seclength>1053360</seclength>
+ <offset>0</offset>
+ <secoffset>0</secoffset>
+ </config>
+ </provider>
+ <provider>
+ <ref>0x80b8140</ref>
+ <geom><ref>0x80b80c0</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0a</name>
+ <config>
+ <index>0</index>
+ <length>1529708544</length>
+ <seclength>2987712</seclength>
+ <offset>539320320</offset>
+ <secoffset>1053360</secoffset>
+ </config>
+ </provider>
+ </geom>
+ </method>
+ <method>
+ <ref>0x80722e0</ref>
+ <name>DEV-method</name>
+ <geom>
+ <ref>0x80c5100</ref>
+ <method><ref>0x80722e0</ref></method>
+ <name>ad0h</name>
+ <rank>3</rank>
+ <consumer>
+ <ref>0x80b88c0</ref>
+ <geom><ref>0x80c5100</ref></geom>
+ <provider><ref>0x80b8680</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80bbf80</ref>
+ <method><ref>0x80722e0</ref></method>
+ <name>ad0g</name>
+ <rank>3</rank>
+ <consumer>
+ <ref>0x80b8880</ref>
+ <geom><ref>0x80bbf80</ref></geom>
+ <provider><ref>0x80b8640</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80bbe00</ref>
+ <method><ref>0x80722e0</ref></method>
+ <name>ad0f</name>
+ <rank>3</rank>
+ <consumer>
+ <ref>0x80b8840</ref>
+ <geom><ref>0x80bbe00</ref></geom>
+ <provider><ref>0x80b8600</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80bbc80</ref>
+ <method><ref>0x80722e0</ref></method>
+ <name>ad0d</name>
+ <rank>3</rank>
+ <consumer>
+ <ref>0x80b8800</ref>
+ <geom><ref>0x80bbc80</ref></geom>
+ <provider><ref>0x80b85c0</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80bbb00</ref>
+ <method><ref>0x80722e0</ref></method>
+ <name>ad0c</name>
+ <rank>3</rank>
+ <consumer>
+ <ref>0x80b87c0</ref>
+ <geom><ref>0x80bbb00</ref></geom>
+ <provider><ref>0x80b8580</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80bb980</ref>
+ <method><ref>0x80722e0</ref></method>
+ <name>ad0b</name>
+ <rank>3</rank>
+ <consumer>
+ <ref>0x80b8780</ref>
+ <geom><ref>0x80bb980</ref></geom>
+ <provider><ref>0x80b8540</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80bb900</ref>
+ <method><ref>0x80722e0</ref></method>
+ <name>ad0a</name>
+ <rank>3</rank>
+ <consumer>
+ <ref>0x80b8740</ref>
+ <geom><ref>0x80bb900</ref></geom>
+ <provider><ref>0x80b8500</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80b86c0</ref>
+ <method><ref>0x80722e0</ref></method>
+ <name>ad0</name>
+ <rank>2</rank>
+ <consumer>
+ <ref>0x80b8700</ref>
+ <geom><ref>0x80b86c0</ref></geom>
+ <provider><ref>0x80b8440</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80bb580</ref>
+ <method><ref>0x80722e0</ref></method>
+ <name>ad0h</name>
+ <rank>3</rank>
+ <consumer>
+ <ref>0x80b8380</ref>
+ <geom><ref>0x80bb580</ref></geom>
+ <provider><ref>0x80b8200</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80bb400</ref>
+ <method><ref>0x80722e0</ref></method>
+ <name>ad0c</name>
+ <rank>3</rank>
+ <consumer>
+ <ref>0x80b8340</ref>
+ <geom><ref>0x80bb400</ref></geom>
+ <provider><ref>0x80b81c0</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80bb200</ref>
+ <method><ref>0x80722e0</ref></method>
+ <name>ad0b</name>
+ <rank>3</rank>
+ <consumer>
+ <ref>0x80b8300</ref>
+ <geom><ref>0x80bb200</ref></geom>
+ <provider><ref>0x80b8180</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80bb180</ref>
+ <method><ref>0x80722e0</ref></method>
+ <name>ad0a</name>
+ <rank>3</rank>
+ <consumer>
+ <ref>0x80b82c0</ref>
+ <geom><ref>0x80bb180</ref></geom>
+ <provider><ref>0x80b8140</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ <geom>
+ <ref>0x80b8240</ref>
+ <method><ref>0x80722e0</ref></method>
+ <name>ad0</name>
+ <rank>2</rank>
+ <consumer>
+ <ref>0x80b8280</ref>
+ <geom><ref>0x80b8240</ref></geom>
+ <provider><ref>0x80b8080</ref></provider>
+ <mode>r0w0e0</mode>
+ </consumer>
+ </geom>
+ </method>
+ <method>
+ <ref>0x80721e0</ref>
+ <name>MBREXT-method</name>
+ </method>
+ <method>
+ <ref>0x80722a0</ref>
+ <name>MBR-method</name>
+ </method>
+ <method>
+ <ref>0x8072320</ref>
+ <name>BSD-method</name>
+ </method>
+ <method>
+ <ref>0x80721a0</ref>
+ <name>SIMDISK-method</name>
+ <geom>
+ <ref>0x80b8400</ref>
+ <method><ref>0x80721a0</ref></method>
+ <name>ad0</name>
+ <rank>1</rank>
+ <provider>
+ <ref>0x80b8440</ref>
+ <geom><ref>0x80b8400</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0</name>
+ </provider>
+ </geom>
+ <geom>
+ <ref>0x80b8040</ref>
+ <method><ref>0x80721a0</ref></method>
+ <name>ad0</name>
+ <rank>1</rank>
+ <provider>
+ <ref>0x80b8080</ref>
+ <geom><ref>0x80b8040</ref></geom>
+ <mode>r0w0e0</mode>
+ <name>ad0</name>
+ </provider>
+ </geom>
+ </method>
+</mesh>
diff --git a/tools/regression/geom/Test/T012/testprg.c b/tools/regression/geom/Test/T012/testprg.c
new file mode 100644
index 0000000..0b9453d
--- /dev/null
+++ b/tools/regression/geom/Test/T012/testprg.c
@@ -0,0 +1,73 @@
+/*-
+ * Copyright (c) 2002 Poul-Henning Kamp
+ * Copyright (c) 2002 Networks Associates Technology, Inc.
+ * All rights reserved.
+ *
+ * This software was developed for the FreeBSD Project by Poul-Henning Kamp
+ * and NAI Labs, the Security Research Division of Network Associates, Inc.
+ * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+ * DARPA CHATS research program.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The names of the authors may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <err.h>
+#include <sys/errno.h>
+#include <sys/time.h>
+#include <sys/sbuf.h>
+#include <geom/geom.h>
+
+int
+thread_sim(void *ptr __unused)
+{
+
+ rattle();
+ g_simdisk_init();
+ g_bsd_init();
+ g_mbr_init();
+ g_mbrext_init();
+ g_dev_init(NULL);
+ g_sunlabel_init();
+ rattle();
+
+ g_simdisk_xml_load("ad0", "../../Data/disk.sun.da0.xml");
+ rattle();
+ g_simdisk_xml_load("ad0", "../../Data/disk.sun.da1.xml");
+ rattle();
+ conff("1");
+ sdumpf("2");
+ printf("Done\n");
+ done();
+ return (0);
+}
+
OpenPOWER on IntegriCloud