From 19520dd5a573d8e4709dcf1c615a26db622a57a2 Mon Sep 17 00:00:00 2001 From: phk Date: Thu, 28 Mar 2002 21:42:38 +0000 Subject: Add testcase #14: PC98 label. --- tools/regression/geom/GLib/Makefile | 2 +- tools/regression/geom/Test/Makefile | 2 +- tools/regression/geom/Test/T014/Makefile | 3 + tools/regression/geom/Test/T014/ref.conf | 237 ++++++++++++++++++++++++++++++ tools/regression/geom/Test/T014/testprg.c | 72 +++++++++ tools/regression/geom/geom_sim.h | 1 + 6 files changed, 315 insertions(+), 2 deletions(-) create mode 100644 tools/regression/geom/Test/T014/Makefile create mode 100644 tools/regression/geom/Test/T014/ref.conf create mode 100644 tools/regression/geom/Test/T014/testprg.c (limited to 'tools') diff --git a/tools/regression/geom/GLib/Makefile b/tools/regression/geom/GLib/Makefile index 56d2815..0ea6b9a 100644 --- a/tools/regression/geom/GLib/Makefile +++ b/tools/regression/geom/GLib/Makefile @@ -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 diff --git a/tools/regression/geom/Test/Makefile b/tools/regression/geom/Test/Makefile index 02d28ba..e37b5c9 100644 --- a/tools/regression/geom/Test/Makefile +++ b/tools/regression/geom/Test/Makefile @@ -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 diff --git a/tools/regression/geom/Test/T014/Makefile b/tools/regression/geom/Test/T014/Makefile new file mode 100644 index 0000000..e944636 --- /dev/null +++ b/tools/regression/geom/Test/T014/Makefile @@ -0,0 +1,3 @@ +# $FreeBSD$ +.include "../Makefile.inc" +.include diff --git a/tools/regression/geom/Test/T014/ref.conf b/tools/regression/geom/Test/T014/ref.conf new file mode 100644 index 0000000..4d4040c --- /dev/null +++ b/tools/regression/geom/Test/T014/ref.conf @@ -0,0 +1,237 @@ + + $FreeBSD$ + + 0x8072dc0 + DEV-class + + 0x80bc900 + 0x8072dc0 + wd0s1f + 4 + + 0x80b84c0 + 0x80bc900 + 0x80b8380 + r0w0e0 + + + + 0x80bc780 + 0x8072dc0 + wd0s1e + 4 + + 0x80b8480 + 0x80bc780 + 0x80b8340 + r0w0e0 + + + + 0x80bc600 + 0x8072dc0 + wd0s1c + 4 + + 0x80b8440 + 0x80bc600 + 0x80b8300 + r0w0e0 + + + + 0x80bc480 + 0x8072dc0 + wd0s1b + 4 + + 0x80b8400 + 0x80bc480 + 0x80b82c0 + r0w0e0 + + + + 0x80bc400 + 0x8072dc0 + wd0s1a + 4 + + 0x80b83c0 + 0x80bc400 + 0x80b8280 + r0w0e0 + + + + 0x80bc180 + 0x8072dc0 + wd0s1 + 3 + + 0x80b8200 + 0x80bc180 + 0x80b81c0 + r0w0e0 + + + + 0x80b80c0 + 0x8072dc0 + wd0 + 2 + + 0x80b8100 + 0x80b80c0 + 0x80b8080 + r0w0e0 + + + + + 0x8072c00 + PC98-class + + 0x80b8140 + 0x8072c00 + wd0 + 2 + + + + 0x80b8180 + 0x80b8140 + 0x80b8080 + r0w0e0 + + + + + 0x80b81c0 + 0x80b8140 + r0w0e0 + wd0s1 + + 0 + 1626533888 + 3176824 + 69632 + 136 + + + + + + 0x8072c40 + SUNLABEL-class + + + 0x8072d80 + MBREXT-class + + + 0x8072d40 + MBR-class + + + 0x8072e00 + BSD-class + + 0x80bc200 + 0x8072e00 + wd0s1 + 3 + + + + 0x80b8240 + 0x80bc200 + 0x80b81c0 + r0w0e0 + + + + + 0x80b8380 + 0x80bc200 + r0w0e0 + wd0s1f + + 5 + 1390673920 + 2716160 + 235929600 + 460800 + + + + 0x80b8340 + 0x80bc200 + r0w0e0 + wd0s1e + + 4 + 52428800 + 102400 + 183500800 + 358400 + + + + 0x80b8300 + 0x80bc200 + r0w0e0 + wd0s1c + + 2 + 1626603520 + 3176960 + 0 + 0 + + + + 0x80b82c0 + 0x80bc200 + r0w0e0 + wd0s1b + + 1 + 104857600 + 204800 + 78643200 + 153600 + + + + 0x80b8280 + 0x80bc200 + r0w0e0 + wd0s1a + + 0 + 78643200 + 153600 + 0 + 0 + + + + + + 0x8072c80 + SIMDISK-class + + 0x80b8040 + 0x8072c80 + wd0 + 1 + + 0x80b8080 + 0x80b8040 + r0w0e0 + wd0 + + + + diff --git a/tools/regression/geom/Test/T014/testprg.c b/tools/regression/geom/Test/T014/testprg.c new file mode 100644 index 0000000..5eba6d4 --- /dev/null +++ b/tools/regression/geom/Test/T014/testprg.c @@ -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 +#include +#include +#include +#include +#include +#include +#include +#include +#include + +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); +} + diff --git a/tools/regression/geom/geom_sim.h b/tools/regression/geom/geom_sim.h index 0eafb1b..4350f1d 100644 --- a/tools/regression/geom/geom_sim.h +++ b/tools/regression/geom/geom_sim.h @@ -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); -- cgit v1.1