5 #define RESULT_TIMEOUT 0x01
6 #define RESULT_SIGNALLED 0x02
7 #define RESULT_NOTRUN 0x03
8 #define RESULT_FAIL 0x04
9 #define RESULT_PASS 0x05
10 #define RESULT_UNKNOWN 0x06
11 #define RESULT_PREFAIL 0x07
12 #define RESULT_POSTFAIL 0x08
13 #define RESULT_BUILDFAIL 0x09
16 A testcase can be considered not run when the result is any of the following:
17 RESULT_BUILDFAIL, RESULT_PREFAIL, RESULT_NOTRUN, RESULT_UNKNOWN
19 A testcase can be considered run when the result is any of the following:
20 RESULT_TIMEOUT, RESULT_SIGNALLED, RESULT_FAIL, RESULT_PASS, RESULT_POSTFAIL
26 Execution of a single test case:
28 1) chdir to testcase directory
29 - if it fails, set RESULT_PREFAIL (sysbuf is of interest), goto (6)
31 2) build testcase (make) (unless nobuild flag is set).
32 + build_buf is used for stdout/stderr
33 - if there is an internal driver error (that leads to not running the
34 build command), set RESULT_PREFAIL (sysbuf is of interest), goto (6)
35 - if the build command has a non-zero exit value, set the result to
36 BUILDFAIL, unless it's a buildonly test case, in which it is set to
37 the actual result value (TIMEOUT, SIGNALLED, FAIL)
40 3) run 'pre' command if intpre or pre is set.
41 + precmd_buf is used for stdout/stderr
42 - if there is an internal driver error (that leads to not running the
43 command), set RESULT_PREFAIL (sysbuf is of interest), goto (6)
44 - if the pre command has a non-zero exit value, set RESULT_PREFAIL and
47 4) run actual testcase, depending on type
48 + stdout_buf is used for stdout
49 + stderr_buf is used for stderr
50 - for BUILDONLY: set RESULT_PASS since the build already succeeded
51 - for userland and kernel: run the testcase, possibly as a different
52 user (depending on the runas option), set the result to the actual
53 result value (TIMEOUT, SIGNALLED, FAIL, NOTRUN)
54 - if there is an internal driver error (that leads to not running the
55 command), RESULT_NOTRUN is set (sysbuf is of interest)
57 5) run 'post' command if intpost or post is set.
58 + postcmd_buf is used for stdout/stderr
59 - if there is an internal driver error (that leads to not running the
60 command), set RESULT_POSTFAIL (sysbuf is of interest), goto (6)
61 - if the post command has a non-zero exit value, set RESULT_POSTFAIL
64 6) clean testcase directory (make clean) (unless nobuild flag is set).
65 + cleanup_buf is used for stdout/stderr and system (driver error) buffer
75 - read config defaults from file, not statically coded into config.c
76 - add collected rusage into output dictionary