From 8442c472ba63634a295ea6c3d46ccbb9b63ff351 Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 13 Apr 2003 09:11:47 +0000 Subject: Remove the "run GEOM in userland harness" test stuff, it's been OBE. --- tools/regression/geom/GLib/Makefile | 25 -- tools/regression/geom/Makefile | 19 - tools/regression/geom/Test/Makefile | 12 - tools/regression/geom/Test/Makefile.inc | 37 -- tools/regression/geom/Test/T000/Makefile | 2 - tools/regression/geom/Test/T000/ref.conf | 18 - tools/regression/geom/Test/T000/testprg.c | 66 --- tools/regression/geom/Test/T001/Makefile | 2 - tools/regression/geom/Test/T001/ref.conf | 409 ------------------ tools/regression/geom/Test/T001/testprg.c | 69 --- tools/regression/geom/Test/T002/Makefile | 2 - tools/regression/geom/Test/T002/ref.conf | 105 ----- tools/regression/geom/Test/T002/testprg.c | 69 --- tools/regression/geom/Test/T003/Makefile | 2 - tools/regression/geom/Test/T003/ref.conf | 695 ------------------------------ tools/regression/geom/Test/T003/testprg.c | 69 --- tools/regression/geom/Test/T004/Makefile | 2 - tools/regression/geom/Test/T004/ref.conf | 298 ------------- tools/regression/geom/Test/T004/testprg.c | 69 --- tools/regression/geom/Test/T005/Makefile | 2 - tools/regression/geom/Test/T005/ref.conf | 133 ------ tools/regression/geom/Test/T005/testprg.c | 69 --- tools/regression/geom/Test/T006/Makefile | 2 - tools/regression/geom/Test/T006/ref.conf | 40 -- tools/regression/geom/Test/T006/testprg.c | 69 --- tools/regression/geom/Test/T007/Makefile | 2 - tools/regression/geom/Test/T007/ref.conf | 18 - tools/regression/geom/Test/T007/testprg.c | 73 ---- tools/regression/geom/Test/T008/Makefile | 2 - tools/regression/geom/Test/T008/ref.conf | 18 - tools/regression/geom/Test/T008/testprg.c | 75 ---- tools/regression/geom/Test/T009/Makefile | 2 - tools/regression/geom/Test/T009/ref.conf | 18 - tools/regression/geom/Test/T009/testprg.c | 89 ---- tools/regression/geom/Test/T010/Makefile | 2 - tools/regression/geom/Test/T010/ref.conf | 38 -- tools/regression/geom/Test/T010/testprg.c | 78 ---- tools/regression/geom/Test/T011/Makefile | 2 - tools/regression/geom/Test/T011/ref.conf | 40 -- tools/regression/geom/Test/T011/testprg.c | 78 ---- tools/regression/geom/Test/T012/Makefile | 2 - tools/regression/geom/Test/T012/ref.conf | 359 --------------- tools/regression/geom/Test/T012/testprg.c | 73 ---- tools/regression/geom/Test/T013/Makefile | 2 - tools/regression/geom/Test/T013/ref.conf | 413 ------------------ tools/regression/geom/Test/T013/testprg.c | 71 --- tools/regression/geom/Test/T014/Makefile | 2 - tools/regression/geom/Test/T014/ref.conf | 230 ---------- tools/regression/geom/Test/T014/testprg.c | 72 ---- tools/regression/geom/Test/T015/Makefile | 2 - tools/regression/geom/Test/T015/ref.conf | 121 ------ tools/regression/geom/Test/T015/testprg.c | 67 --- tools/regression/geom/geom.c | 196 --------- tools/regression/geom/geom_kernsim.c | 288 ------------- tools/regression/geom/geom_sim.c | 185 -------- tools/regression/geom/geom_sim.h | 176 -------- tools/regression/geom/geom_simdev.c | 159 ------- tools/regression/geom/geom_simdisk.c | 259 ----------- tools/regression/geom/geom_simdisk.h | 64 --- tools/regression/geom/geom_simdisk_xml.c | 244 ----------- 60 files changed, 5805 deletions(-) delete mode 100644 tools/regression/geom/GLib/Makefile delete mode 100644 tools/regression/geom/Makefile delete mode 100644 tools/regression/geom/Test/Makefile delete mode 100644 tools/regression/geom/Test/Makefile.inc delete mode 100644 tools/regression/geom/Test/T000/Makefile delete mode 100644 tools/regression/geom/Test/T000/ref.conf delete mode 100644 tools/regression/geom/Test/T000/testprg.c delete mode 100644 tools/regression/geom/Test/T001/Makefile delete mode 100644 tools/regression/geom/Test/T001/ref.conf delete mode 100644 tools/regression/geom/Test/T001/testprg.c delete mode 100644 tools/regression/geom/Test/T002/Makefile delete mode 100644 tools/regression/geom/Test/T002/ref.conf delete mode 100644 tools/regression/geom/Test/T002/testprg.c delete mode 100644 tools/regression/geom/Test/T003/Makefile delete mode 100644 tools/regression/geom/Test/T003/ref.conf delete mode 100644 tools/regression/geom/Test/T003/testprg.c delete mode 100644 tools/regression/geom/Test/T004/Makefile delete mode 100644 tools/regression/geom/Test/T004/ref.conf delete mode 100644 tools/regression/geom/Test/T004/testprg.c delete mode 100644 tools/regression/geom/Test/T005/Makefile delete mode 100644 tools/regression/geom/Test/T005/ref.conf delete mode 100644 tools/regression/geom/Test/T005/testprg.c delete mode 100644 tools/regression/geom/Test/T006/Makefile delete mode 100644 tools/regression/geom/Test/T006/ref.conf delete mode 100644 tools/regression/geom/Test/T006/testprg.c delete mode 100644 tools/regression/geom/Test/T007/Makefile delete mode 100644 tools/regression/geom/Test/T007/ref.conf delete mode 100644 tools/regression/geom/Test/T007/testprg.c delete mode 100644 tools/regression/geom/Test/T008/Makefile delete mode 100644 tools/regression/geom/Test/T008/ref.conf delete mode 100644 tools/regression/geom/Test/T008/testprg.c delete mode 100644 tools/regression/geom/Test/T009/Makefile delete mode 100644 tools/regression/geom/Test/T009/ref.conf delete mode 100644 tools/regression/geom/Test/T009/testprg.c delete mode 100644 tools/regression/geom/Test/T010/Makefile delete mode 100644 tools/regression/geom/Test/T010/ref.conf delete mode 100644 tools/regression/geom/Test/T010/testprg.c delete mode 100644 tools/regression/geom/Test/T011/Makefile delete mode 100644 tools/regression/geom/Test/T011/ref.conf delete mode 100644 tools/regression/geom/Test/T011/testprg.c delete mode 100644 tools/regression/geom/Test/T012/Makefile delete mode 100644 tools/regression/geom/Test/T012/ref.conf delete mode 100644 tools/regression/geom/Test/T012/testprg.c delete mode 100644 tools/regression/geom/Test/T013/Makefile delete mode 100644 tools/regression/geom/Test/T013/ref.conf delete mode 100644 tools/regression/geom/Test/T013/testprg.c delete mode 100644 tools/regression/geom/Test/T014/Makefile delete mode 100644 tools/regression/geom/Test/T014/ref.conf delete mode 100644 tools/regression/geom/Test/T014/testprg.c delete mode 100644 tools/regression/geom/Test/T015/Makefile delete mode 100644 tools/regression/geom/Test/T015/ref.conf delete mode 100644 tools/regression/geom/Test/T015/testprg.c delete mode 100644 tools/regression/geom/geom.c delete mode 100644 tools/regression/geom/geom_kernsim.c delete mode 100644 tools/regression/geom/geom_sim.c delete mode 100644 tools/regression/geom/geom_sim.h delete mode 100644 tools/regression/geom/geom_simdev.c delete mode 100644 tools/regression/geom/geom_simdisk.c delete mode 100644 tools/regression/geom/geom_simdisk.h delete mode 100644 tools/regression/geom/geom_simdisk_xml.c (limited to 'tools/regression/geom') diff --git a/tools/regression/geom/GLib/Makefile b/tools/regression/geom/GLib/Makefile deleted file mode 100644 index 344f88a..0000000 --- a/tools/regression/geom/GLib/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -# $FreeBSD$ - -LIB= G -SRCS= geom.c \ - geom_aes.c geom_apple.c geom_bsd.c geom_simdev.c geom_dump.c \ - geom_event.c \ - geom_io.c \ - geom_kernsim.c geom_mbr.c geom_simdisk.c geom_enc.c \ - geom_simdisk_xml.c geom_slice.c geom_subr.c subr_sbuf.c \ - geom_sunlabel.c geom_pc98.c - - -CFLAGS += -gstabs -static -CFLAGS += -I/usr/src/sys -I.. -CFLAGS += -DKERNELSIM -NOPIC = static -NOPROFILE = bingo -NOOBJ = youbet -WARNS = 5 - -.PATH: /sys/geom .. /sys/kern - -.include - -test: diff --git a/tools/regression/geom/Makefile b/tools/regression/geom/Makefile deleted file mode 100644 index bbb5ddf..0000000 --- a/tools/regression/geom/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# $FreeBSD$ - -SUBDIR+= ConfCmp GLib Test - -.include - -test: all _SUBDIR - - -toflat: - scp *.c *.h *.sh Makefile root@flat:/sys/geom - -fromflat: - scp root@flat:/sys/geom/\* . - -publish: - $(MAKE) cleandir - tar --exclude CVS -czf - . | \ - ssh phk@phk "cd www/geom && cat > geom.tgz && rm -rf src && mkdir -p src && cd src && tar xzf ../geom.tgz" diff --git a/tools/regression/geom/Test/Makefile b/tools/regression/geom/Test/Makefile deleted file mode 100644 index 0ba78f0..0000000 --- a/tools/regression/geom/Test/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $FreeBSD$ - -SUBDIR+= T000 T001 T002 T003 T004 T005 T006 T007 T008 T009 -SUBDIR+= T011 T012 T013 T014 T015 - -# SUBDIR+= T999 - -.include - -test: _SUBDIR - -mkref: _SUBDIR diff --git a/tools/regression/geom/Test/Makefile.inc b/tools/regression/geom/Test/Makefile.inc deleted file mode 100644 index d25f84d..0000000 --- a/tools/regression/geom/Test/Makefile.inc +++ /dev/null @@ -1,37 +0,0 @@ -# $FreeBSD$ - -PROG = testprg -NOMAN = no -NOOBJ = youbet -CFLAGS += -gstabs -static -CFLAGS += -I/usr/src/sys -I../.. -CFLAGS += -DKERNELSIM -pthread -LDADD += -L../../GLib -lG -LDADD += -lbsdxml -LDADD += -lmd -DPADD += ../../GLib/libG.a -CLEANFILES += _* *.core -WARNS= 5 - -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 deleted file mode 100644 index 18fd955..0000000 --- a/tools/regression/geom/Test/T000/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -# $FreeBSD$ -.include diff --git a/tools/regression/geom/Test/T000/ref.conf b/tools/regression/geom/Test/T000/ref.conf deleted file mode 100644 index 83518fc1..0000000 --- a/tools/regression/geom/Test/T000/ref.conf +++ /dev/null @@ -1,18 +0,0 @@ - - $FreeBSD$ - - DEV-class - - - MBREXT - - - MBR - - - BSD - - - SIMDISK-class - - diff --git a/tools/regression/geom/Test/T000/testprg.c b/tools/regression/geom/Test/T000/testprg.c deleted file mode 100644 index eb53a9c..0000000 --- a/tools/regression/geom/Test/T000/testprg.c +++ /dev/null @@ -1,66 +0,0 @@ -/*- - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void * -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 deleted file mode 100644 index 18fd955..0000000 --- a/tools/regression/geom/Test/T001/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -# $FreeBSD$ -.include diff --git a/tools/regression/geom/Test/T001/ref.conf b/tools/regression/geom/Test/T001/ref.conf deleted file mode 100644 index e602ddd..0000000 --- a/tools/regression/geom/Test/T001/ref.conf +++ /dev/null @@ -1,409 +0,0 @@ - - $FreeBSD$ - - DEV-class - - - ad0s3d - 4 - - - - r0w0e0 - - - - - ad0s3c - 4 - - - - r0w0e0 - - - - - ad0s3a - 4 - - - - r0w0e0 - - - - - ad0s2c - 4 - - - - r0w0e0 - - - - - ad0s1f - 4 - - - - r0w0e0 - - - - - ad0s1e - 4 - - - - r0w0e0 - - - - - ad0s1c - 4 - - - - r0w0e0 - - - - - ad0s1b - 4 - - - - r0w0e0 - - - - - ad0s1a - 4 - - - - r0w0e0 - - - - - ad0s3 - 3 - - - - r0w0e0 - - - - - ad0s2 - 3 - - - - r0w0e0 - - - - - ad0s1 - 3 - - - - r0w0e0 - - - - - ad0 - 2 - - - - r0w0e0 - - - - - MBREXT - - - MBR - - - ad0 - 2 - - 0 - - - - - r0w0e0 - - - - - - r0w0e0 - ad0s3 - 8585256960 - 512 - - 2 - 8585256960 - 16768080 - 8585256960 - 16768080 - 165 - - - - - r0w0e0 - ad0s2 - 5364817920 - 512 - - 1 - 5364817920 - 10478160 - 3220439040 - 6289920 - 165 - - - - - r0w0e0 - ad0s1 - 3220406784 - 512 - - 0 - 3220406784 - 6289857 - 32256 - 63 - 165 - - - - - - BSD - - - ad0s3 - 3 - - 8192 - 512 - 16768080 - 8585256960 - - - - - r0w0e0 - - - - - - r0w0e0 - ad0s3d - 6488104960 - 512 - - 3 - 6488104960 - 12672080 - 2097152000 - 4096000 - 7 - - - - - r0w0e0 - ad0s3c - 8585256960 - 512 - - 2 - 8585256960 - 16768080 - 0 - 0 - 0 - - - - - r0w0e0 - ad0s3a - 2097152000 - 512 - - 0 - 2097152000 - 4096000 - 0 - 0 - 7 - - - - - - ad0s2 - 3 - - 8192 - 512 - 6289920 - 3220439040 - - - - - r0w0e0 - - - - - - r0w0e0 - ad0s2c - 5364817920 - 512 - - 2 - 5364817920 - 10478160 - 0 - 0 - 0 - - - - - - ad0s1 - 3 - - 8192 - 512 - 63 - 32256 - - - - - r0w0e0 - - - - - - r0w0e0 - ad0s1f - 2066973184 - 512 - - 5 - 2066973184 - 4037057 - 1153433600 - 2252800 - 7 - - - - - r0w0e0 - ad0s1e - 524288000 - 512 - - 4 - 524288000 - 1024000 - 629145600 - 1228800 - 7 - - - - - r0w0e0 - ad0s1c - 3220406784 - 512 - - 2 - 3220406784 - 6289857 - 0 - 0 - 0 - - - - - r0w0e0 - ad0s1b - 524288000 - 512 - - 1 - 524288000 - 1024000 - 104857600 - 204800 - 1 - - - - - r0w0e0 - ad0s1a - 104857600 - 512 - - 0 - 104857600 - 204800 - 0 - 0 - 7 - - - - - - SIMDISK-class - - - ad0 - 1 - - - r0w0e0 - ad0 - 1099511627776 - 512 - - - - diff --git a/tools/regression/geom/Test/T001/testprg.c b/tools/regression/geom/Test/T001/testprg.c deleted file mode 100644 index 263665e..0000000 --- a/tools/regression/geom/Test/T001/testprg.c +++ /dev/null @@ -1,69 +0,0 @@ -/*- - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void * -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 deleted file mode 100644 index 18fd955..0000000 --- a/tools/regression/geom/Test/T002/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -# $FreeBSD$ -.include diff --git a/tools/regression/geom/Test/T002/ref.conf b/tools/regression/geom/Test/T002/ref.conf deleted file mode 100644 index dc852781..0000000 --- a/tools/regression/geom/Test/T002/ref.conf +++ /dev/null @@ -1,105 +0,0 @@ - - $FreeBSD$ - - DEV-class - - - ad0s2 - 3 - - - - r0w0e0 - - - - - ad0s1 - 3 - - - - r0w0e0 - - - - - ad0 - 2 - - - - r0w0e0 - - - - - MBREXT - - - MBR - - - ad0 - 2 - - 0 - - - - - r0w0e0 - - - - - - r0w0e0 - ad0s2 - 4564740096 - 512 - - 1 - 4564740096 - 8915508 - 296884224 - 579852 - 11 - - - - - r0w0e0 - ad0s1 - 296821760 - 512 - - 0 - 296821760 - 579730 - 32256 - 63 - 160 - - - - - - BSD - - - SIMDISK-class - - - ad0 - 1 - - - r0w0e0 - ad0 - 1099511627776 - 512 - - - - diff --git a/tools/regression/geom/Test/T002/testprg.c b/tools/regression/geom/Test/T002/testprg.c deleted file mode 100644 index d7e6181..0000000 --- a/tools/regression/geom/Test/T002/testprg.c +++ /dev/null @@ -1,69 +0,0 @@ -/*- - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void * -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 deleted file mode 100644 index 18fd955..0000000 --- a/tools/regression/geom/Test/T003/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -# $FreeBSD$ -.include diff --git a/tools/regression/geom/Test/T003/ref.conf b/tools/regression/geom/Test/T003/ref.conf deleted file mode 100644 index 3631934..0000000 --- a/tools/regression/geom/Test/T003/ref.conf +++ /dev/null @@ -1,695 +0,0 @@ - - $FreeBSD$ - - DEV-class - - - ad0s27 - 4 - - - - r0w0e0 - - - - - ad0s26 - 4 - - - - r0w0e0 - - - - - ad0s25 - 4 - - - - r0w0e0 - - - - - ad0s24 - 4 - - - - r0w0e0 - - - - - ad0s23 - 4 - - - - r0w0e0 - - - - - ad0s22 - 4 - - - - r0w0e0 - - - - - ad0s21 - 4 - - - - r0w0e0 - - - - - ad0s20 - 4 - - - - r0w0e0 - - - - - ad0s19 - 4 - - - - r0w0e0 - - - - - ad0s18 - 4 - - - - r0w0e0 - - - - - ad0s17 - 4 - - - - r0w0e0 - - - - - ad0s16 - 4 - - - - r0w0e0 - - - - - ad0s15 - 4 - - - - r0w0e0 - - - - - ad0s14 - 4 - - - - r0w0e0 - - - - - ad0s13 - 4 - - - - r0w0e0 - - - - - ad0s12 - 4 - - - - r0w0e0 - - - - - ad0s11 - 4 - - - - r0w0e0 - - - - - ad0s10 - 4 - - - - r0w0e0 - - - - - ad0s9 - 4 - - - - r0w0e0 - - - - - ad0s8 - 4 - - - - r0w0e0 - - - - - ad0s7 - 4 - - - - r0w0e0 - - - - - ad0s6 - 4 - - - - r0w0e0 - - - - - ad0s5 - 4 - - - - r0w0e0 - - - - - ad0s2 - 3 - - - - r0w0e0 - - - - - ad0s1 - 3 - - - - r0w0e0 - - - - - ad0 - 2 - - - - r0w0e0 - - - - - MBREXT - - - ad0s2 - 3 - - 0 - - - - - r0w0e0 - - - - - - r0w0e0 - ad0s27 - 8193024 - 512 - - 22 - 8193024 - 16002 - 180988416 - 353493 - 1 - - - - - r0w0e0 - ad0s26 - 8193024 - 512 - - 21 - 8193024 - 16002 - 172763136 - 337428 - 1 - - - - - r0w0e0 - ad0s25 - 8193024 - 512 - - 20 - 8193024 - 16002 - 164537856 - 321363 - 1 - - - - - r0w0e0 - ad0s24 - 8193024 - 512 - - 19 - 8193024 - 16002 - 156312576 - 305298 - 1 - - - - - r0w0e0 - ad0s23 - 8193024 - 512 - - 18 - 8193024 - 16002 - 148087296 - 289233 - 1 - - - - - r0w0e0 - ad0s22 - 8193024 - 512 - - 17 - 8193024 - 16002 - 139862016 - 273168 - 1 - - - - - r0w0e0 - ad0s21 - 8193024 - 512 - - 16 - 8193024 - 16002 - 131636736 - 257103 - 1 - - - - - r0w0e0 - ad0s20 - 8193024 - 512 - - 15 - 8193024 - 16002 - 123411456 - 241038 - 1 - - - - - r0w0e0 - ad0s19 - 8193024 - 512 - - 14 - 8193024 - 16002 - 115186176 - 224973 - 1 - - - - - r0w0e0 - ad0s18 - 8193024 - 512 - - 13 - 8193024 - 16002 - 106960896 - 208908 - 1 - - - - - r0w0e0 - ad0s17 - 8193024 - 512 - - 12 - 8193024 - 16002 - 98735616 - 192843 - 1 - - - - - r0w0e0 - ad0s16 - 8193024 - 512 - - 11 - 8193024 - 16002 - 90510336 - 176778 - 1 - - - - - r0w0e0 - ad0s15 - 8193024 - 512 - - 10 - 8193024 - 16002 - 82285056 - 160713 - 1 - - - - - r0w0e0 - ad0s14 - 8193024 - 512 - - 9 - 8193024 - 16002 - 74059776 - 144648 - 1 - - - - - r0w0e0 - ad0s13 - 8193024 - 512 - - 8 - 8193024 - 16002 - 65834496 - 128583 - 1 - - - - - r0w0e0 - ad0s12 - 8193024 - 512 - - 7 - 8193024 - 16002 - 57609216 - 112518 - 1 - - - - - r0w0e0 - ad0s11 - 8193024 - 512 - - 6 - 8193024 - 16002 - 49383936 - 96453 - 1 - - - - - r0w0e0 - ad0s10 - 8193024 - 512 - - 5 - 8193024 - 16002 - 41158656 - 80388 - 1 - - - - - r0w0e0 - ad0s9 - 8193024 - 512 - - 4 - 8193024 - 16002 - 32933376 - 64323 - 1 - - - - - r0w0e0 - ad0s8 - 8193024 - 512 - - 3 - 8193024 - 16002 - 24708096 - 48258 - 1 - - - - - r0w0e0 - ad0s7 - 8193024 - 512 - - 2 - 8193024 - 16002 - 16482816 - 32193 - 1 - - - - - r0w0e0 - ad0s6 - 8193024 - 512 - - 1 - 8193024 - 16002 - 8257536 - 16128 - 1 - - - - - r0w0e0 - ad0s5 - 8193024 - 512 - - 0 - 8193024 - 16002 - 32256 - 63 - 1 - - - - - - MBR - - - ad0 - 2 - - 0 - - - - - r0w0e0 - - - - - - r0w0e0 - ad0s2 - 427714560 - 512 - - 1 - 427714560 - 835380 - 2146798080 - 4192965 - 5 - - - - - r0w0e0 - ad0s1 - 2146765824 - 512 - - 0 - 2146765824 - 4192902 - 32256 - 63 - 6 - - - - - - BSD - - - SIMDISK-class - - - ad0 - 1 - - - r0w0e0 - ad0 - 1099511627776 - 512 - - - - diff --git a/tools/regression/geom/Test/T003/testprg.c b/tools/regression/geom/Test/T003/testprg.c deleted file mode 100644 index 3acfcec..0000000 --- a/tools/regression/geom/Test/T003/testprg.c +++ /dev/null @@ -1,69 +0,0 @@ -/*- - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void * -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 deleted file mode 100644 index 18fd955..0000000 --- a/tools/regression/geom/Test/T004/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -# $FreeBSD$ -.include diff --git a/tools/regression/geom/Test/T004/ref.conf b/tools/regression/geom/Test/T004/ref.conf deleted file mode 100644 index e6718be..0000000 --- a/tools/regression/geom/Test/T004/ref.conf +++ /dev/null @@ -1,298 +0,0 @@ - - $FreeBSD$ - - DEV-class - - - ad0s1h - 4 - - - - r0w0e0 - - - - - ad0s1g - 4 - - - - r0w0e0 - - - - - ad0s1f - 4 - - - - r0w0e0 - - - - - ad0s1e - 4 - - - - r0w0e0 - - - - - ad0s1d - 4 - - - - r0w0e0 - - - - - ad0s1c - 4 - - - - r0w0e0 - - - - - ad0s1b - 4 - - - - r0w0e0 - - - - - ad0s1a - 4 - - - - r0w0e0 - - - - - ad0s1 - 3 - - - - r0w0e0 - - - - - ad0 - 2 - - - - r0w0e0 - - - - - MBREXT - - - MBR - - - ad0 - 2 - - 0 - - - - - r0w0e0 - - - - - - r0w0e0 - ad0s1 - 20003848704 - 512 - - 0 - 20003848704 - 39070017 - 32256 - 63 - 165 - - - - - - BSD - - - ad0s1 - 3 - - 8192 - 512 - 63 - 32256 - - - - - r0w0e0 - - - - - - r0w0e0 - ad0s1h - 5368709120 - 512 - - 7 - 5368709120 - 10485760 - 10187964416 - 19898368 - 7 - - - - - r0w0e0 - ad0s1g - 3221225472 - 512 - - 6 - 3221225472 - 6291456 - 6966738944 - 13606912 - 7 - - - - - r0w0e0 - ad0s1f - 4294967296 - 512 - - 5 - 4294967296 - 8388608 - 2671771648 - 5218304 - 7 - - - - - r0w0e0 - ad0s1e - 524288000 - 512 - - 4 - 524288000 - 1024000 - 2147483648 - 4194304 - 7 - - - - - r0w0e0 - ad0s1d - 4447175168 - 512 - - 3 - 4447175168 - 8685889 - 15556673536 - 30384128 - 7 - - - - - r0w0e0 - ad0s1c - 20003848704 - 512 - - 2 - 20003848704 - 39070017 - 0 - 0 - 0 - - - - - r0w0e0 - ad0s1b - 1073741824 - 512 - - 1 - 1073741824 - 2097152 - 1073741824 - 2097152 - 1 - - - - - r0w0e0 - ad0s1a - 1073741824 - 512 - - 0 - 1073741824 - 2097152 - 0 - 0 - 7 - - - - - - SIMDISK-class - - - ad0 - 1 - - - r0w0e0 - ad0 - 1099511627776 - 512 - - - - diff --git a/tools/regression/geom/Test/T004/testprg.c b/tools/regression/geom/Test/T004/testprg.c deleted file mode 100644 index 2c0dcd2..0000000 --- a/tools/regression/geom/Test/T004/testprg.c +++ /dev/null @@ -1,69 +0,0 @@ -/*- - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void * -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 deleted file mode 100644 index 18fd955..0000000 --- a/tools/regression/geom/Test/T005/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -# $FreeBSD$ -.include diff --git a/tools/regression/geom/Test/T005/ref.conf b/tools/regression/geom/Test/T005/ref.conf deleted file mode 100644 index f031c5a..0000000 --- a/tools/regression/geom/Test/T005/ref.conf +++ /dev/null @@ -1,133 +0,0 @@ - - $FreeBSD$ - - DEV-class - - - ad0c - 3 - - - - r0w0e0 - - - - - ad0b - 3 - - - - r0w0e0 - - - - - ad0a - 3 - - - - r0w0e0 - - - - - ad0 - 2 - - - - r0w0e0 - - - - - MBREXT - - - MBR - - - BSD - - - ad0 - 2 - - 8192 - 512 - 0 - 0 - - - - - r0w0e0 - - - - - - r0w0e0 - ad0c - 1474560 - 512 - - 2 - 1474560 - 2880 - 0 - 0 - 7 - - - - - r0w0e0 - ad0b - 1474560 - 512 - - 1 - 1474560 - 2880 - 0 - 0 - 0 - - - - - r0w0e0 - ad0a - 1474560 - 512 - - 0 - 1474560 - 2880 - 0 - 0 - 0 - - - - - - SIMDISK-class - - - ad0 - 1 - - - r0w0e0 - ad0 - 1099511627776 - 512 - - - - diff --git a/tools/regression/geom/Test/T005/testprg.c b/tools/regression/geom/Test/T005/testprg.c deleted file mode 100644 index af1d3f7..0000000 --- a/tools/regression/geom/Test/T005/testprg.c +++ /dev/null @@ -1,69 +0,0 @@ -/*- - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void * -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 deleted file mode 100644 index 18fd955..0000000 --- a/tools/regression/geom/Test/T006/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -# $FreeBSD$ -.include diff --git a/tools/regression/geom/Test/T006/ref.conf b/tools/regression/geom/Test/T006/ref.conf deleted file mode 100644 index ded94cd..0000000 --- a/tools/regression/geom/Test/T006/ref.conf +++ /dev/null @@ -1,40 +0,0 @@ - - $FreeBSD$ - - DEV-class - - - ad0 - 2 - - - - r0w0e0 - - - - - MBREXT - - - MBR - - - BSD - - - SIMDISK-class - - - ad0 - 1 - - - r0w0e0 - ad0 - 1099511627776 - 512 - - - - diff --git a/tools/regression/geom/Test/T006/testprg.c b/tools/regression/geom/Test/T006/testprg.c deleted file mode 100644 index 57c9522..0000000 --- a/tools/regression/geom/Test/T006/testprg.c +++ /dev/null @@ -1,69 +0,0 @@ -/*- - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void * -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 deleted file mode 100644 index 18fd955..0000000 --- a/tools/regression/geom/Test/T007/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -# $FreeBSD$ -.include diff --git a/tools/regression/geom/Test/T007/ref.conf b/tools/regression/geom/Test/T007/ref.conf deleted file mode 100644 index 275d6b9..0000000 --- a/tools/regression/geom/Test/T007/ref.conf +++ /dev/null @@ -1,18 +0,0 @@ - - $FreeBSD$ - - DEV-class - - - MBREXT - - - MBR - - - BSD - - - SIMDISK-class - - diff --git a/tools/regression/geom/Test/T007/testprg.c b/tools/regression/geom/Test/T007/testprg.c deleted file mode 100644 index bc302be..0000000 --- a/tools/regression/geom/Test/T007/testprg.c +++ /dev/null @@ -1,73 +0,0 @@ -/*- - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void * -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 deleted file mode 100644 index 18fd955..0000000 --- a/tools/regression/geom/Test/T008/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -# $FreeBSD$ -.include diff --git a/tools/regression/geom/Test/T008/ref.conf b/tools/regression/geom/Test/T008/ref.conf deleted file mode 100644 index 73a023b..0000000 --- a/tools/regression/geom/Test/T008/ref.conf +++ /dev/null @@ -1,18 +0,0 @@ - - $FreeBSD$ - - DEV-class - - - MBREXT - - - MBR - - - BSD - - - SIMDISK-class - - diff --git a/tools/regression/geom/Test/T008/testprg.c b/tools/regression/geom/Test/T008/testprg.c deleted file mode 100644 index eca224a..0000000 --- a/tools/regression/geom/Test/T008/testprg.c +++ /dev/null @@ -1,75 +0,0 @@ -/*- - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void * -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 deleted file mode 100644 index 18fd955..0000000 --- a/tools/regression/geom/Test/T009/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -# $FreeBSD$ -.include diff --git a/tools/regression/geom/Test/T009/ref.conf b/tools/regression/geom/Test/T009/ref.conf deleted file mode 100644 index caea5ce..0000000 --- a/tools/regression/geom/Test/T009/ref.conf +++ /dev/null @@ -1,18 +0,0 @@ - - $FreeBSD$ - - DEV-class - - - MBREXT - - - MBR - - - BSD - - - SIMDISK-class - - diff --git a/tools/regression/geom/Test/T009/testprg.c b/tools/regression/geom/Test/T009/testprg.c deleted file mode 100644 index ab71e92..0000000 --- a/tools/regression/geom/Test/T009/testprg.c +++ /dev/null @@ -1,89 +0,0 @@ -/*- - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void * -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 deleted file mode 100644 index 18fd955..0000000 --- a/tools/regression/geom/Test/T010/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -# $FreeBSD$ -.include diff --git a/tools/regression/geom/Test/T010/ref.conf b/tools/regression/geom/Test/T010/ref.conf deleted file mode 100644 index 6d12ea4..0000000 --- a/tools/regression/geom/Test/T010/ref.conf +++ /dev/null @@ -1,38 +0,0 @@ - - $FreeBSD$ - - DEV-class - - - ad0 - 2 - - - - r1w0e0 - - - - - MBREXT - - - MBR - - - BSD - - - SIMDISK-class - - - ad0 - 1 - - - r1w0e0 - ad0 - - - - diff --git a/tools/regression/geom/Test/T010/testprg.c b/tools/regression/geom/Test/T010/testprg.c deleted file mode 100644 index 29dd6ca..0000000 --- a/tools/regression/geom/Test/T010/testprg.c +++ /dev/null @@ -1,78 +0,0 @@ -/*- - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void * -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-class", cp->provider, NULL); - 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/T011/Makefile b/tools/regression/geom/Test/T011/Makefile deleted file mode 100644 index 18fd955..0000000 --- a/tools/regression/geom/Test/T011/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -# $FreeBSD$ -.include diff --git a/tools/regression/geom/Test/T011/ref.conf b/tools/regression/geom/Test/T011/ref.conf deleted file mode 100644 index 8461dce..0000000 --- a/tools/regression/geom/Test/T011/ref.conf +++ /dev/null @@ -1,40 +0,0 @@ - - $FreeBSD$ - - DEV-class - - - ad0 - 2 - - - - r1w0e0 - - - - - MBREXT - - - MBR - - - BSD - - - SIMDISK-class - - - ad0 - 1 - - - r1w0e0 - ad0 - 1474560 - 512 - - - - diff --git a/tools/regression/geom/Test/T011/testprg.c b/tools/regression/geom/Test/T011/testprg.c deleted file mode 100644 index 44e4b69..0000000 --- a/tools/regression/geom/Test/T011/testprg.c +++ /dev/null @@ -1,78 +0,0 @@ -/*- - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void * -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-class", 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 deleted file mode 100644 index 18fd955..0000000 --- a/tools/regression/geom/Test/T012/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -# $FreeBSD$ -.include diff --git a/tools/regression/geom/Test/T012/ref.conf b/tools/regression/geom/Test/T012/ref.conf deleted file mode 100644 index f6ad633..0000000 --- a/tools/regression/geom/Test/T012/ref.conf +++ /dev/null @@ -1,359 +0,0 @@ - - $FreeBSD$ - - SUN - - - ad0 - 2 - - 8192 - - - - - r0w0e0 - - - - - - r0w0e0 - ad0h - 1343787008 - 512 - - 7 - 1343787008 - 2624584 - 5638115328 - 11011944 - - - - - r0w0e0 - ad0g - 2149576704 - 512 - - 6 - 2149576704 - 4198392 - 3488538624 - 6813552 - - - - - r0w0e0 - ad0f - 2149576704 - 512 - - 5 - 2149576704 - 4198392 - 1338961920 - 2615160 - - - - - r0w0e0 - ad0d - 11124240384 - 512 - - 3 - 11124240384 - 21727032 - 6981902336 - 13636528 - - - - - r0w0e0 - ad0c - 18108555264 - 512 - - 2 - 18108555264 - 35368272 - 0 - 0 - - - - - r0w0e0 - ad0b - 1075994624 - 512 - - 1 - 1075994624 - 2101552 - 262967296 - 513608 - - - - - r0w0e0 - ad0a - 262967296 - 512 - - 0 - 262967296 - 513608 - 0 - 0 - - - - - - ad0 - 2 - - 8192 - - - - - r0w0e0 - - - - - - r0w0e0 - ad0h - 34629267456 - 512 - - 7 - 34629267456 - 67635288 - 2069028864 - 4041072 - - - - - r0w0e0 - ad0c - 36698296320 - 512 - - 2 - 36698296320 - 71676360 - 0 - 0 - - - - - r0w0e0 - ad0b - 539320320 - 512 - - 1 - 539320320 - 1053360 - 0 - 0 - - - - - r0w0e0 - ad0a - 1529708544 - 512 - - 0 - 1529708544 - 2987712 - 539320320 - 1053360 - - - - - - DEV-class - - - ad0h - 3 - - - - r0w0e0 - - - - - ad0g - 3 - - - - r0w0e0 - - - - - ad0f - 3 - - - - r0w0e0 - - - - - ad0d - 3 - - - - r0w0e0 - - - - - ad0c - 3 - - - - r0w0e0 - - - - - ad0b - 3 - - - - r0w0e0 - - - - - ad0a - 3 - - - - r0w0e0 - - - - - ad0 - 2 - - - - r0w0e0 - - - - - ad0h - 3 - - - - r0w0e0 - - - - - ad0c - 3 - - - - r0w0e0 - - - - - ad0b - 3 - - - - r0w0e0 - - - - - ad0a - 3 - - - - r0w0e0 - - - - - ad0 - 2 - - - - r0w0e0 - - - - - MBREXT - - - MBR - - - BSD - - - SIMDISK-class - - - ad0 - 1 - - - r0w0e0 - ad0 - 1099511627776 - 512 - - - - - ad0 - 1 - - - r0w0e0 - ad0 - 1099511627776 - 512 - - - - diff --git a/tools/regression/geom/Test/T012/testprg.c b/tools/regression/geom/Test/T012/testprg.c deleted file mode 100644 index 28645d7..0000000 --- a/tools/regression/geom/Test/T012/testprg.c +++ /dev/null @@ -1,73 +0,0 @@ -/*- - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void * -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); -} - diff --git a/tools/regression/geom/Test/T013/Makefile b/tools/regression/geom/Test/T013/Makefile deleted file mode 100644 index 18fd955..0000000 --- a/tools/regression/geom/Test/T013/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -# $FreeBSD$ -.include diff --git a/tools/regression/geom/Test/T013/ref.conf b/tools/regression/geom/Test/T013/ref.conf deleted file mode 100644 index 6f8dc7a..0000000 --- a/tools/regression/geom/Test/T013/ref.conf +++ /dev/null @@ -1,413 +0,0 @@ - - $FreeBSD$ - - DEV-class - - - da2c - 3 - - - - r0w0e0 - - - - - da2b - 3 - - - - r0w0e0 - - - - - da2a - 3 - - - - r0w0e0 - - - - - da1f - 3 - - - - r0w0e0 - - - - - da1e - 3 - - - - r0w0e0 - - - - - da1c - 3 - - - - r0w0e0 - - - - - da1b - 3 - - - - r0w0e0 - - - - - da1a - 3 - - - - r0w0e0 - - - - - da0c - 3 - - - - r0w0e0 - - - - - da0b - 3 - - - - r0w0e0 - - - - - da0a - 3 - - - - r0w0e0 - - - - - da2 - 2 - - - - r0w0e0 - - - - - da1 - 2 - - - - r0w0e0 - - - - - da0 - 2 - - - - r0w0e0 - - - - - MBREXT - - - MBR - - - BSD - - - da2 - 2 - - 8192 - 64 - 0 - 0 - - - - - r0w0e0 - - - - - - r0w0e0 - da2c - 74027520 - 512 - - 2 - 74027520 - 144585 - 4211343360 - 8225280 - 1 - - - - - r0w0e0 - da2b - 4178442240 - 512 - - 1 - 4178442240 - 8161020 - 32901120 - 64260 - 8 - - - - - r0w0e0 - da2a - 24675840 - 512 - - 0 - 24675840 - 48195 - 8225280 - 16065 - 8 - - - - - - da1 - 2 - - 8192 - 64 - 0 - 0 - - - - - r0w0e0 - - - - - - r0w0e0 - da1f - 16951073792 - 512 - - 5 - 16951073792 - 33107566 - 1358921728 - 2654144 - 7 - - - - - r0w0e0 - da1e - 20971520 - 512 - - 4 - 20971520 - 40960 - 1337950208 - 2613184 - 7 - - - - - r0w0e0 - da1c - 18309995520 - 512 - - 2 - 18309995520 - 35761710 - 0 - 0 - 0 - - - - - r0w0e0 - da1b - 1086291968 - 512 - - 1 - 1086291968 - 2121664 - 251658240 - 491520 - 1 - - - - - r0w0e0 - da1a - 251658240 - 512 - - 0 - 251658240 - 491520 - 0 - 0 - 7 - - - - - - da0 - 2 - - 8192 - 64 - 0 - 0 - - - - - r0w0e0 - - - - - - r0w0e0 - da0c - 4335206400 - 512 - - 2 - 4335206400 - 8467200 - 0 - 0 - 0 - - - - - r0w0e0 - da0b - 270925824 - 512 - - 1 - 270925824 - 529152 - 4064280576 - 7938048 - 1 - - - - - r0w0e0 - da0a - 4064280576 - 512 - - 0 - 4064280576 - 7938048 - 0 - 0 - 7 - - - - - - SIMDISK-class - - - da2 - 1 - - - r0w0e0 - da2 - 1099511627776 - 512 - - - - - da1 - 1 - - - r0w0e0 - da1 - 1099511627776 - 512 - - - - - da0 - 1 - - - r0w0e0 - da0 - 1099511627776 - 512 - - - - diff --git a/tools/regression/geom/Test/T013/testprg.c b/tools/regression/geom/Test/T013/testprg.c deleted file mode 100644 index d014161..0000000 --- a/tools/regression/geom/Test/T013/testprg.c +++ /dev/null @@ -1,71 +0,0 @@ -/*- - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void * -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("da0", "../../Data/disk.beast.da0.xml"); - g_simdisk_xml_load("da1", "../../Data/disk.alpha.da0.xml"); - g_simdisk_xml_load("da2", "../../Data/disk.alpha2.da0.xml"); - rattle(); - conff("1"); - printf("Done\n"); - done(); - return (0); -} diff --git a/tools/regression/geom/Test/T014/Makefile b/tools/regression/geom/Test/T014/Makefile deleted file mode 100644 index 18fd955..0000000 --- a/tools/regression/geom/Test/T014/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -# $FreeBSD$ -.include diff --git a/tools/regression/geom/Test/T014/ref.conf b/tools/regression/geom/Test/T014/ref.conf deleted file mode 100644 index a1c0e2a..0000000 --- a/tools/regression/geom/Test/T014/ref.conf +++ /dev/null @@ -1,230 +0,0 @@ - - $FreeBSD$ - - DEV-class - - - wd0s1f - 4 - - - - r0w0e0 - - - - - wd0s1e - 4 - - - - r0w0e0 - - - - - wd0s1c - 4 - - - - r0w0e0 - - - - - wd0s1b - 4 - - - - r0w0e0 - - - - - wd0s1a - 4 - - - - r0w0e0 - - - - - wd0s1 - 3 - - - - r0w0e0 - - - - - wd0 - 2 - - - - r0w0e0 - - - - - PC98 - - - wd0 - 2 - - 8704 - - - - - r0w0e0 - - - - - - r0w0e0 - wd0s1 - 1626603520 - 512 - - 0 - 1626603520 - 3176960 - 69632 - 136 - 50324 - FreeBSD - - - - - - SUN - - - MBREXT - - - MBR - - - BSD - - - wd0s1 - 3 - - 8192 - 512 - 136 - 69632 - - - - - r0w0e0 - - - - - - r0w0e0 - wd0s1f - 1390673920 - 512 - - 5 - 1390673920 - 2716160 - 235929600 - 460800 - 7 - - - - - r0w0e0 - wd0s1e - 52428800 - 512 - - 4 - 52428800 - 102400 - 183500800 - 358400 - 7 - - - - - r0w0e0 - wd0s1c - 1626603520 - 512 - - 2 - 1626603520 - 3176960 - 0 - 0 - 0 - - - - - r0w0e0 - wd0s1b - 104857600 - 512 - - 1 - 104857600 - 204800 - 78643200 - 153600 - 1 - - - - - r0w0e0 - wd0s1a - 78643200 - 512 - - 0 - 78643200 - 153600 - 0 - 0 - 7 - - - - - - SIMDISK-class - - - wd0 - 1 - - - r0w0e0 - wd0 - 1099511627776 - 512 - - - - diff --git a/tools/regression/geom/Test/T014/testprg.c b/tools/regression/geom/Test/T014/testprg.c deleted file mode 100644 index eb76581..0000000 --- a/tools/regression/geom/Test/T014/testprg.c +++ /dev/null @@ -1,72 +0,0 @@ -/*- - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void * -thread_sim(void *ptr __unused) -{ - - rattle(); - g_simdisk_init(); - g_bsd_init(); - g_mbr_init(); - g_mbrext_init(); - g_sunlabel_init(); - g_pc98_init(); - g_dev_init(NULL); - rattle(); - - - g_simdisk_xml_load("wd0", "../../Data/disk.pc98.wdc0.xml"); - rattle(); - conff("1"); - sdumpf("2"); - printf("Done\n"); - done(); - return (0); -} - diff --git a/tools/regression/geom/Test/T015/Makefile b/tools/regression/geom/Test/T015/Makefile deleted file mode 100644 index 18fd955..0000000 --- a/tools/regression/geom/Test/T015/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -# $FreeBSD$ -.include diff --git a/tools/regression/geom/Test/T015/ref.conf b/tools/regression/geom/Test/T015/ref.conf deleted file mode 100644 index 5775799..0000000 --- a/tools/regression/geom/Test/T015/ref.conf +++ /dev/null @@ -1,121 +0,0 @@ - - $FreeBSD$ - - DEV-class - - - da0p2 - 3 - - - - r0w0e0 - - - - - da0p1 - 3 - - - - r0w0e0 - - - - - da0p0 - 3 - - - - r0w0e0 - - - - - da0 - 2 - - - - r0w0e0 - - - - - APPLE - - - da0 - 2 - - 8192 - - - - - r0w0e0 - - - - - - r0w0e0 - da0p2 - 16384 - 512 - - 2 - 16384 - 32 - 32768 - 64 - - - - - r0w0e0 - da0p1 - 32256 - 512 - - 1 - 32256 - 63 - 512 - 1 - - - - - r0w0e0 - da0p0 - 366481408 - 512 - - 0 - 366481408 - 715784 - 49152 - 96 - - - - - - SIMDISK-class - - - da0 - 1 - - - r0w0e0 - da0 - 366530560 - 512 - - - - diff --git a/tools/regression/geom/Test/T015/testprg.c b/tools/regression/geom/Test/T015/testprg.c deleted file mode 100644 index cd7f4b8..0000000 --- a/tools/regression/geom/Test/T015/testprg.c +++ /dev/null @@ -1,67 +0,0 @@ -/*- - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void * -thread_sim(void *ptr __unused) -{ - - rattle(); - g_simdisk_init(); - g_apple_init(); - g_dev_init(NULL); - rattle(); - - - g_simdisk_xml_load("da0", "../../Data/disk.apple.xml"); - rattle(); - conff("1"); - printf("Done\n"); - done(); - return (0); -} diff --git a/tools/regression/geom/geom.c b/tools/regression/geom/geom.c deleted file mode 100644 index 68217b8..0000000 --- a/tools/regression/geom/geom.c +++ /dev/null @@ -1,196 +0,0 @@ -/*- - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void -conff(const char *file) -{ - FILE *f; - char *s; - struct sbuf *sb; - - printf(">> conf to %s\n", file); - asprintf(&s, "_%s.conf", file); - f = fopen(s, "w"); - if (f == NULL) - err(1, s); - sb = sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND); - sbuf_clear(sb); - g_confxml(sb); - fputs(sbuf_data(sb), f); - fclose(f); - free(s); -} - -static void * -thread_up(void *ptr) -{ - struct thread *tp = ptr; - int error; - - printf("Running %s\n", tp->name); - error = pthread_cond_init(&ptc_up, NULL); - if (error) - err(1, "pthread_cond_init(ptc_up)"); - error = pthread_mutex_init(&ptm_up, NULL); - if (error) - err(1, "pthread_mutex_init(ptm_up)"); - - error = pthread_mutex_lock(&ptm_up); - if (error) - err(1, "pthread_mutex_init(ptm_up)"); - for (;;) { - g_io_schedule_up(tp); - error = pthread_cond_wait(&ptc_up, &ptm_up); - } -} - -static void * -thread_down(void *ptr) -{ - struct thread *tp = ptr; - int error; - - printf("Running %s\n", tp->name); - error = pthread_cond_init(&ptc_down, NULL); - if (error) - err(1, "pthread_cond_init(ptc_down)"); - error = pthread_mutex_init(&ptm_down, NULL); - if (error) - err(1, "pthread_mutex_init(ptm_down)"); - error = pthread_mutex_lock(&ptm_down); - if (error) - err(1, "pthread_mutex_init(ptm_down)"); - for (;;) { - g_io_schedule_down(tp); - error = pthread_cond_wait(&ptc_down, &ptm_down); - } -} - -static void * -thread_event(void *ptr) -{ - struct thread *tp = ptr; - int error; - - printf("Running %s\n", tp->name); - error = pthread_cond_init(&ptc_event, NULL); - if (error) - err(1, "pthread_cond_init(ptc_event)"); - error = pthread_mutex_init(&ptm_event, NULL); - if (error) - err(1, "pthread_mutex_init(ptm_event)"); - error = pthread_mutex_lock(&ptm_event); - if (error) - err(1, "pthread_mutex_init(ptm_event)"); - for (;;) { - g_run_events(); - error = pthread_cond_wait(&ptc_event, &ptm_event); - } -} - - -int -main(int argc __unused, char **argv __unused) -{ - int ch; - - while ((ch = getopt(argc, argv, "bt")) != -1) { - switch (ch) { - case 'b': - g_debugflags |= G_T_BIO; - break; - case 't': - g_debugflags |= G_T_TOPOLOGY; - break; - } - } - - - setbuf(stdout, NULL); - printf("Sizeof g_class = %d\n", sizeof(struct g_class)); - printf("Sizeof g_geom = %d\n", sizeof(struct g_geom)); - printf("Sizeof g_consumer = %d\n", sizeof(struct g_consumer)); - printf("Sizeof g_provider = %d\n", sizeof(struct g_provider)); - printf("Sizeof g_event = %d\n", sizeof(struct g_event)); - g_init(); - new_thread(thread_up, "UP"); - new_thread(thread_down, "DOWN"); - new_thread(thread_event, "EVENT"); - new_thread(thread_sim, "SIM"); - - while (1) { - sleep (1); - secrethandshake(); - } -} - -void -sdumpf(const char *file) -{ - FILE *f; - char *s; - struct sbuf *sb; - - printf(">> dump to %s\n", file); - asprintf(&s, "_%s.dot", file); - f = fopen(s, "w"); - if (f == NULL) - err(1, s); - sb = sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND); - sbuf_clear(sb); - g_confdot(sb); - fprintf(f, "%s", sbuf_data(sb)); - fclose(f); - free(s); - asprintf(&s, "dot -Tps _%s.dot > _%s.ps", file, file); - system(s); - free(s); -} - diff --git a/tools/regression/geom/geom_kernsim.c b/tools/regression/geom/geom_kernsim.c deleted file mode 100644 index 8b05154..0000000 --- a/tools/regression/geom/geom_kernsim.c +++ /dev/null @@ -1,288 +0,0 @@ -/*- - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#define NTHREAD 30 -static struct thread thr[NTHREAD]; - -static int weredone; -int g_debugflags; -int bootverbose = 1; - -void -done(void) -{ - - rattle(); - weredone = 1; - exit(0); -} - -void -secrethandshake() -{ - int i; - - if (weredone) - exit(0); - for (i = 0; i < NTHREAD; i++) { - if (thr[i].pid == 0) - continue; - if (kill(thr[i].pid, 0)) { - printf("\n\nMissing process for thread %d (\"%s\")\n", - i, thr[i].name); - goto scram; - } - } - return; - -scram: - for (i = 0; i < NTHREAD; i++) { - if (thr[i].pid == 0) - continue; - if (thr[i].pid == getpid()) - continue; - kill(thr[i].pid, 9); - } - exit(9); -} - - -void -biodone(struct bio *bp) -{ - bp->bio_flags |= BIO_DONE; - if (bp->bio_done != NULL) - bp->bio_done(bp); -} - -int -biowait(struct bio *bp, const char *wchan __unused) -{ - - while ((bp->bio_flags & BIO_DONE) == 0) - usleep(10000); - if (!(bp->bio_flags & BIO_ERROR)) - return (0); - if (bp->bio_error) - return (bp->bio_error); - return (EIO); -} - -void -wakeup(void *chan) -{ - - if (chan == &g_wait_event) - pthread_cond_signal(&ptc_event); - else if (chan == &g_wait_up) - pthread_cond_signal(&ptc_up); - else if (chan == &g_wait_down) - pthread_cond_signal(&ptc_down); - else - return; -} - -int hz; - -int -tsleep(void *chan __unused, int pri __unused, const char *wmesg __unused, int timo) -{ - - usleep(timo); - return (0); -} - -void -rattle() -{ - int i; - - pthread_yield(); - - for (;;) { - i = pthread_mutex_trylock(&ptm_up); - if (i != EBUSY) { - i = pthread_mutex_trylock(&ptm_down); - if (i != EBUSY) { - i = pthread_mutex_trylock(&ptm_event); - if (i != EBUSY) - break; - pthread_mutex_unlock(&ptm_down); - } - pthread_mutex_unlock(&ptm_up); - } - usleep(100000); - } - pthread_mutex_unlock(&ptm_event); - pthread_mutex_unlock(&ptm_down); - pthread_mutex_unlock(&ptm_up); - return; -} - - -void -new_thread(void *(*func)(void *arg), const char *name) -{ - struct thread *tp; - static int nextt; - int error; - - tp = thr + nextt++; - error = pthread_create(&tp->tid, NULL, func, tp); - if (error) - err(1, "pthread_create(%s)", name); - tp->name = strdup(name); - printf("New Thread %d %s %p %d\n", tp - thr, name, tp, tp->pid); -} - -#define FASCIST 0 - -void * -g_malloc(int size, int flags) -{ - void *p; - -#if FASCIST - p = malloc(4096); - printf("Malloc %p \n", p); -#else - p = malloc(size); -#endif - if (flags & M_ZERO) - memset(p, 0, size); - else - memset(p, 0xd0, size); - return (p); -} - -void -g_free(void *ptr) -{ - - secrethandshake(); -#if FASCIST - printf("Free %p \n", ptr); - munmap(ptr, 4096); -#else - free(ptr); -#endif -} - -static pthread_mutex_t pt_topology; - -void -g_init(void) -{ - - pthread_mutex_init(&pt_topology, NULL); - g_io_init(); - g_event_init(); -} - -void -g_topology_lock() -{ - - pthread_mutex_lock(&pt_topology); -} - -void -g_topology_unlock() -{ - - pthread_mutex_unlock(&pt_topology); -} - -void -g_topology_assert() -{ - -#if 0 - if (topology_lock == getpid()) - return; - KASSERT(1 == 0, ("Lacking topology_lock")); -#endif -} - -void -mtx_init(struct mtx *mp, const char *bla __unused, const char *yak __unused, int foo __unused) -{ - - pthread_mutex_init((pthread_mutex_t *)&mp->mtx_object, NULL); -} - -void -mtx_destroy(struct mtx *mp) -{ - - pthread_mutex_destroy((pthread_mutex_t *)&mp->mtx_object); -} - -void -mtx_lock(struct mtx *mp) -{ - - pthread_mutex_lock((pthread_mutex_t *)&mp->mtx_object); -} - -void -mtx_unlock(struct mtx *mp) -{ - - pthread_mutex_unlock((pthread_mutex_t *)&mp->mtx_object); -} - -struct mtx Giant; - diff --git a/tools/regression/geom/geom_sim.c b/tools/regression/geom/geom_sim.c deleted file mode 100644 index cdb145f..0000000 --- a/tools/regression/geom/geom_sim.c +++ /dev/null @@ -1,185 +0,0 @@ -/*- - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -int -thread_sim(void *ptr) -{ - struct thread *tp = ptr; - struct g_consumer *cp; - - printf("Running %s\n", tp->name); - rattle(); - g_topology_lock(); - printf("--- g_simdisk_init();\n"); - g_simdisk_init(); - printf("--- g_bsd_init();\n"); - g_bsd_init(); - printf("--- g_mbr_init();\n"); - g_mbr_init(); - g_mbrext_init(); - printf("--- g_dev_init();\n"); - g_dev_init(NULL); - g_topology_unlock(); - rattle(); - -#if 0 - g_simdisk_new("ad0", "/dev/ad0"); -#else - g_simdisk_xml_load("ad0", "Data/disk.typo.ad0.xml"); - // g_simdisk_xml_load("ad0", "Data/disk.msdos.ext.xml"); - // g_simdisk_xml_load("ad0", "Data/disk.far.ad0.xml"); -#endif - rattle(); - dumpf("1"); - conff("1"); - sdumpf("2"); - g_simdisk_xml_save("ad0", "_ad0"); - g_simdisk_destroy("ad0"); - rattle(); - dumpf("1"); - conff("1"); - sdumpf("2"); - - printf("Done\n"); - exit (0); - -#if 0 - printf("--- g_dev_finddev(\"ad0s1a\");\n"); - cp = g_dev_finddev("ad0s1a"); - if (cp == NULL) - errx(1, "argh!"); - printf("--- g_access_rel(cp, 1, 1, 1);\n"); - g_access_rel(cp, 1, 1, 1); - sleep(3); - dumpf("1"); - conff("1"); - sdumpf("2"); - - printf("--- g_access_rel(cp, -1, -1, -1);\n"); - g_access_rel(cp, -1, -1, -1); - sleep(3); - dumpf("1"); - conff("1"); - sdumpf("2"); - - printf("--- g_dev_finddev(\"ad0\");\n"); - cp = g_dev_finddev("ad0"); - if (cp == NULL) - errx(1, "argh!"); - printf("--- g_access_rel(cp, 1, 1, 1);\n"); - g_access_rel(cp, 1, 1, 1); - sleep(3); - dumpf("1"); - conff("1"); - sdumpf("2"); - - printf("--- g_access_rel(cp, -1, -1, -1);\n"); - g_access_rel(cp, -1, -1, -1); - - sleep (3); - dumpf("1"); - conff("1"); - sdumpf("2"); -#if 0 - printf("--- Simulation done...\n"); - for (;;) - sleep(1); - exit (0); -#endif - -#endif -#if 1 - g_simdisk_new("../Disks/typo.freebsd.dk:ad0", "ad1"); -#else - g_simdisk_xml_load("ad0", "disk.critter.ad0.xml"); -#endif - sleep (3); - dumpf("1"); - conff("1"); - sdumpf("2"); - g_simdisk_xml_save("ad1", "_ad1"); - -#if 1 - sleep (3); - g_simdisk_new("/home/phk/phk2001/msdos_6_2-1.flp", "fd0"); - sleep (3); - dumpf("1"); - conff("1"); - sdumpf("2"); - g_simdisk_xml_save("fd0", "_fd0"); - - sleep (3); - g_simdisk_new("/home/phk/phk2001/kern.flp", "fd1"); - sleep (3); - dumpf("1"); - conff("1"); - sdumpf("2"); - g_simdisk_xml_save("fd1", "_fd1"); - - sleep (3); - g_simdisk_new("../Disks/far:ad0", "ad2"); - sleep (3); - dumpf("1"); - conff("1"); - sdumpf("2"); - g_simdisk_xml_save("ad2", "_ad2"); - -#endif - sleep (3); - g_simdisk_destroy("ad1"); - sleep (5); - dumpf("1"); - conff("1"); - sdumpf("2"); - - printf("Simulation done...\n"); - - exit (0); -} - diff --git a/tools/regression/geom/geom_sim.h b/tools/regression/geom/geom_sim.h deleted file mode 100644 index a28d7e7..0000000 --- a/tools/regression/geom/geom_sim.h +++ /dev/null @@ -1,176 +0,0 @@ -/*- - * 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 - -pthread_cond_t ptc_up, ptc_down, ptc_event; -pthread_mutex_t ptm_up, ptm_down, ptm_event; - -#define CTASSERT(foo) - -#define DROP_GIANT() -#define PICKUP_GIANT() - -#define EDIRIOCTL -6 - -#define copyin(foo, bar, barf) 0 - -/* bio.h */ - -struct bio { - enum { - BIO_INVALID = 0, - BIO_READ = 1, - BIO_WRITE = 2, - BIO_DELETE = 4, - BIO_GETATTR = 8, - BIO_SETATTR = 16 - } bio_cmd; - struct { int foo; } stats; - TAILQ_ENTRY(bio) bio_queue; - TAILQ_ENTRY(bio) bio_sort; - struct g_consumer *bio_from; - struct g_provider *bio_to; - void (*bio_done)(struct bio *); - - off_t bio_offset; - off_t bio_length; - off_t bio_completed; - void *bio_data; - const char *bio_attribute; /* BIO_GETATTR/BIO_SETATTR */ - int bio_error; - u_int bio_children; /* Number of spawned bios */ - - - struct bio *bio_linkage; - int bio_flags; -#define BIO_DONE 0x1 -#define BIO_ERROR 0x2 -}; - -void biodone(struct bio *bp); -int biowait(struct bio *bp, const char *wchan); - -/* geom_dev.c */ -void g_dev_init(void *junk); -struct g_consumer *g_dev_opendev(const char *name, int w, int r, int e); -int g_dev_request(const char *name, struct bio *bp); - -/* geom_kernsim.c */ -struct thread { - char *name; - pthread_t tid; - int pid; - void *wchan; - const char *wmesg; - int pipe[2]; -}; - -void done(void); -void rattle(void); -void secrethandshake(void); -void wakeup(void *chan); -int tsleep __P((void *chan, int pri, const char *wmesg, int timo)); -#define PPAUSE 0 -extern int hz; - -void new_thread(void *(*func)(void *arg), const char *name); - -extern int bootverbose; -#define KASSERT(cond, txt) do {if (!(cond)) {printf txt; conff("err"); abort();}} while(0) -#define M_WAITOK 0 -#define M_NOWAIT 1 -#define M_ZERO 2 - -extern struct mtx Giant; -void *g_malloc(int size, int flags); -void g_free(void *ptr); - -#define MTX_DEF 0 -#define MTX_SPIN 1 -void mtx_lock(struct mtx *); -void mtx_lock_spin(struct mtx *); -void mtx_unlock(struct mtx *); -void mtx_unlock_spin(struct mtx *); -void mtx_init(struct mtx *, const char *, const char *, int); -void mtx_destroy(struct mtx *); - -#define MALLOC_DECLARE(foo) /* */ - -void g_topology_lock(void); -void g_topology_unlock(void); -void g_topology_assert(void); - - -/* geom_simdisk.c */ -void g_simdisk_init(void); -void g_simdisk_destroy(const char *); -struct g_geom *g_simdisk_new(const char *, const char *); -struct g_geom * g_simdisk_xml_load(const char *name, const char *file); -void g_simdisk_xml_save(const char *name, const char *file); -void g_simdisk_stop(const char *name); -void g_simdisk_restart(const char *name); - -#define DECLARE_GEOM_CLASS(class, name) \ -void name##_init(void); \ - void \ - name##_init(void) \ - { \ - g_add_class(&class); \ - } - -void g_aes_init(void); -void g_apple_init(void); -void g_bsd_init(void); -void g_mbr_init(void); -void g_mbrext_init(void); -void g_sunlabel_init(void); -void g_pc98_init(void); - - -void *thread_sim(void *ptr); - -void dumpf(const char *file); -void conff(const char *file); -void sdumpf(const char *file); - -#define THR_MAIN 0 -#define THR_UP 1 -#define THR_DOWN 2 -#define THR_EVENT 3 - -#define EJUSTRETURN (-2) diff --git a/tools/regression/geom/geom_simdev.c b/tools/regression/geom/geom_simdev.c deleted file mode 100644 index 4221742..0000000 --- a/tools/regression/geom/geom_simdev.c +++ /dev/null @@ -1,159 +0,0 @@ -/*- - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static g_orphan_t g_dev_orphan; - -static struct g_geom * -dev_taste(struct g_class *mp, struct g_provider *pp, int insist __unused) -{ - struct g_geom *gp; - struct g_consumer *cp; - - g_trace(G_T_TOPOLOGY, "dev_taste(%s,%s)", mp->name, pp->name); - g_topology_assert(); - LIST_FOREACH(cp, &pp->consumers, consumers) { - if (cp->geom->class == mp) { - g_topology_unlock(); - return (NULL); - } - } - gp = g_new_geomf(mp, pp->name); - gp->orphan = g_dev_orphan; - cp = g_new_consumer(gp); - g_attach(cp, pp); - return (gp); -} - - -static void -g_dev_orphan(struct g_consumer *cp) -{ - struct g_geom *gp; - - gp = cp->geom; - gp->flags |= G_GEOM_WITHER; - g_trace(G_T_TOPOLOGY, "g_dev_orphan(%p(%s))", cp, gp->name); - if (cp->biocount > 0) - return; - if (cp->acr > 0 || cp->acw > 0 || cp->ace > 0) - g_access_rel(cp, -cp->acr, -cp->acw, -cp->ace); - g_detach(cp); - g_destroy_consumer(cp); - g_destroy_geom(gp); -} - - -static struct g_class dev_class = { - "DEV-class", - dev_taste, - NULL, - G_CLASS_INITIALIZER -}; - -static struct g_geom * -g_dev_findg(const char *name) -{ - struct g_geom *gp; - - LIST_FOREACH(gp, &dev_class.geom, geom) - if (!strcmp(gp->name, name)) - break; - return (gp); -} - -void -g_dev_init(void *junk __unused) -{ - - g_add_class(&dev_class); -} - - -struct g_consumer * -g_dev_opendev(const char *name, int r, int w, int e) -{ - struct g_geom *gp; - struct g_consumer *cp; - int error; - - gp = g_dev_findg(name); - if (gp == NULL) - return (NULL); - g_topology_lock(); - cp = LIST_FIRST(&gp->consumer); - error = g_access_rel(cp, r, w, e); - g_topology_unlock(); - if (error) - return(NULL); - return(cp); -} - -static void -g_dev_done(struct bio *bp) -{ - - if (bp->bio_from->biocount > 0) - return; - g_topology_lock(); - g_dev_orphan(bp->bio_from); - g_topology_unlock(); -} - -int -g_dev_request(const char *name, struct bio *bp) -{ - struct g_geom *gp; - - gp = g_dev_findg(name); - if (gp == NULL) - return (-1); - bp->bio_done = g_dev_done; - g_io_request(bp, LIST_FIRST(&gp->consumer)); - return (1); -} diff --git a/tools/regression/geom/geom_simdisk.c b/tools/regression/geom/geom_simdisk.c deleted file mode 100644 index ed9ed1f..0000000 --- a/tools/regression/geom/geom_simdisk.c +++ /dev/null @@ -1,259 +0,0 @@ -/*- - * 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 -#include -#include -#include -#include -#include -#include -#include -#include - -#include "geom_simdisk.h" - -struct g_class g_simdisk_class = { - "SIMDISK-class", - NULL, - NULL, - G_CLASS_INITIALIZER -}; - -static void -g_simdisk_start(struct bio *bp) -{ - off_t ot, off; - unsigned nsec; - u_char *op; - int i; - struct g_geom *gp = bp->bio_to->geom; - struct simdisk_softc *sc = gp->softc; - struct sector *dsp; - - - printf("SIMDISK: OP%d %qd at %qd\n", - bp->bio_cmd, bp->bio_length, bp->bio_offset); - if (sc->stop) { - TAILQ_INSERT_TAIL(&sc->sort, bp, bio_sort); - return; - } - if (bp->bio_cmd == BIO_READ) { - off = bp->bio_offset; - nsec = bp->bio_length /= sc->sectorsize; - op = bp->bio_data; - while (nsec) { - dsp = g_simdisk_findsector(sc, off, 0); - if (dsp == NULL) { - dsp = g_simdisk_findsector(sc, off, 1); - ot = lseek(sc->fd, off, SEEK_SET); - if (ot != off) { - g_io_deliver(bp, EIO); - return; - } - i = read(sc->fd, dsp->data, sc->sectorsize); - if (i < 0) { - g_io_deliver(bp, errno); - return; - } - if (i == 0) - memset(dsp->data, 0, sc->sectorsize); - } - memcpy(op, dsp->data, sc->sectorsize); - bp->bio_completed += sc->sectorsize; - off += sc->sectorsize; - op += sc->sectorsize; - nsec--; - } - g_io_deliver(bp, 0); - return; - } - if (bp->bio_cmd == BIO_GETATTR) { - if (g_handleattr_int(bp, "GEOM::fwsectors", sc->fwsectors)) - return; - if (g_handleattr_int(bp, "GEOM::fwheads", sc->fwheads)) - return; - if (g_handleattr_int(bp, "GEOM::fwcylinders", sc->fwcylinders)) - return; - } - g_io_deliver(bp, EOPNOTSUPP); -} - -void -g_simdisk_init(void) -{ - g_add_class(&g_simdisk_class); -} - -struct g_geom * -g_simdisk_create(const char *name, struct simdisk_softc *sc) -{ - struct g_geom *gp; - struct g_provider *pp; - static int unit; - - printf("g_simdisk_create(\"%s\", %p)\n", name, sc); - g_topology_lock(); - gp = g_new_geomf(&g_simdisk_class, "%s", name); - gp->start = g_simdisk_start; - gp->softc = sc; - gp->access = g_std_access; - - pp = g_new_providerf(gp, "%s", name); - pp->mediasize = sc->mediasize; - pp->sectorsize = sc->sectorsize; - g_error_provider(pp, 0); - unit++; - g_topology_unlock(); - return (gp); -} - -struct g_geom * -g_simdisk_new(const char *name, const char *path) -{ - struct simdisk_softc *sc; - struct stat st; - - sc = calloc(1, sizeof *sc); - - sc->fd = open(path, O_RDONLY); - if (sc->fd < 0) - err(1, path); - fstat(sc->fd, &st); - sc->mediasize = st.st_size; - sc->sectorsize = 512; - LIST_INIT(&sc->sectors); - TAILQ_INIT(&sc->sort); - return (g_simdisk_create(name, sc)); -} - -void -g_simdisk_destroy(const char *name) -{ - struct g_geom *gp; - - LIST_FOREACH(gp, &g_simdisk_class.geom, geom) { - if (strcmp(name, gp->name)) - continue; - gp->flags |= G_GEOM_WITHER; - g_orphan_provider(LIST_FIRST(&gp->provider), ENXIO); - return; - } -} - -struct sector * -g_simdisk_findsector(struct simdisk_softc *sc, off_t off, int create) -{ - struct sector *dsp; - - LIST_FOREACH(dsp, &sc->sectors, sectors) { - if (dsp->offset < off) - continue; - if (dsp->offset == off) - return (dsp); - break; - } - if (!create) - return (NULL); - printf("Creating sector at offset %lld (%u)\n", - off, (unsigned)(off / sc->sectorsize)); - dsp = calloc(1, sizeof *dsp + sc->sectorsize); - dsp->data = (u_char *)(dsp + 1); - dsp->offset = off; - g_simdisk_insertsector(sc, dsp); - return (dsp); -} - -void -g_simdisk_insertsector(struct simdisk_softc *sc, struct sector *dsp) -{ - struct sector *dsp2, *dsp3; - - if (LIST_EMPTY(&sc->sectors)) { - LIST_INSERT_HEAD(&sc->sectors, dsp, sectors); - return; - } - dsp3 = NULL; - LIST_FOREACH(dsp2, &sc->sectors, sectors) { - dsp3 = dsp2; - if (dsp2->offset > dsp->offset) { - LIST_INSERT_BEFORE(dsp2, dsp, sectors); - return; - } - } - LIST_INSERT_AFTER(dsp3, dsp, sectors); -} - -void -g_simdisk_stop(const char *name) -{ - struct g_geom *gp; - struct simdisk_softc *sc; - - g_trace(G_T_TOPOLOGY, "g_simdisk_stop(%s)", name); - LIST_FOREACH(gp, &g_simdisk_class.geom, geom) { - if (strcmp(name, gp->name)) - continue; - sc = gp->softc; - sc->stop = 1; - return; - } -} - -void -g_simdisk_restart(const char *name) -{ - struct g_geom *gp; - struct simdisk_softc *sc; - struct bio *bp; - - g_trace(G_T_TOPOLOGY, "g_simdisk_restart(%s)", name); - LIST_FOREACH(gp, &g_simdisk_class.geom, geom) { - if (strcmp(name, gp->name)) - continue; - sc = gp->softc; - sc->stop = 0; - bp = TAILQ_FIRST(&sc->sort); - while (bp != NULL) { - TAILQ_REMOVE(&sc->sort, bp, bio_sort); - g_simdisk_start(bp); - bp = TAILQ_FIRST(&sc->sort); - } - return; - } -} diff --git a/tools/regression/geom/geom_simdisk.h b/tools/regression/geom/geom_simdisk.h deleted file mode 100644 index de4d0fb..0000000 --- a/tools/regression/geom/geom_simdisk.h +++ /dev/null @@ -1,64 +0,0 @@ -/*- - * 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$ - */ - -struct sector { - LIST_ENTRY(sector) sectors; - off_t offset; - unsigned char *data; -}; - -struct simdisk_softc { - int fd; - int sectorsize; - off_t mediasize; - off_t lastsector; - LIST_HEAD(,sector) sectors; - struct sbuf *sbuf; - struct sector *sp; - int stop; - u_int fwsectors; - u_int fwheads; - u_int fwcylinders; - TAILQ_HEAD(,bio) sort; -}; - -extern struct g_class g_simdisk_class; - -struct sector * g_simdisk_findsector(struct simdisk_softc *sc, off_t off, int create); -struct g_geom *g_simdisk_create(const char *name, struct simdisk_softc *sc); - -void g_simdisk_insertsector(struct simdisk_softc *sc, struct sector *dsp); diff --git a/tools/regression/geom/geom_simdisk_xml.c b/tools/regression/geom/geom_simdisk_xml.c deleted file mode 100644 index 47dcea5..0000000 --- a/tools/regression/geom/geom_simdisk_xml.c +++ /dev/null @@ -1,244 +0,0 @@ -/*- - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "geom_simdisk.h" - -void -g_simdisk_xml_save(const char *name, const char *file) -{ - struct g_geom *gp; - struct simdisk_softc *sc; - struct sector *dsp; - int i, j; - FILE *f; - u_char *p; - - LIST_FOREACH(gp, &g_simdisk_class.geom, geom) { - if (strcmp(name, gp->name)) - continue; - sc = gp->softc; - f = fopen(file, "w"); - if (f == NULL) - err(1, file); - fprintf(f, "\n"); - fprintf(f, "\n"); -#if 0 - { - struct sbuf *sb; - sb = g_conf_specific(&g_simdisk_class, gp, NULL, NULL); - fprintf(f, " %s\n", sbuf_data(sb)); - } -#endif - fprintf(f, " %u\n", sc->sectorsize); - fprintf(f, " %llu\n", sc->mediasize); - fprintf(f, " %u\n", sc->fwsectors); - fprintf(f, " %u\n", sc->fwheads); - fprintf(f, " %u\n", sc->fwcylinders); - LIST_FOREACH(dsp, &sc->sectors, sectors) { - fprintf(f, " \n"); - fprintf(f, " %llu\n", dsp->offset); - fprintf(f, " \n"); - p = dsp->data; - for (j = 0 ; j < sc->sectorsize; j += 32) { - fprintf(f, "\t"); - for (i = 0; i < 32; i++) - fprintf(f, "%02x", *p++); - fprintf(f, "\n"); - } - fprintf(f, " \n"); - fprintf(f, " \n"); - } - fprintf(f, "\n"); - fclose(f); - } -} - -static void -startElement(void *userData, const char *name, const char **atts __unused) -{ - struct simdisk_softc *sc; - - sc = userData; - if (!strcasecmp(name, "sector")) { - sc->sp = calloc(1, sizeof(*sc->sp) + sc->sectorsize); - sc->sp->data = (u_char *)(sc->sp + 1); - } - sbuf_clear(sc->sbuf); -} - -static void -endElement(void *userData, const char *name) -{ - struct simdisk_softc *sc; - char *p; - u_char *q; - int i, j; - off_t o; - - sc = userData; - - if (!strcasecmp(name, "comment")) { - sbuf_clear(sc->sbuf); - return; - } - sbuf_finish(sc->sbuf); - if (!strcasecmp(name, "sectorsize")) { - sc->sectorsize = strtoul(sbuf_data(sc->sbuf), &p, 0); - if (*p != '\0') - errx(1, "strtoul croaked on sectorsize"); - } else if (!strcasecmp(name, "mediasize")) { - o = strtoull(sbuf_data(sc->sbuf), &p, 0); - if (*p != '\0') - errx(1, "strtoul croaked on mediasize"); - if (o > 0) - sc->mediasize = o; - } else if (!strcasecmp(name, "fwsectors")) { - sc->fwsectors = strtoul(sbuf_data(sc->sbuf), &p, 0); - if (*p != '\0') - errx(1, "strtoul croaked on fwsectors"); - } else if (!strcasecmp(name, "fwheads")) { - sc->fwheads = strtoul(sbuf_data(sc->sbuf), &p, 0); - if (*p != '\0') - errx(1, "strtoul croaked on fwheads"); - } else if (!strcasecmp(name, "fwcylinders")) { - sc->fwcylinders = strtoul(sbuf_data(sc->sbuf), &p, 0); - if (*p != '\0') - errx(1, "strtoul croaked on fwcylinders"); - } else if (!strcasecmp(name, "offset")) { - sc->sp->offset= strtoull(sbuf_data(sc->sbuf), &p, 0); - if (*p != '\0') - errx(1, "strtoul croaked on offset"); - } else if (!strcasecmp(name, "fill")) { - j = strtoul(sbuf_data(sc->sbuf), NULL, 16); - memset(sc->sp->data, j, sc->sectorsize); - } else if (!strcasecmp(name, "hexdata")) { - q = sc->sp->data; - p = sbuf_data(sc->sbuf); - for (i = 0; i < sc->sectorsize; i++) { - if (!isxdigit(*p)) - errx(1, "I croaked on hexdata %d:(%02x)", i, *p); - if (isdigit(*p)) - j = (*p - '0') << 4; - else - j = (tolower(*p) - 'a' + 10) << 4; - p++; - if (!isxdigit(*p)) - errx(1, "I croaked on hexdata %d:(%02x)", i, *p); - if (isdigit(*p)) - j |= *p - '0'; - else - j |= tolower(*p) - 'a' + 10; - p++; - *q++ = j; - } - } else if (!strcasecmp(name, "sector")) { - g_simdisk_insertsector(sc, sc->sp); - sc->sp = NULL; - } else if (!strcasecmp(name, "diskimage")) { - } else if (!strcasecmp(name, "FreeBSD")) { - } else { - printf("<%s>[[%s]]\n", name, sbuf_data(sc->sbuf)); - } - sbuf_clear(sc->sbuf); -} - -static void -characterData(void *userData, const XML_Char *s, int len) -{ - const char *b, *e; - struct simdisk_softc *sc; - - sc = userData; - b = s; - e = s + len - 1; - while (isspace(*b) && b < e) - b++; - while (isspace(*e) && e > b) - e--; - if (e != b || !isspace(*b)) - sbuf_bcat(sc->sbuf, b, e - b + 1); -} - -struct g_geom * -g_simdisk_xml_load(const char *name, const char *file) -{ - XML_Parser parser = XML_ParserCreate(NULL); - struct stat st; - char *p; - struct simdisk_softc *sc; - int fd, i; - - sc = calloc(1, sizeof *sc); - sc->fd = -1; - sc->sbuf = sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND); - sc->mediasize = 1024 * 1024 * 1024 * (off_t)1024; - LIST_INIT(&sc->sectors); - TAILQ_INIT(&sc->sort); - XML_SetUserData(parser, sc); - XML_SetElementHandler(parser, startElement, endElement); - XML_SetCharacterDataHandler(parser, characterData); - - fd = open(file, O_RDONLY); - if (fd < 0) - err(1, file); - fstat(fd, &st); - p = mmap(NULL, st.st_size, PROT_READ, MAP_NOCORE|MAP_PRIVATE, fd, 0); - i = XML_Parse(parser, p, st.st_size, 1); - if (i != 1) - errx(1, "XML_Parse complains: return %d", i); - munmap(p, st.st_size); - close(fd); - XML_ParserFree(parser); - return (g_simdisk_create(name, sc)); -} -- cgit v1.1