Add a test, POSTPONED_ORPHAN, that should fail (although it currently

does not).  Rework the Makefile magic to have failing and succeeding tests.

POSTPONED_ORPHAN is an example of a configuration where the user starts
negating an instance, and then adding an instance of a child of the negated
one.  The latter should be found as an erroneous orphan, as the parent was
negated beforewards.
This commit is contained in:
cube 2005-10-04 13:44:23 +00:00
parent 47161e3118
commit b31e2ad635
2 changed files with 43 additions and 4 deletions

View File

@ -1,9 +1,14 @@
# $NetBSD: Makefile,v 1.1 2005/10/02 21:27:02 cube Exp $
# $NetBSD: Makefile,v 1.2 2005/10/04 13:44:23 cube Exp $
# Those configurations only have to be understood by config(1) without
# errors.
SIMPLE= SHADOW_INSTANCE
SIMPLE_SUCCESS= SHADOW_INSTANCE
SIMPLE_FAILURE= POSTPONED_ORPHAN
SIMPLE= ${SIMPLE_SUCCESS} ${SIMPLE_FAILURE}
CONFIG_OPTS.POSTPONED_ORPHAN= -v
.include <bsd.obj.mk>
@ -22,10 +27,23 @@ clean: ${__conf__}-clean
.endfor
.for __conf__ in ${SIMPLE}
.if !empty(SIMPLE_SUCCESS:M${__conf__})
CONFIG_TEST.${__conf__}= && echo "Test passed."
.else
CONFIG_TEST.${__conf__}= || echo "Test passed."
.endif
CONFIG_LINE.${__conf__}= ${TOOL_CONFIG} ${CONFIG_OPTS.${__conf__}} \
-s ${.CURDIR}/support \
-b ./compile/${__conf__} ${.CURDIR}/${__conf__} \
${CONFIG_TEST.${__conf__}}
.PHONY: ${__conf__}-regress ${__conf__}-clean
${__conf__}-regress:
@mkdir compile/${__conf__}
${TOOL_CONFIG} -s ${.CURDIR}/support -b ./compile/${__conf__} ${.CURDIR}/${__conf__}
@mkdir -p compile/${__conf__}
${CONFIG_LINE.${__conf__}}
${__conf__}-clean:
@if [ -d compile/${__conf__} ]; then rm -Rf compile/${__conf__}; fi

View File

@ -0,0 +1,21 @@
include "arch/regress/conf/std.regress"
maxusers 4
file-system REGRESSFS
master0 at root
parenti* at master?
# Here, parenti is negated before the child* instance is declared. That
# means the child* instance does not qualify as an explicit orphan and
# therefore should _not_ be ignored.
#
# config(1) should error out on that config file.
no parenti
child* at parenti?
config regress root on ?