summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/regression/geom/ConfCmp/ConfCmp.c12
-rw-r--r--tools/regression/geom/ConfCmp/Makefile7
-rw-r--r--tools/regression/geom/GLib/Makefile2
-rw-r--r--tools/regression/geom/Test/Makefile.inc2
4 files changed, 21 insertions, 2 deletions
diff --git a/tools/regression/geom/ConfCmp/ConfCmp.c b/tools/regression/geom/ConfCmp/ConfCmp.c
index 9dc86d9..e224db9 100644
--- a/tools/regression/geom/ConfCmp/ConfCmp.c
+++ b/tools/regression/geom/ConfCmp/ConfCmp.c
@@ -61,6 +61,7 @@ struct mytree {
struct node *top;
struct node *cur;
int indent;
+ int ignore;
};
struct ref {
@@ -99,6 +100,11 @@ StartElement(void *userData, const char *name, const char **atts __unused)
struct node *np;
mt = userData;
+ if (!strcmp(name, "FreeBSD")) {
+ mt->ignore = 1;
+ return;
+ }
+ mt->ignore = 0;
mt->indent += 2;
np = new_node();
np->name = strdup(name);
@@ -116,6 +122,8 @@ EndElement(void *userData, const char *name __unused)
struct node *np;
mt = userData;
+ if (mt->ignore)
+ return;
mt->indent -= 2;
sbuf_finish(mt->cur->cont);
@@ -136,6 +144,8 @@ CharData(void *userData , const XML_Char *s , int len)
const char *b, *e;
mt = userData;
+ if (mt->ignore)
+ return;
b = s;
e = s + len - 1;
while (isspace(*b) && b < e)
@@ -173,6 +183,8 @@ dofile(char *filename)
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 complained -> %d", i);
munmap(p, st.st_size);
close(fd);
XML_ParserFree(parser);
diff --git a/tools/regression/geom/ConfCmp/Makefile b/tools/regression/geom/ConfCmp/Makefile
index 3ddb9c2..90c4046 100644
--- a/tools/regression/geom/ConfCmp/Makefile
+++ b/tools/regression/geom/ConfCmp/Makefile
@@ -25,3 +25,10 @@ test: ${PROG}
if ./${PROG} a1.conf a1b.conf > /dev/null 2>&1 ; then exit 1 ; fi
if ./${PROG} a1.conf a1c.conf > /dev/null 2>&1 ; then exit 1 ; fi
if ./${PROG} a1.conf a1d.conf > /dev/null 2>&1 ; then exit 1 ; fi
+
+ttest: ${PROG}
+ rm -f _* *.core
+ ./${PROG} a1.conf a1a.conf
+ ./${PROG} a1.conf a1b.conf
+ ./${PROG} a1.conf a1c.conf
+ ./${PROG} a1.conf a1d.conf
diff --git a/tools/regression/geom/GLib/Makefile b/tools/regression/geom/GLib/Makefile
index 177dd5f..985e82b 100644
--- a/tools/regression/geom/GLib/Makefile
+++ b/tools/regression/geom/GLib/Makefile
@@ -9,7 +9,7 @@ SRCS= geom.c geom_bsd.c geom_simdev.c geom_dump.c geom_event.c geom_io.c \
CFLAGS+= -g -static -W -Wall
CFLAGS+= -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
-CFLAGS += -I/usr/local/include/xml -I/usr/src/sys
+CFLAGS += -I/usr/local/include/xml -I/usr/src/sys -I..
NOPIC = static
NOPROFILE = bingo
NOOBJ = youbet
diff --git a/tools/regression/geom/Test/Makefile.inc b/tools/regression/geom/Test/Makefile.inc
index 452efc5..8d1caba 100644
--- a/tools/regression/geom/Test/Makefile.inc
+++ b/tools/regression/geom/Test/Makefile.inc
@@ -4,7 +4,7 @@ PROG = testprg
NOMAN = no
NOOBJ = youbet
CFLAGS += -g -W -Wall -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Wpointer-arith -static -I/usr/src/sys
+CFLAGS += -Wpointer-arith -static -I/usr/src/sys -I../..
LDADD += -L../../GLib -lG
LDADD += -L/usr/local/lib -lexpat
DPADD += ../../GLib/libG.a
OpenPOWER on IntegriCloud