README revision 1.1
11.1Smartin$NetBSD: README,v 1.1 2006/03/14 09:46:34 martin Exp $
21.1Smartin
31.1SmartinThis part of the source tree contains regression tests. There are special
41.1Smartinmake targets and rules to follow. Most of these, however, are currently not
51.1Smartinenforced, and most tests available are not conforming.
61.1Smartin
71.1SmartinWe hope to fix this someday. If you add new tests, please try to be conforming.
81.1Smartin
91.1SmartinWhat is a regression test?
101.1Smartin
111.1Smartin  A regression test is run by a makefile in a test directory (see below).
121.1Smartin  Each makefile may run multiple tests.
131.1Smartin
141.1SmartinWhat is a test directory?
151.1Smartin
161.1Smartin  A directory in this part of the tree is a regression test directory. It
171.1Smartin  contains a Makefile which implements the additional "regress" target,
181.1Smartin  and runs all it's regression tests during this target.
191.1Smartin
201.1SmartinMay the make progress be stopped on failures?
211.1Smartin
221.1Smartin  No, the "make regress" target should succeed, unless some regression 
231.1Smartin  binaries could not be build, disk is full or other catastrophic failures
241.1Smartin  outside of the tested subsystem happen. A failing regression test should
251.1Smartin  log the failure (see below), but not make the target itself fail.
261.1Smartin
271.1SmartinWhat are the possible results of a regression test?
281.1Smartin
291.1Smartin  A test may either
301.1Smartin
311.1Smartin  - succeed, in which case it logs "PASSED" (see below for logging details)
321.1Smartin  - fail, in which case it logs "FAILED"
331.1Smartin  - not be able to run, in which case it logs "SKIPPED" and the reason
341.1Smartin    for the skip in the comment field (see below)
351.1Smartin
361.1Smartin  Typical reasons for tests to not being run are missing kernel options,
371.1Smartin  or missing privileges (test needs root, "make regress" is invoked by
381.1Smartin  mere mortal or vice versa). A test may not fail because of such
391.1Smartin  environmental issues, it must detect and properly log the problem.
401.1Smartin
411.1Smartin  If a test directory contains tests that may be skipped, it should have
421.1Smartin  a README file explaining the prerequisites (e.g. needed kernel options)
431.1Smartin
441.1Smartin  In future, we will mark affected makefiles and optimize run/skipped test
451.1Smartin  during repeated runs with differing privileges - but currently there is no
461.1Smartin  make framework in place to handle this.
471.1Smartin
481.1SmartinHow and when does a test log results?
491.1Smartin
501.1Smartin  If the make/environment variable ${REGRESS_LOG} is defined, the final
511.1Smartin  results (and only those) should be logged to the file named by that
521.1Smartin  variable. We will, in the future, add make targets for this purpose.
531.1Smartin  The log format is line oriented, one line used per test. Each line
541.1Smartin  consists of the directory where the Makefile lives, followed by the
551.1Smartin  test name and the result (see above: PASSED, FAILED, SKIPPED).
561.1Smartin  Following this an optional comment may be added. For SKIPPED tests the
571.1Smartin  comment is not optional. Fields are separated by spaces.
58