summaryrefslogtreecommitdiff
path: root/tools/regression/geom/Test/T005
diff options
context:
space:
mode:
Diffstat (limited to 'tools/regression/geom/Test/T005')
-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
3 files changed, 210 insertions, 0 deletions
diff --git a/tools/regression/geom/Test/T005/Makefile b/tools/regression/geom/Test/T005/Makefile
new file mode 100644
index 0000000000000..e94463675a2fa
--- /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 0000000000000..9c56e70d588c4
--- /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 0000000000000..119b3ede504c7
--- /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);
+}
+