• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1LTP User Guidelines
2===================
3
4For compiling, installing and running the tests see `README.md`.
5For running LTP network tests see `testcases/network/README.md`.
6
71. Library environment variables
8--------------------------------
9
10|==============================================================================
11| 'KCONFIG_PATH'        | The path to the kernel config file, (if not set, it tries
12                          the usual paths '/boot/config-RELEASE' or '/proc/config.gz').
13| 'KCONFIG_SKIP_CHECK'  | Skip kernel config check if variable set (not set by default).
14| 'LTPROOT'             | Prefix for installed LTP.  **Should be always set**
15                          as some tests need it for path to test data files
16                          ('LTP_DATAROOT'). LTP is by default installed into '/opt/ltp'.
17| 'LTP_COLORIZE_OUTPUT' | By default LTP colorizes it's output unless it's redirected
18                          to a pipe or file.  Force colorized output behaviour:
19                          'y' or '1': always colorize, 'n' or '0': never colorize.
20| 'LTP_DEV'             | Path to the block device to be used
21                          (C: '.needs_device = 1', shell: 'TST_NEEDS_DEVICE=1').
22| 'LTP_SINGLE_FS_TYPE'  | Testing only - specifies filesystem instead all
23                          supported (for tests with '.all_filesystems').
24| 'LTP_DEV_FS_TYPE'     | Filesystem used for testing (default: 'ext2').
25| 'LTP_TIMEOUT_MUL'     | Multiplies timeout, must be number >= 0.1 (> 1 is useful for
26                          slow machines to avoid unexpected timeout).
27                          Variable is also used in shell tests, but ceiled to int.
28| 'LTP_RUNTIME_MUL'     | Multiplies maximal test iteration runtime. Tests
29                          that run for more than a second or two are capped on
30                          runtime. You can scale the default runtime both up
31                          and down with this multiplier. NOTE: Not yet implemented
32                          in shell API.
33| 'LTP_VIRT_OVERRIDE'   | Overrides virtual machine detection in the test
34                          library. Setting it to empty string tell the library
35                          that system is not a virtual machine. Other possible
36                          values are 'kvm', 'xen', 'zvm' and 'microsoft' that
37                          describe different types supervisors.
38| 'PATH'                | It's required to addjust path:
39                          `PATH="$PATH:$LTPROOT/testcases/bin"`
40| 'TMPDIR'              | Base directory for template directory (C: '.needs_tmpdir = 1'
41                          and others, which imply it, shell: 'TST_NEEDS_TMPDIR=1').
42                          Must be an absolute path (default: '/tmp').
43| 'TST_NO_CLEANUP'      | Disable running test cleanup (defined in 'TST_CLEANUP').
44|==============================================================================
45
46
472. Test execution time and timeout
48----------------------------------
49
50The limit on how long a test can run does compose of two parts max_runtime and
51timeout. The limit does apply to a single test variant, that means for example
52that tests that run for all available filesystems will apply this limit for a
53single filesystem only.
54
55The max_runtime is a cap on how long the run() function can take, for most
56testcases this part is set to zero. For tests that do run for more than a
57second or two the max_runtime has to be defined and the run() function has to
58check actively how much runtime is left.
59
60Test runtime can be scaled up and down with 'LTP_RUNTIME_MUL' environment
61variable or set on a commandline by the '-I' parameter. Hoewever be vary that
62setting the runtime too low will cause long running tests to exit prematurely
63possibly before the have a chance actually test anyting.
64
65The timeout part is a limit for the test setup and cleanup and also safety
66margin for the runtime accounting. It's currently set to 30 seconds but may
67change later. If your target machine is too slow it can be scaled up with the
68'LTP_TIMEOUT_MUL' environment variable.
69