1====== 2Result values: 3====== 4 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 14 15 16A testcase can be considered not run when the result is any of the following: 17RESULT_BUILDFAIL, RESULT_PREFAIL, RESULT_NOTRUN, RESULT_UNKNOWN 18 19A testcase can be considered run when the result is any of the following: 20RESULT_TIMEOUT, RESULT_SIGNALLED, RESULT_FAIL, RESULT_PASS, RESULT_POSTFAIL 21 22 23 24 25====== 26Execution of a single test case: 27====== 281) chdir to testcase directory 29 - if it fails, set RESULT_PREFAIL (sysbuf is of interest), goto (6) 30 312) 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) 38 goto (6) 39 403) 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 45 goto (6) 46 474) 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) 56 575) 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 62 and goto (6) 63 646) clean testcase directory (make clean) (unless nobuild flag is set). 65 + cleanup_buf is used for stdout/stderr and system (driver error) buffer 66 - no further action. 67 687) results are saved. 69 70 71 72====== 73TODO 74====== 75 - read config defaults from file, not statically coded into config.c 76 - add collected rusage into output dictionary 77