LTP Notes

Here are some miscellaneous notes about LTP

See http://ltp.sourceforge.net/documentation/how-to/ltp.php

For latest results, see:

Fuego LTP execution [edit section]

Sequence of events [edit section]

Sequence of events:

defining a new spec [edit section]

Variables - the following variables can be defined for an LTP test in a test spec:

Board variables:

List of specs [edit section]

'core' invocation lines [edit section]

Here are different invocation lines for these scripts and programs, in Fuego:

ltp_target_run.sh [edit section]

ltp_target_run.sh looks for the environment variables TESTS, PTSTESTS and RTTESTS, and executes each test in each list.

ltprun [edit section]

ltp_target_run.sh calls runltp as follows:

Note that OUTPUT_DIR is $(pwd)/result (usually $TEST_HOME/result).

This says to:

ltp-pan [edit section]

From $TEST_HOME/result/quickhit/output.log (the output from runltp), here is a sample ltp-pan invocation:

Let's break this out:

The ltp man page says the usage is:

NOTES: ltp-pan can run commands multiple times, or repeat commands. Fuego calls ltp-pan with the name of a scenario file (a group of tests with their command-line arguments). The scenario file comes from the 'runtests' directory.

ltp-pan keeps a list of the tests that are currently executing in a 'zoo' file. Each line in the zoo file has: pid, tag, cmdline

ltp-pan tries very hard to clean up after misbehaved tests. When it exits, there should be no residual processes or process groups running.

output logs [edit section]

Output is placed in the following files, on target (for regular tests):

output key [edit section]

Certain keywords are used in test program output: (copied from here)

'posix' invocation lines [edit section]

run-posix-option-group.sh [edit section]

Is invoked with the name of the posix option group, which is one of:

actual sub-tests are in $FUNCTIONAL_LTP_HOMEDIR/conformance/interfaces with a directory for each test sub-group.

run-posix-option-group.sh knows which test directories belong to which POSIX group, and runs the ones requested. Each test directory is passed into run_option_group_test().

The function run_option_group_tests() inside this script, appears to only process the first argument passed in.

Each directory has a run.sh file (there are 208 of them).

run.sh [edit section]

Each run script executes run-tests.sh with a list of specific tests in the current directory. The tests may be compiled programs or shell scripts. run.sh is executed with no arguments.

run-tests.sh [edit section]

Takes a list of tests, and does the following:

It uses $LOGFILE as the output log for an individual test (this is the stdout of the individual test program). If $LOGFILE is not defined, it uses "logfile" (in the current directory).

It uses $TIMEOUT_VAL as the timeout for an individual test. If not defined, a TIMEOUT_VAL of 300 seconds is used.

It uses the program $FUNCTIONAL_LTP_HOMEDIR/bin/t0 to run tests with a timeout. This program uses t0.val to indicate the return code for a test that timed out.

TIMEOUT_RET is the return code of t0 when a program timed out (that is, it overran it's timeout).

If there is a file named ${testname}.args, then the contents of that file are used as arguments to the program at runtime.

If there is a file named test_defs, then that file is sourced before the tests are run.

It outputs on standard out the counts of PASS/FAIL and total tests executed.

It's exit code is the number of tests that failed. So, 0 = all passed.

posix conformance interface sub-directories [edit section]

posix group  ^ sub-group  ^
AIO aio_* (including aio_cancel, aio_error, aio_fsync, aio_read, aio_return, aio_suspend, aio_write)
AIO lio_listio
SIG sig* (including sigaction, sigemptyset, sigismember, sigprocmask, sigsuspend, sigaddset, sigfillset, signal, sigqueue, sigtimedwait, sigaltstack, sighols, sigpause, sigrelse, sigwait, sigdelset, sigignore, sigpending, sigset, sigwaitinfo)
SIG raise
SIG kill
SIG killpg
SIG pthread_kill
SIG pthread_sigmask
SEM sem* (including sem_close, sem_getvalue, sem_open, sem_timedwait, sem_wait, sem_destroy, sem_init, sem_post, sem_unlink)
THR pthread_* (including 95 tests - too many to list)
TMR time* (including time, timer_create, timer_delete, timer_getoverrun, timer_gettime, timer_settime))
TMR *time (including asctime, clock_gettime, clock_settime, ctime, difftime, gmtime, localtime, mktime, strftime, time, timer_gettime, timer_settime)
TMR clock* (including clock clock_getcpuclockid clock_getres clock_gettime clock_nanosleep clock_settime)
TMR nanosleep
MSG mq_* (including mq_close mq_getattr mq_notify mq_open mq_receive mq_send mq_setattr mq_timedreceive mq_timedsend mq_unlink)
TPS *sched* (including a bunch of test dirs)
MEM m*lock
MEM m*map
MEM shm_*
Query

FIXTHIS - when running with an existing LTP, we don't erase the pts.log file, or any of the existing logfiles.

FIXTHIS - it appears that we only run the first item in a wildcard list of items (but the data for multiple aio_* dirs is there, so I'm not reading something right)

FIXTHIS - it appears that we don't run the posix behavior tests

FIXTHIS - it appears that we don't run the posix definition tests

FIXTHIS - it appears we don't run the posix functional tests

FIXTHIS - it appears we don't run the posix stress tests

posix parsing [edit section]

See LTP posix parsing notes

LTP status [edit section]

in Tim's lab on August 3, 2017 [edit section]

How long to execute:

how to find the long-running tests [edit section]

board  ^ test  ^ duration  ^ user  ^ system  ^ test date  ^
bbb creat06 30 5 21 2017-08-03
bbb gettimeofday02 30 647 2324 2017-08-03
bbb ftruncate04_64 31 5 22 2017-08-03
bbb chown04 32 6 23 2017-08-03
bbb fchown04_16 32 3 14 2017-08-03
bbb fchown04 32 2 12 2017-08-03
bbb access04 33 5 26 2017-08-03
bbb ftruncate04 33 5 23 2017-08-03
bbb fchmod06 34 5 20 2017-08-03
bbb chown04_16 35 4 25 2017-08-03
bbb chmod06 36 4 21 2017-08-03
bbb acct01 37 4 29 2017-08-03
bbb clock_nanosleep2_01 51 2 1 2017-08-03
bbb fsync02 292 1 42 2017-08-03
bbb fork13 806 946 24970 2017-08-03
Query

inotify06 oops [edit section]

inotify06 causes the kernel to oops, with the following report:

Examples of LTP analysis [edit section]

ARC LTP instructions [edit section]

See https://github.com/foss-for-synopsys-dwc-arc-processors/ltp/blob/master/README.ARC

It lists things like:

It has a section of notes indicating requirements for the tests, including:

Examples of LTP visualization [edit section]

Linaro [edit section]

Linaro has some nice color-coded tables with LTP results: http://www.lineo.co.jp/ltp/linux-3.10.10-results/result.html

Bugs or issues [edit section]

Questions [edit section]

Environment variables used by runltp, ltp-pan, and tests [edit section]

Here is a list of environment variables that runltp exports: