Add a regression test framework for config(1).

The first test, SHADOW_INSTANCE, includes an example of a shadowed
instance:  'child' only attaches to attribute hook, therefore the instance
'child* at parentii?' is shadowed by 'child* at hook?'.

However, that configuration file is still valid, and therefore must be
accepted.
This commit is contained in:
cube 2005-10-02 21:27:02 +00:00
parent 2fb411a123
commit 8745ad50f1
6 changed files with 105 additions and 0 deletions

View File

@ -0,0 +1,32 @@
# $NetBSD: Makefile,v 1.1 2005/10/02 21:27:02 cube Exp $
# Those configurations only have to be understood by config(1) without
# errors.
SIMPLE= SHADOW_INSTANCE
.include <bsd.obj.mk>
.PHONY: regress clean cleandir
regress: compile
cleandir: clean
clean:
@if [ -e compile ]; then rmdir compile; fi
compile:
@mkdir compile
.for __conf__ in ${SIMPLE}
regress: ${__conf__}-regress
clean: ${__conf__}-clean
.endfor
.for __conf__ in ${SIMPLE}
.PHONY: ${__conf__}-regress ${__conf__}-clean
${__conf__}-regress:
@mkdir compile/${__conf__}
${TOOL_CONFIG} -s ${.CURDIR}/support -b ./compile/${__conf__} ${.CURDIR}/${__conf__}
${__conf__}-clean:
@if [ -d compile/${__conf__} ]; then rm -Rf compile/${__conf__}; fi
.endfor

View File

@ -0,0 +1,15 @@
include "arch/regress/conf/std.regress"
maxusers 4
file-system REGRESSFS
master0 at root
parenti* at master?
parentii* at master?
child* at hook?
child* at parentii?
config regress root on ?

View File

@ -0,0 +1,41 @@
=== INCLUDES BEGIN ===
%INCLUDES
=== INCLUDES END ===
=== OBJS BEGIN ===
%OBJS
=== OBJS END ===
=== CFILES BEGIN ===
%CFILES
=== CFILES END ===
=== SFILES BEGIN ===
%SFILES
=== SFILES END ===
=== LOAD BEGIN ===
%LOAD
=== LOAD END ===
=== RULES BEGIN ===
%RULES
=== RULES END ===
=== MAKEOPTIONSAPPEND BEGIN ===
%MAKEOPTIONSAPPEND
=== MAKEOPTIONSAPPEND END ===

View File

@ -0,0 +1,2 @@
maxpartitions 8
maxusers 2 4 8

View File

@ -0,0 +1 @@
machine regress

View File

@ -0,0 +1,14 @@
deffs REGRESSFS
device master { }
attach master at root
define hook { }
device parentii: hook
attach parentii at master
device parenti: hook
attach parenti at master
device child
attach child at hook