C Shell HTML Makefile Python M4 Other
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc tst_test.sh: Add TST_TEST_DATA and TST_TEST_DATA_IFS Jun 5, 2018
include Add .cache.mk and *.dwo into clean target and .gitignore May 24, 2018
lib lib/tst_device: Fill a file in megabyte sized chunks May 16, 2018
m4 rpc: Use libtirpc for all RPC tests + detect headers location Mar 6, 2018
pan ltp-pan: Log start of test in kernel log Aug 23, 2017
runtest network/tcp_cc: add new test bbr02 Jun 8, 2018
scenario_groups Add CVE .gitignore, Makefile and runtest files Jul 19, 2017
scripts Update references with my old legal name/email to my current name/ema… Feb 14, 2017
testcases network/tcp_cc: check support for a congestion alg Jun 8, 2018
testscripts Remove old build scripts Apr 27, 2018
tools *.py: Replace '#!/usr/bin/python3' with '#!/usr/bin/env python3' May 2, 2018
utils sctp: change the layout of tst_brkm() Jun 5, 2018
.gitignore Add .cache.mk and *.dwo into clean target and .gitignore May 24, 2018
.gitmodules gitmodules: update mce-test repo URL May 31, 2012
.travis.packages_i386 travis: Install all dependencies for most of jobs Dec 5, 2017
.travis.packages_native travis: Install all dependencies for most of jobs Dec 5, 2017
.travis.yml travis: Remove unnecessary third party apt repositories Apr 18, 2018
COPYING update GPLv2 text in COPYING Jan 26, 2015
IDcheck.sh Update FSF address Oct 19, 2012
INSTALL android: exclude tests which don't build Jan 31, 2017
Makefile Update references with my old legal name/email to my current name/ema… Feb 14, 2017
Makefile.release Use `tar [..] .' instead of `tar [..] *'. Dec 14, 2010
README.kernel_config p9auth: remove this test Sep 17, 2014
README.md README: Update developer section Aug 2, 2017
TODO Update TODO Feb 17, 2016
VERSION LTP 20180515 May 15, 2018
build.sh build.sh: Allow to choose in-tree or out-tree for all build types Feb 26, 2018
configure.ac sctp/sctp_big_chunk.c: Fix compiler error Apr 4, 2018
execltp.in *.py: Replace '#!/usr/bin/python3' with '#!/usr/bin/env python3' May 2, 2018
ltpmenu shell: fix bashisms: s/&>/>$1 2>&1/ Dec 1, 2016
runltp runltp: Append ${LTPROOT}/bin to PATH Jan 31, 2018
runltplite.sh runltp: Append ${LTPROOT}/bin to PATH Jan 31, 2018
ver_linux ver_linux: Add header + new line before /etc/*release and uname Feb 20, 2018

README.md

Linux Test Project

Linux Test Project is a joint project started by SGI, OSDL and Bull developed and maintained by IBM, Cisco, Fujitsu, SUSE, Red Hat, Oracle and others. The project goal is to deliver tests to the open source community that validate the reliability, robustness, and stability of Linux.

The LTP testsuite contains a collection of tools for testing the Linux kernel and related features. Our goal is to improve the Linux kernel and system libraries by bringing test automation to the testing effort. Interested open source contributors are encouraged to join.

Project pages are located at: http://linux-test-project.github.io/

The latest image is always available at: https://github.com/linux-test-project/ltp/releases

The discussion about the project happens at ltp mailing list: http://lists.linux.it/listinfo/ltp

The git repository is located at GitHub at: https://github.com/linux-test-project/ltp

Warning!

Be careful with these tests!

Don't run them on production systems. Growfiles, doio, and iogen in particular stress the I/O capabilities of systems and while they should not cause problems on properly functioning systems, they are intended to find (or cause) problems.

Quick guide to running the tests

If you have git, autoconf, automake, m4, the linux headers and the common developer packages installed, the chances are the following will work.

$ git clone https://github.com/linux-test-project/ltp.git
$ cd ltp
$ make autotools
$ ./configure
$ make
$ make install

This will install LTP to /opt/ltp.

  • If you have a problem see doc/mini-howto-building-ltp-from-git.txt.
  • If you still have a problem see INSTALL and ./configure --help.
  • Failing that, ask for help on the mailing list or Github.

Some tests will be disabled if the configure script can not find their build dependencies.

  • If a test returns TCONF due to a missing component, check the ./configure output.
  • If a tests fails due to a missing user or group, see the Quick Start section of INSTALL.

To run all the test suites

$ cd /opt/ltp
$ ./runltp

Note that many test cases have to be executed as root.

To run a particular test suite

$ ./runltp -f syscalls

To run all tests with madvise in the name

$ ./runltp -f syscalls -s madvise

Also see

$ ./runltp --help

Test suites (e.g. syscalls) are defined in the runtest directory. Each file contains a list of test cases in a simple format, see doc/ltp-run-files.txt.

Each test case has its own executable or script, these can be executed directly

$ testcases/bin/abort01

Some have arguments

$ testcases/bin/fork13 -i 37

The vast majority of test cases accept the -h (help) switch

$ testcases/bin/ioctl01 -h

Many require certain environment variables to be set

$ LTPROOT=/opt/ltp PATH="$PATH:$LTPROOT/testcases/bin" testcases/bin/wc01.sh

Most commonly, the path variable needs to be set and also LTPROOT, but there are a number of other variables, runltp usually sets these for you.

Note that all shell scripts need the PATH to be set. However this is not limited to shell scripts, many C based tests need environment variables as well.

Developers corner

Before you start you should read following documents:

  • doc/test-writing-guidelines.txt
  • doc/build-system-guide.txt

There is also a step-by-step tutorial:

  • doc/c-test-tutorial-simple.txt

If something is not covered there don't hesitate to ask on the LTP mailing list. Also note that these documents are available online at:

https://github.com/linux-test-project/ltp/wiki/Test-Writing-Guidelines https://github.com/linux-test-project/ltp/wiki/BuildSystem https://github.com/linux-test-project/ltp/wiki/C-Test-Case-Tutorial