commit | b2cf0a4e3d5c071c7385abcd338fba519e7022a7 | [log] [tgz] |
---|---|---|
author | Alessio Balsini <balsini@google.com> | Tue Apr 19 15:33:00 2022 +0100 |
committer | Alessio Balsini <balsini@google.com> | Thu Apr 21 11:44:23 2022 +0100 |
tree | cce9329babd66d22aa36d7729c8a2bfd34175dbe | |
parent | f42e2171dc10c0129ed592ca9bfad870a9d18b7d [diff] | |
parent | b0561ad8d9ee9fe1244b5385e941eb65a21e91a1 [diff] |
Upgrade LTP to 20220121 ******************************** Tests Suites ******************************** Deleted (2) Added (1) io_cd irq io_floppy *********************************** Tests ************************************ Deleted (17) Added (160) fs_bind.BindMounts can.can_bcm01 ltp-aiodio.part2.ADSP085 containers.userns08 ltp-aiodio.part2.ADSP086 controllers.memcontrol01 ltp-aiodio.part2.ADSP087 controllers.memcontrol02 ltp-aiodio.part2.ADSP084 cve.cve-2020-25704 net_stress.broken_ip.broken_ip4-totlen cve.cve-2021-26708 smoketest.route4-change-dst cve.cve-2017-7616 syscalls.pread03 cve.cve-2018-18955 syscalls.chmod02 cve.cve-2020-25705 syscalls.sysfs06 cve.cve-2021-22555 syscalls.chmod04 cve.cve-2018-10124 syscalls.shmget01 cve.cve-2021-3609 syscalls.readv03 cve.cve-2018-13405 syscalls.pread03_64 fs.squashfs01 syscalls.link07 fs_bind.fs_bind_move16_sh syscalls.link06 fs_bind.fs_bind23_sh syscalls-ipc.shmget01 fs_bind.fs_bind_cloneNS03_sh fs_bind.fs_bind_rbind18_sh fs_bind.fs_bind_move17_sh fs_bind.fs_bind_rbind11_sh fs_bind.fs_bind_move08_sh fs_bind.fs_bind_rbind31_sh fs_bind.fs_bind_rbind01_sh fs_bind.fs_bind_rbind21_sh fs_bind.fs_bind_cloneNS05_sh fs_bind.fs_bind_move04_sh fs_bind.fs_bind_rbind07_sh fs_bind.fs_bind_move21_sh fs_bind.fs_bind_move10_sh fs_bind.fs_bind19_sh fs_bind.fs_bind_move05_sh fs_bind.fs_bind_cloneNS02_sh fs_bind.fs_bind_rbind15_sh fs_bind.fs_bind09_sh fs_bind.fs_bind_move11_sh fs_bind.fs_bind_rbind35_sh fs_bind.fs_bind13_sh fs_bind.fs_bind_move09_sh fs_bind.fs_bind_rbind39_sh fs_bind.fs_bind_cloneNS07_sh fs_bind.fs_bind_rbind03_sh fs_bind.fs_bind_rbind09_sh fs_bind.fs_bind_rbind20_sh fs_bind.fs_bind_move22_sh fs_bind.fs_bind_regression_sh fs_bind.fs_bind02_sh fs_bind.fs_bind12_sh fs_bind.fs_bind_rbind27_sh fs_bind.fs_bind24_sh fs_bind.fs_bind_move14_sh fs_bind.fs_bind_cloneNS04_sh fs_bind.fs_bind11_sh fs_bind.fs_bind14_sh fs_bind.fs_bind18_sh fs_bind.fs_bind_rbind25_sh fs_bind.fs_bind_move01_sh fs_bind.fs_bind_rbind24_sh fs_bind.fs_bind05_sh fs_bind.fs_bind_move18_sh fs_bind.fs_bind06_sh fs_bind.fs_bind07_sh fs_bind.fs_bind_move02_sh fs_bind.fs_bind_rbind23_sh fs_bind.fs_bind_rbind02_sh fs_bind.fs_bind_rbind28_sh fs_bind.fs_bind_move20_sh fs_bind.fs_bind_move06_sh fs_bind.fs_bind_rbind38_sh fs_bind.fs_bind08_sh fs_bind.fs_bind_rbind04_sh fs_bind.fs_bind_move03_sh fs_bind.fs_bind07-2_sh fs_bind.fs_bind_move07_sh fs_bind.fs_bind_rbind05_sh fs_bind.fs_bind03_sh fs_bind.fs_bind_rbind14_sh fs_bind.fs_bind16_sh fs_bind.fs_bind_rbind34_sh fs_bind.fs_bind_cloneNS06_sh fs_bind.fs_bind17_sh fs_bind.fs_bind_rbind08_sh fs_bind.fs_bind_rbind06_sh fs_bind.fs_bind_cloneNS01_sh fs_bind.fs_bind_rbind16_sh fs_bind.fs_bind_rbind17_sh fs_bind.fs_bind22_sh fs_bind.fs_bind10_sh fs_bind.fs_bind_rbind22_sh fs_bind.fs_bind01_sh fs_bind.fs_bind_rbind26_sh fs_bind.fs_bind_move12_sh fs_bind.fs_bind_rbind13_sh fs_bind.fs_bind04_sh fs_bind.fs_bind_move19_sh fs_bind.fs_bind_rbind29_sh fs_bind.fs_bind_rbind07-2_sh fs_bind.fs_bind_rbind30_sh fs_bind.fs_bind21_sh fs_bind.fs_bind_rbind12_sh fs_bind.fs_bind_rbind37_sh fs_bind.fs_bind20_sh fs_bind.fs_bind_rbind32_sh fs_bind.fs_bind_move13_sh fs_bind.fs_bind_move15_sh fs_bind.fs_bind15_sh fs_bind.fs_bind_rbind33_sh fs_bind.fs_bind_rbind10_sh fs_bind.fs_bind_rbind36_sh fs_bind.fs_bind_rbind19_sh ima.ima_conditionals net.nfs.nfs3_07 net.nfs.nfs3_ipv6_07 net.nfs.nfs42_07 net.nfs.nfs4_ipv6_07 net.nfs.nfs3t_ipv6_07 net.nfs.nfs41_ipv6_07 net.nfs.nfs42_ipv6_07 net.nfs.nfs4_07 net.nfs.nfs41_07 net.nfs.nfs3t_07 net.tcp_cmds.tc01 net_stress.broken_ip.broken_ip4-plen numa.set_mempolicy05 sched.cfs_bandwidth01 smoketest.ping602 smoketest.ping01 syscalls.wait403 syscalls.epoll_ctl05 syscalls.statx08 syscalls.io_submit02 syscalls.quotactl08 syscalls.epoll_pwait04 syscalls.write06 syscalls.creat09 syscalls.io_getevents02 syscalls.epoll_pwait02 syscalls.perf_event_open03 syscalls.shmget06 syscalls.mallinfo2_01 syscalls.dup207 syscalls.epoll_ctl03 syscalls.quotactl09 syscalls.epoll_create1_02 syscalls.kill13 syscalls.io_destroy02 syscalls.io_cancel02 syscalls.fanotify22 syscalls.epoll_pwait05 syscalls.io_setup02 syscalls.fanotify20 syscalls.setsockopt08 syscalls.epoll_create02 syscalls.epoll_create01 syscalls.dup206 syscalls.epoll_wait04 syscalls.fanotify21 syscalls.epoll_ctl04 syscalls.epoll_pwait03 syscalls.io_submit03 syscalls-ipc.shmget06 Bug: 229724819 Test: TH Signed-off-by: Alessio Balsini <balsini@google.com> Change-Id: Iecd9f56d8980a8fe0db7d70f2a276de5a2503908
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/
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.
If you have git, autoconf, automake, m4, pkgconf / pkg-config, libc headers, linux kernel headers and other common development packages installed (see INSTALL and ci/*.sh), 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.
For optional library dependencies look into scripts for major distros in ci/
directory. You can also build whole LTP with ./build.sh
script.
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
$ make $ make install
This will install LTP to /opt/ltp
.
doc/mini-howto-building-ltp-from-git.txt
.INSTALL
and ./configure --help
.Some tests will be disabled if the configure script can not find their build dependencies.
TCONF
due to a missing component, check the ./configure
output.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.
Network tests require certain setup, described in testcases/network/README.md
(online at https://github.com/linux-test-project/ltp/tree/master/testcases/network).
Before you start you should read following documents:
doc/test-writing-guidelines.txt
doc/build-system-guide.txt
doc/library-api-writing-guidelines.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 GitHub Actions before posting to mailing list. Our GitHub Actions setup covers various architectures and distributions in order to make sure LTP compiles cleanly on most common configurations. For testing you need to just to push your changes to your own LTP fork on GitHub.