commit | 33b851a1145a2caf6faa0acf9e29d1aaa206b7aa | [log] [tgz] |
---|---|---|
author | Alessio Balsini <balsini@google.com> | Mon May 24 17:26:01 2021 +0100 |
committer | Alessio Balsini <balsini@google.com> | Tue Jun 08 10:41:46 2021 +0100 |
tree | ee47adc6bf8c259dbc808e33c43ae4888c4bc0ea | |
parent | 0017866abf2d89c8b0cc18005259940979fbbb76 [diff] |
Upgrade to LTP 20210524 *********************** Tests Suites *********************** Deleted (3) Added (1) lvm.part1 smoketest lvm.part2 quickhit ************************** Tests *************************** Deleted (32) Added (167) connectors.Connectors commands.shell_test01 crashme.mem01 connectors.cn_pec_sh mm.mem03 containers.clock_gettime03 mm.mem01 containers.sysinfo03 net.tcp_cmds.rsh containers.timerfd04 net.tcp_cmds.rcp containers.clock_nanosleep03 net.tcp_cmds.rlogin containers.timens01 net_stress.route.route4-rmmod crypto.af_alg07 net_stress.route.route6-rmmod cve.cve-2018-12896 syscalls.msgrcv04 cve.cve-2018-8897 syscalls.clock_nanosleep2_01 cve.cve-2018-9568 syscalls.truncate01 cve.cve-2021-3444 syscalls.close08 cve.cve-2016-8655 syscalls.semop04 cve.cve-2018-1000199 syscalls.kill04 cve.cve-2017-2636 syscalls.time02 cve.cve-2020-29373 syscalls.uname03 cve.cve-2017-17712 syscalls.sched_getparam02 cve.cve-2020-11494 syscalls.chdir03 cve.cve-2017-10661 syscalls.chdir02 cve.cve-2018-18559 syscalls.sync03 cve.cve-2017-1000405 syscalls.sync02 cve.cve-2018-1000204 syscalls.kill01 cve.cve-2018-18445 syscalls.truncate01_64 cve.cve-2017-1000112 syscalls.futex_wait_bitset02 cve.cve-2017-1000111 syscalls.getdents02_64 cve.cve-2019-8912 syscalls.getdents01_64 cve.cve-2018-7566 syscalls.semop05 cve.cve-2020-14386 syscalls.socketcall04 cve.cve-2020-14416 syscalls-ipc.msgrcv04 cve.cve-2016-9793 syscalls-ipc.semop05 ima.ima_selinux syscalls-ipc.semop04 ima.ima_keys ima.ima_kexec kernel_misc.rtc02 mm.thp04 mm.cpuset01 net.features.wireguard01 net.features.wireguard01_ipv6 net.features.fou01_ipv6 net.features.gue01_ipv6 net.features.wireguard02_ipv6 net.features.gue01 net.features.wireguard02 net.features.fou01 net_stress.route.route4-change-netlink-dst net_stress.route.route4-change-netlink-if net_stress.route.route6-change-netlink-dst net_stress.route.route6-change-netlink-gw net_stress.route.route6-change-netlink-if net_stress.route.route4-change-netlink-gw pty.pty03 pty.pty04 pty.pty05 syscalls.fcntl37 syscalls.fcntl38 syscalls.name_to_handle_at02 syscalls.name_to_handle_at01 syscalls.sendmsg03 syscalls.pipe13 syscalls.pipe12 syscalls.ioctl_sg01 syscalls.pidfd_open01 syscalls.pidfd_open02 syscalls.pidfd_open03 syscalls.fsconfig01 syscalls.fsconfig02 syscalls.io_pgetevents02 syscalls.io_pgetevents01 syscalls.msgctl06 syscalls.msgctl05 syscalls.sysinfo03 syscalls.writev03 syscalls.fsmount01 syscalls.fsmount02 syscalls.clock_gettime03 syscalls.clock_gettime04 syscalls.timerfd04 syscalls.quotactl07 syscalls.fsopen01 syscalls.add_key05 syscalls.fsopen02 syscalls.semctl08 syscalls.semctl09 syscalls.ioctl_loop01 syscalls.ioctl_loop02 syscalls.ioctl_loop03 syscalls.msgget05 syscalls.ioctl_loop05 syscalls.ioctl_loop06 syscalls.ioctl_loop07 syscalls.brk02 syscalls.mincore03 syscalls.mincore04 syscalls.fallocate06 syscalls.shmctl07 syscalls.shmctl06 syscalls.shmctl08 syscalls.bpf_prog05 syscalls.openat203 syscalls.openat201 syscalls.io_uring01 syscalls.io_uring02 syscalls.clone302 syscalls.clone301 syscalls.move_mount01 syscalls.move_mount02 syscalls.adjtimex03 syscalls.open_by_handle_at02 syscalls.vmsplice04 syscalls.inotify10 syscalls.get_mempolicy02 syscalls.timerfd_settime02 syscalls.close_range02 syscalls.open_tree02 syscalls.fspick02 syscalls.fspick01 syscalls.fanotify19 syscalls.fanotify18 syscalls.mmap17 syscalls.bind06 syscalls.bind05 syscalls.bind04 syscalls.ioctl_loop04 syscalls.mmap18 syscalls.mmap19 syscalls.fanotify17 syscalls.init_module01 syscalls.fcntl37_64 syscalls.init_module02 syscalls.setsockopt07 syscalls.setsockopt06 syscalls.setsockopt05 syscalls.sendmmsg02 syscalls.mallinfo02 syscalls.fcntl38_64 syscalls.timer_settime03 syscalls.pipe2_04 syscalls.sendto03 syscalls.open_tree01 syscalls.ptrace10 syscalls.ptrace11 syscalls.close_range01 syscalls.connect02 syscalls.recvmmsg01 syscalls.clock_nanosleep04 syscalls.msgget04 syscalls.clock_nanosleep03 syscalls.ioctl09 syscalls.finit_module01 syscalls.finit_module02 syscalls.open_by_handle_at01 syscalls.send02 syscalls.fanotify16 syscalls.openat202 syscalls.ptrace09 syscalls.ptrace08 syscalls.bpf_prog04 syscalls.clock_settime03 syscalls-ipc.msgget05 syscalls-ipc.msgget04 syscalls-ipc.semctl08 syscalls-ipc.semctl09 syscalls-ipc.shmctl06 syscalls-ipc.msgctl06 syscalls-ipc.shmctl07 syscalls-ipc.msgctl05 syscalls-ipc.shmctl08 Bug: 189092263 Test: atest vts_ltp_test_x86_64 Signed-off-by: Alessio Balsini <balsini@google.com> Change-Id: I7dc9f562d0da1d5fb68d02f43ee00e368f5c7905
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 travis/*.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 travis/
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) and INSTALL
.
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 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.