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