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