Upgrade to LTP 20200120

********************************* Tests Suites *********************************
                                Deleted                                   Added
                                fs_ext4                                  uevent
                                 timers

************************************ Tests *************************************
                                Deleted                                   Added
                      cve.cve-2017-5669                    commands.sysctl02_sh
net.tirpc_tests.tirpc_authdes_seccreate                    crypto.crypto_user02
   net.tirpc_tests.tirpc_authdes_create                    cve.cve-2017-1000380
                      numa.move_pages08                      cve.cve-2017-16995
                    numa.Numa-testcases                         ima.evm_overlay
                     quickhit.asyncio02                           net.ipv6.nft6
                       quickhit.fstat01                      net.ipv6.ip6tables
                     syscalls.bdflush01                        net.tcp_cmds.nft
                    syscalls.fstat01_64                    numa.migrate_pages01
                  syscalls.move_pages08                     numa.numa_testcases
                    syscalls.lstat03_64                    numa.migrate_pages03
                   syscalls.nanosleep03                    numa.migrate_pages02
                    syscalls.fstat05_64                   syscalls.ioprio_set03
                       syscalls.lstat03                   syscalls.ioprio_set02
                   syscalls.ftruncate02                   syscalls.ioprio_set01
                       syscalls.fstat05            syscalls.futex_cmp_requeue01
                     syscalls.asyncio02                        syscalls.prctl07
                syscalls.ftruncate02_64                   syscalls.ioprio_get01
                       syscalls.fstat01                      syscalls.leapsec01
                                                               syscalls.prctl05
                                                               syscalls.prctl08
                                                               syscalls.prctl09
                                                       syscalls.timer_settime02
                                                       syscalls.timer_settime01
                                                                syscalls.stat02
                                                               syscalls.mbind02
                                                               syscalls.prctl06
                                                                syscalls.acct02
                                                        syscalls.timer_create01
                                                        syscalls.timer_create02
                                                        syscalls.timer_create03
                                                   syscalls.futex_cmp_requeue02
                                                       syscalls.set_mempolicy04
                                                       syscalls.set_mempolicy03
                                                       syscalls.set_mempolicy02
                                                       syscalls.set_mempolicy01
                                                            syscalls.quotactl06
                                                            syscalls.quotactl05
                                                               syscalls.mbind04
                                                            syscalls.vmsplice03
                                                            syscalls.quotactl04
                                                              syscalls.accept02
                                                                syscalls.pkey01
                                                     syscalls.copy_file_range03
                                                     syscalls.copy_file_range02
                                                          syscalls.preadv203_64
                                                            syscalls.bpf_prog01
                                                             syscalls.bpf_map01
                                                            syscalls.fanotify13
                                                               syscalls.mbind03
                                                            syscalls.fanotify15
                                                            syscalls.fanotify14
                                                             syscalls.preadv203
                                                             syscalls.stat02_64
                                                            syscalls.bpf_prog02
                                                               syscalls.prctl04
                                                          syscalls.setsockopt04
                                                              syscalls.capset03
                                                        syscalls.timer_delete01
                                                        syscalls.timer_delete02
                                                              syscalls.capset04
                                                   syscalls.pidfd_send_signal02
                                                   syscalls.pidfd_send_signal03
                                                            syscalls.bpf_prog03
                                                   syscalls.pidfd_send_signal01
                                                           tracing.pt_ex_kernel
                                                      tracing.pt_disable_branch
                                                tracing.pt_snapshot_trace_basic
                                                             tracing.pt_ex_user

Test: VtsKernelLtp on x86 cuttlefish, crosshatch
Bug: 148414662
Bug: 150467619
Signed-off-by: Steve Muckle <smuckle@google.com>
Change-Id: Icd54f931f89974fd15077e53dbad8b2b255df918
tree: 3929c5cebe544182985ea04487e2d9991634bb43
  1. android/
  2. doc/
  3. include/
  4. lib/
  5. libs/
  6. m4/
  7. pan/
  8. runtest/
  9. scenario_groups/
  10. scripts/
  11. testcases/
  12. testscripts/
  13. tools/
  14. travis/
  15. utils/
  16. .gitignore
  17. .travis.yml
  18. Android.bp
  19. Android.mk
  20. build.sh
  21. configure.ac
  22. COPYING
  23. execltp.in
  24. gen.bp
  25. IDcheck.sh
  26. INSTALL
  27. ltpmenu
  28. Makefile
  29. Makefile.release
  30. MODULE_LICENSE_GPL
  31. NOTICE
  32. OWNERS
  33. README.kernel_config
  34. README.md
  35. runltp
  36. TODO
  37. ver_linux
  38. VERSION
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

The patchwork instance is at: https://patchwork.ozlabs.org/project/ltp/list/

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

Now you can continue either with compiling and running a single test or with compiling and installing the whole testsuite.

Shortcut to running a single test

If you need to execute a single test you actually do not need to compile the whole LTP, if you want to run a syscall testcase following should work.

$ cd testcases/kernel/syscalls/foo
$ make
$ PATH=$PATH:$PWD ./foo01

Shell testcases are a bit more complicated since these need a path to a shell library as well as to compiled binary helpers, but generally following should work.

$ cd testcases/lib
$ make
$ cd ../commands/foo
$ PATH=$PATH:$PWD:$PWD/../../lib/ ./foo01.sh

Open Posix Testsuite has it's own build system which needs Makefiles to be generated first, then compilation should work in subdirectories as well.

$ cd testcases/open_posix_testsuite/
$ make generate-makefiles
$ cd conformance/interfaces/foo
$ make
$ ./foo_1-1.run-test

Compiling and installing all testcases

$ 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.

For more info see doc/user-guide.txt or online at https://github.com/linux-test-project/ltp/wiki/User-Guidelines.

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:

Although we accept GitHub pull requests, the preferred way is sending patches to our mailing list.

It's a good idea to test patches on Travis CI before posting to mailing list. Our travis setup covers various architectures and distributions in order to make sure LTP compiles cleanly on most common configurations. For testing you need to sign up to Travis CI, enable running builds on your LTP fork on https://travis-ci.org/account/repositories and push your branch.