mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Add testcase #14: PC98 label.
This commit is contained in:
parent
153ce220d6
commit
1cd429e807
6 changed files with 315 additions and 2 deletions
|
|
@ -4,7 +4,7 @@ LIB= G
|
|||
SRCS= geom.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_sunlabel.c geom_pc98.c
|
||||
|
||||
|
||||
CFLAGS+= -g -static -W -Wall
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# $FreeBSD$
|
||||
|
||||
SUBDIR+= T000 T001 T002 T003 T004 T005 T006 T007 T008 T009
|
||||
SUBDIR+= T010 T011 T012 T013
|
||||
SUBDIR+= T010 T011 T012 T013 T014
|
||||
|
||||
# SUBDIR+= T999
|
||||
|
||||
|
|
|
|||
3
tools/regression/geom/Test/T014/Makefile
Normal file
3
tools/regression/geom/Test/T014/Makefile
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# $FreeBSD$
|
||||
.include "../Makefile.inc"
|
||||
.include <bsd.prog.mk>
|
||||
237
tools/regression/geom/Test/T014/ref.conf
Normal file
237
tools/regression/geom/Test/T014/ref.conf
Normal file
|
|
@ -0,0 +1,237 @@
|
|||
<mesh>
|
||||
<FreeBSD>$FreeBSD$</FreeBSD>
|
||||
<class>
|
||||
<ref>0x8072dc0</ref>
|
||||
<name>DEV-class</name>
|
||||
<geom>
|
||||
<ref>0x80bc900</ref>
|
||||
<class><ref>0x8072dc0</ref></class>
|
||||
<name>wd0s1f</name>
|
||||
<rank>4</rank>
|
||||
<consumer>
|
||||
<ref>0x80b84c0</ref>
|
||||
<geom><ref>0x80bc900</ref></geom>
|
||||
<provider><ref>0x80b8380</ref></provider>
|
||||
<mode>r0w0e0</mode>
|
||||
</consumer>
|
||||
</geom>
|
||||
<geom>
|
||||
<ref>0x80bc780</ref>
|
||||
<class><ref>0x8072dc0</ref></class>
|
||||
<name>wd0s1e</name>
|
||||
<rank>4</rank>
|
||||
<consumer>
|
||||
<ref>0x80b8480</ref>
|
||||
<geom><ref>0x80bc780</ref></geom>
|
||||
<provider><ref>0x80b8340</ref></provider>
|
||||
<mode>r0w0e0</mode>
|
||||
</consumer>
|
||||
</geom>
|
||||
<geom>
|
||||
<ref>0x80bc600</ref>
|
||||
<class><ref>0x8072dc0</ref></class>
|
||||
<name>wd0s1c</name>
|
||||
<rank>4</rank>
|
||||
<consumer>
|
||||
<ref>0x80b8440</ref>
|
||||
<geom><ref>0x80bc600</ref></geom>
|
||||
<provider><ref>0x80b8300</ref></provider>
|
||||
<mode>r0w0e0</mode>
|
||||
</consumer>
|
||||
</geom>
|
||||
<geom>
|
||||
<ref>0x80bc480</ref>
|
||||
<class><ref>0x8072dc0</ref></class>
|
||||
<name>wd0s1b</name>
|
||||
<rank>4</rank>
|
||||
<consumer>
|
||||
<ref>0x80b8400</ref>
|
||||
<geom><ref>0x80bc480</ref></geom>
|
||||
<provider><ref>0x80b82c0</ref></provider>
|
||||
<mode>r0w0e0</mode>
|
||||
</consumer>
|
||||
</geom>
|
||||
<geom>
|
||||
<ref>0x80bc400</ref>
|
||||
<class><ref>0x8072dc0</ref></class>
|
||||
<name>wd0s1a</name>
|
||||
<rank>4</rank>
|
||||
<consumer>
|
||||
<ref>0x80b83c0</ref>
|
||||
<geom><ref>0x80bc400</ref></geom>
|
||||
<provider><ref>0x80b8280</ref></provider>
|
||||
<mode>r0w0e0</mode>
|
||||
</consumer>
|
||||
</geom>
|
||||
<geom>
|
||||
<ref>0x80bc180</ref>
|
||||
<class><ref>0x8072dc0</ref></class>
|
||||
<name>wd0s1</name>
|
||||
<rank>3</rank>
|
||||
<consumer>
|
||||
<ref>0x80b8200</ref>
|
||||
<geom><ref>0x80bc180</ref></geom>
|
||||
<provider><ref>0x80b81c0</ref></provider>
|
||||
<mode>r0w0e0</mode>
|
||||
</consumer>
|
||||
</geom>
|
||||
<geom>
|
||||
<ref>0x80b80c0</ref>
|
||||
<class><ref>0x8072dc0</ref></class>
|
||||
<name>wd0</name>
|
||||
<rank>2</rank>
|
||||
<consumer>
|
||||
<ref>0x80b8100</ref>
|
||||
<geom><ref>0x80b80c0</ref></geom>
|
||||
<provider><ref>0x80b8080</ref></provider>
|
||||
<mode>r0w0e0</mode>
|
||||
</consumer>
|
||||
</geom>
|
||||
</class>
|
||||
<class>
|
||||
<ref>0x8072c00</ref>
|
||||
<name>PC98-class</name>
|
||||
<geom>
|
||||
<ref>0x80b8140</ref>
|
||||
<class><ref>0x8072c00</ref></class>
|
||||
<name>wd0</name>
|
||||
<rank>2</rank>
|
||||
<config>
|
||||
</config>
|
||||
<consumer>
|
||||
<ref>0x80b8180</ref>
|
||||
<geom><ref>0x80b8140</ref></geom>
|
||||
<provider><ref>0x80b8080</ref></provider>
|
||||
<mode>r0w0e0</mode>
|
||||
<config>
|
||||
</config>
|
||||
</consumer>
|
||||
<provider>
|
||||
<ref>0x80b81c0</ref>
|
||||
<geom><ref>0x80b8140</ref></geom>
|
||||
<mode>r0w0e0</mode>
|
||||
<name>wd0s1</name>
|
||||
<config>
|
||||
<index>0</index>
|
||||
<length>1626533888</length>
|
||||
<seclength>3176824</seclength>
|
||||
<offset>69632</offset>
|
||||
<secoffset>136</secoffset>
|
||||
</config>
|
||||
</provider>
|
||||
</geom>
|
||||
</class>
|
||||
<class>
|
||||
<ref>0x8072c40</ref>
|
||||
<name>SUNLABEL-class</name>
|
||||
</class>
|
||||
<class>
|
||||
<ref>0x8072d80</ref>
|
||||
<name>MBREXT-class</name>
|
||||
</class>
|
||||
<class>
|
||||
<ref>0x8072d40</ref>
|
||||
<name>MBR-class</name>
|
||||
</class>
|
||||
<class>
|
||||
<ref>0x8072e00</ref>
|
||||
<name>BSD-class</name>
|
||||
<geom>
|
||||
<ref>0x80bc200</ref>
|
||||
<class><ref>0x8072e00</ref></class>
|
||||
<name>wd0s1</name>
|
||||
<rank>3</rank>
|
||||
<config>
|
||||
</config>
|
||||
<consumer>
|
||||
<ref>0x80b8240</ref>
|
||||
<geom><ref>0x80bc200</ref></geom>
|
||||
<provider><ref>0x80b81c0</ref></provider>
|
||||
<mode>r0w0e0</mode>
|
||||
<config>
|
||||
</config>
|
||||
</consumer>
|
||||
<provider>
|
||||
<ref>0x80b8380</ref>
|
||||
<geom><ref>0x80bc200</ref></geom>
|
||||
<mode>r0w0e0</mode>
|
||||
<name>wd0s1f</name>
|
||||
<config>
|
||||
<index>5</index>
|
||||
<length>1390673920</length>
|
||||
<seclength>2716160</seclength>
|
||||
<offset>235929600</offset>
|
||||
<secoffset>460800</secoffset>
|
||||
</config>
|
||||
</provider>
|
||||
<provider>
|
||||
<ref>0x80b8340</ref>
|
||||
<geom><ref>0x80bc200</ref></geom>
|
||||
<mode>r0w0e0</mode>
|
||||
<name>wd0s1e</name>
|
||||
<config>
|
||||
<index>4</index>
|
||||
<length>52428800</length>
|
||||
<seclength>102400</seclength>
|
||||
<offset>183500800</offset>
|
||||
<secoffset>358400</secoffset>
|
||||
</config>
|
||||
</provider>
|
||||
<provider>
|
||||
<ref>0x80b8300</ref>
|
||||
<geom><ref>0x80bc200</ref></geom>
|
||||
<mode>r0w0e0</mode>
|
||||
<name>wd0s1c</name>
|
||||
<config>
|
||||
<index>2</index>
|
||||
<length>1626603520</length>
|
||||
<seclength>3176960</seclength>
|
||||
<offset>0</offset>
|
||||
<secoffset>0</secoffset>
|
||||
</config>
|
||||
</provider>
|
||||
<provider>
|
||||
<ref>0x80b82c0</ref>
|
||||
<geom><ref>0x80bc200</ref></geom>
|
||||
<mode>r0w0e0</mode>
|
||||
<name>wd0s1b</name>
|
||||
<config>
|
||||
<index>1</index>
|
||||
<length>104857600</length>
|
||||
<seclength>204800</seclength>
|
||||
<offset>78643200</offset>
|
||||
<secoffset>153600</secoffset>
|
||||
</config>
|
||||
</provider>
|
||||
<provider>
|
||||
<ref>0x80b8280</ref>
|
||||
<geom><ref>0x80bc200</ref></geom>
|
||||
<mode>r0w0e0</mode>
|
||||
<name>wd0s1a</name>
|
||||
<config>
|
||||
<index>0</index>
|
||||
<length>78643200</length>
|
||||
<seclength>153600</seclength>
|
||||
<offset>0</offset>
|
||||
<secoffset>0</secoffset>
|
||||
</config>
|
||||
</provider>
|
||||
</geom>
|
||||
</class>
|
||||
<class>
|
||||
<ref>0x8072c80</ref>
|
||||
<name>SIMDISK-class</name>
|
||||
<geom>
|
||||
<ref>0x80b8040</ref>
|
||||
<class><ref>0x8072c80</ref></class>
|
||||
<name>wd0</name>
|
||||
<rank>1</rank>
|
||||
<provider>
|
||||
<ref>0x80b8080</ref>
|
||||
<geom><ref>0x80b8040</ref></geom>
|
||||
<mode>r0w0e0</mode>
|
||||
<name>wd0</name>
|
||||
</provider>
|
||||
</geom>
|
||||
</class>
|
||||
</mesh>
|
||||
72
tools/regression/geom/Test/T014/testprg.c
Normal file
72
tools/regression/geom/Test/T014/testprg.c
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
/*-
|
||||
* Copyright (c) 2002 Poul-Henning Kamp
|
||||
* Copyright (c) 2002 Networks Associates Technology, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software was developed for the FreeBSD Project by Poul-Henning Kamp
|
||||
* and NAI Labs, the Security Research Division of Network Associates, Inc.
|
||||
* under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
|
||||
* DARPA CHATS research program.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The names of the authors may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
#include <err.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/sbuf.h>
|
||||
#include <geom/geom.h>
|
||||
|
||||
int
|
||||
thread_sim(void *ptr __unused)
|
||||
{
|
||||
|
||||
rattle();
|
||||
g_simdisk_init();
|
||||
g_bsd_init();
|
||||
g_mbr_init();
|
||||
g_mbrext_init();
|
||||
g_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);
|
||||
}
|
||||
|
||||
|
|
@ -133,6 +133,7 @@ void g_simdisk_restart(char *name);
|
|||
g_add_class(&class); \
|
||||
}
|
||||
|
||||
void g_pc98_init(void);
|
||||
void g_sunlabel_init(void);
|
||||
void g_bsd_init(void);
|
||||
void g_mbr_init(void);
|
||||
|
|
|
|||
Loading…
Reference in a new issue