Home | History | Annotate | Line # | Download | only in regress
README revision 1.2
      1 $NetBSD: README,v 1.2 2009/09/14 17:15:32 apb Exp $
      2 
      3 NOTE: New tests should use the ATF framework; see atf(7)
      4 and the src/tests directory.
      5 
      6 ------------------------------------------------------------------------
      7 This part of the source tree contains regression tests. There are special
      8 make targets and rules to follow. Most of these, however, are currently not
      9 enforced, and most tests available are not conforming.
     10 
     11 We hope to fix this someday. If you add new tests, please try to be conforming.
     12 
     13 What is a regression test?
     14 
     15   A regression test is run by a makefile in a test directory (see below).
     16   Each makefile may run multiple tests.
     17 
     18 What is a test directory?
     19 
     20   A directory in this part of the tree is a regression test directory. It
     21   contains a Makefile which implements the additional "regress" target,
     22   and runs all it's regression tests during this target.
     23 
     24 May the make progress be stopped on failures?
     25 
     26   No, the "make regress" target should succeed, unless some regression 
     27   binaries could not be build, disk is full or other catastrophic failures
     28   outside of the tested subsystem happen. A failing regression test should
     29   log the failure (see below), but not make the target itself fail.
     30 
     31 What are the possible results of a regression test?
     32 
     33   A test may either
     34 
     35   - succeed, in which case it logs "PASSED" (see below for logging details)
     36   - fail, in which case it logs "FAILED"
     37   - not be able to run, in which case it logs "SKIPPED" and the reason
     38     for the skip in the comment field (see below)
     39 
     40   Typical reasons for tests to not being run are missing kernel options,
     41   or missing privileges (test needs root, "make regress" is invoked by
     42   mere mortal or vice versa). A test may not fail because of such
     43   environmental issues, it must detect and properly log the problem.
     44 
     45   If a test directory contains tests that may be skipped, it should have
     46   a README file explaining the prerequisites (e.g. needed kernel options)
     47 
     48   In future, we will mark affected makefiles and optimize run/skipped test
     49   during repeated runs with differing privileges - but currently there is no
     50   make framework in place to handle this.
     51 
     52 How and when does a test log results?
     53 
     54   If the make/environment variable ${REGRESS_LOG} is defined, the final
     55   results (and only those) should be logged to the file named by that
     56   variable. We will, in the future, add make targets for this purpose.
     57   The log format is line oriented, one line used per test. Each line
     58   consists of the directory where the Makefile lives, followed by the
     59   test name and the result (see above: PASSED, FAILED, SKIPPED).
     60   Following this an optional comment may be added. For SKIPPED tests the
     61   comment is not optional. Fields are separated by spaces.
     62