From bbd6f8d1ffbdc0e2ac4ee33b9ee2e87396fb2b59 Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 31 Jan 2003 18:31:48 +0000 Subject: Add Apple partitioning test case. Use correct name for image data file --- tools/regression/geom/Data/disk.apple.xml | 93 +++++++++++++++++++++++ tools/regression/geom/GLib/Makefile | 3 +- tools/regression/geom/Test/Makefile | 2 +- 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_sim.h | 1 + 7 files changed, 287 insertions(+), 2 deletions(-) create mode 100644 tools/regression/geom/Data/disk.apple.xml create mode 100644 tools/regression/geom/Test/T015/Makefile create mode 100644 tools/regression/geom/Test/T015/ref.conf create mode 100644 tools/regression/geom/Test/T015/testprg.c (limited to 'tools/regression/geom') diff --git a/tools/regression/geom/Data/disk.apple.xml b/tools/regression/geom/Data/disk.apple.xml new file mode 100644 index 0000000..ecdd523 --- /dev/null +++ b/tools/regression/geom/Data/disk.apple.xml @@ -0,0 +1,93 @@ + + + $FreeBSD$ + 512 + 366530560 + 0 + 0 + 0 + + 0 + + 45520200000aec68000100010000000000010000004000120001000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + + 512 + + 504d00000000000300000060000aec084d61634f530000000000000000000000 + 000000000000000000000000000000004170706c655f48465300000000000000 + 0000000000000000000000000000000000000000000aec08000000b700000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + + 1024 + + 504d000000000003000000010000003f4170706c650000000000000000000000 + 000000000000000000000000000000004170706c655f706172746974696f6e5f + 6d617000000000000000000000000000000000000000003f0000003700000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + + 1536 + + 504d00000000000300000040000000204d6163696e746f736800000000000000 + 000000000000000000000000000000004170706c655f44726976657234330000 + 0000000000000000000000000000000000000000000000200000007f00000000 + 000023ee0000000000000000000000000000000000007c083638303030000000 + 0000000000000000000106000000000000000001000700000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + diff --git a/tools/regression/geom/GLib/Makefile b/tools/regression/geom/GLib/Makefile index 121ff6a..344f88a 100644 --- a/tools/regression/geom/GLib/Makefile +++ b/tools/regression/geom/GLib/Makefile @@ -1,7 +1,8 @@ # $FreeBSD$ LIB= G -SRCS= geom.c geom_aes.c geom_bsd.c geom_simdev.c geom_dump.c \ +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 \ diff --git a/tools/regression/geom/Test/Makefile b/tools/regression/geom/Test/Makefile index ebceb87..0ba78f0 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+= T011 T012 T013 T014 +SUBDIR+= T011 T012 T013 T014 T015 # SUBDIR+= T999 diff --git a/tools/regression/geom/Test/T015/Makefile b/tools/regression/geom/Test/T015/Makefile new file mode 100644 index 0000000..18fd955 --- /dev/null +++ b/tools/regression/geom/Test/T015/Makefile @@ -0,0 +1,2 @@ +# $FreeBSD$ +.include diff --git a/tools/regression/geom/Test/T015/ref.conf b/tools/regression/geom/Test/T015/ref.conf new file mode 100644 index 0000000..5775799 --- /dev/null +++ b/tools/regression/geom/Test/T015/ref.conf @@ -0,0 +1,121 @@ + + $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 new file mode 100644 index 0000000..cd7f4b8 --- /dev/null +++ b/tools/regression/geom/Test/T015/testprg.c @@ -0,0 +1,67 @@ +/*- + * 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_sim.h b/tools/regression/geom/geom_sim.h index 175c8d7..a28d7e7 100644 --- a/tools/regression/geom/geom_sim.h +++ b/tools/regression/geom/geom_sim.h @@ -154,6 +154,7 @@ void name##_init(void); \ } 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); -- cgit v1.1