|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| android/ | | 03-May-2024 | - | 6,739 | 5,416 |
| doc/ | | 03-May-2024 | - | 6,960 | 5,185 |
| docparse/ | | 03-May-2024 | - | 1,655 | 1,297 |
| include/ | | 03-May-2024 | - | 22,559 | 15,362 |
| lib/ | | 03-May-2024 | - | 23,459 | 15,962 |
| libs/ | | 03-May-2024 | - | 1,748 | 1,175 |
| m4/ | | 03-May-2024 | - | 967 | 810 |
| pan/ | | 03-May-2024 | - | 5,411 | 3,362 |
| runtest/ | | 03-May-2024 | - | 4,915 | 4,262 |
| scenario_groups/ | | 03-May-2024 | - | 124 | 90 |
| scripts/ | | 03-May-2024 | - | 543 | 266 |
| testcases/ | | 03-May-2024 | - | 839,552 | 546,145 |
| testscripts/ | | 03-May-2024 | - | 2,702 | 1,745 |
| tools/ | | 03-May-2024 | - | 2,893 | 2,061 |
| travis/ | | 03-May-2024 | - | 338 | 265 |
| utils/ | | 03-May-2024 | - | 13,826 | 8,451 |
| .gitignore | D | 03-May-2024 | 1.2 KiB | 88 | 80 |
| .travis.yml | D | 03-May-2024 | 4.8 KiB | 132 | 95 |
| Android.bp | D | 03-May-2024 | 4.6 KiB | 147 | 133 |
| Android.mk | D | 03-May-2024 | 642 | 18 | 1 |
| COPYING | D | 03-May-2024 | 17.7 KiB | 340 | 281 |
| IDcheck.sh | D | 03-May-2024 | 4.8 KiB | 190 | 129 |
| INSTALL | D | 03-May-2024 | 8.8 KiB | 251 | 182 |
| METADATA | D | 03-May-2024 | 341 | 8 | 7 |
| MODULE_LICENSE_GPL | D | 03-May-2024 | 0 | | |
| Makefile | D | 03-May-2024 | 6.8 KiB | 206 | 108 |
| Makefile.release | D | 03-May-2024 | 1.4 KiB | 47 | 13 |
| NOTICE | D | 03-May-2024 | 17.7 KiB | 340 | 281 |
| OWNERS | D | 03-May-2024 | 93 | 6 | 5 |
| README.kernel_config | D | 03-May-2024 | 10.7 KiB | 302 | 273 |
| README.md | D | 03-May-2024 | 6 KiB | 212 | 154 |
| TODO | D | 03-May-2024 | 1.3 KiB | 40 | 26 |
| VERSION | D | 03-May-2024 | 9 | 2 | 1 |
| build.sh | D | 03-May-2024 | 4.9 KiB | 217 | 168 |
| configure.ac | D | 03-May-2024 | 9.6 KiB | 385 | 340 |
| execltp.in | D | 03-May-2024 | 16 KiB | 475 | 326 |
| gen.bp | D | 03-May-2024 | 645.3 KiB | 24,686 | 22,176 |
| ltpmenu | D | 03-May-2024 | 19 KiB | 549 | 321 |
| runltp | D | 03-May-2024 | 35.9 KiB | 963 | 750 |
| ver_linux | D | 03-May-2024 | 3.7 KiB | 155 | 110 |
README.kernel_config
1---------------------------------
2Enable CODE COVERAGE for your Kernel:
3---------------------------------
41) Apply kernel-gcov patch(s) against the corresponding Kernel. They are available here:
5http://ltp.cvs.sourceforge.net/viewvc/ltp/utils/analysis/gcov-kernel/linux-2.*.*-gcov.patch?view=log,
62) Also enable the following options in your .config file before building the kernel
7CONFIG_GCOV_PROFILE=y
8CONFIG_GCOV_ALL=y
9CONFIG_GCOV_PROC=m
10CONFIG_GCOV_HAMMER=y
11
12---------------------------------
13Enabling Kernel Configuration to test Containers/Namespaces
14---------------------------------
15CONFIG_NAMESPACES=y
16CONFIG_UTS_NS=y
17CONFIG_IPC_NS=y
18CONFIG_USER_NS=y
19CONFIG_PID_NS=y
20CONFIG_NET_NS=y
21CONFIG_VETH=y
22CONFIG_MACVLAN=y
23
24The IPC namespaces do not automatically enable IPC, so you may
25also want to have:
26
27CONFIG_SYSVIPC=y
28CONFIG_SYSVIPC_SYSCTL=y
29CONFIG_POSIX_MQUEUE=y
30
31---------------------------------
32Enabling Kernel Configuration to test Controllers
33---------------------------------
34CONFIG_CGROUPS=y
35CONFIG_CGROUP_DEBUG=y
36CONFIG_CGROUP_NS=y
37CONFIG_GROUP_SCHED=y
38CONFIG_FAIR_GROUP_SCHED=y
39CONFIG_RT_GROUP_SCHED=y
40CONFIG_CGROUP_SCHED=y
41CONFIG_CGROUP_MEM_RES_CTLR=y
42CONFIG_LOCKDEP=y
43---------------------------------
44Enabling Kernel Configuration to test Power Management features
45---------------------------------
46CONFIG_CPU_FREQ=y
47CONFIG_CPU_FREQ_TABLE=y
48CONFIG_CPU_FREQ_DEBUG=y
49CONFIG_CPU_FREQ_STAT=y
50CONFIG_CPU_FREQ_STAT_DETAILS=y
51CONFIG_CPU_IDLE=y
52CONFIG_CPU_IDLE_GOV_LADDER=y
53CONFIG_CPU_IDLE_GOV_MENU=y
54CONFIG_SCHED_MC=y
55CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
56CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y
57CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
58CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
59CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE=y
60CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
61CONFIG_CPU_FREQ_GOV_POWERSAVE=y
62CONFIG_CPU_FREQ_GOV_USERSPACE=y
63CONFIG_CPU_FREQ_GOV_ONDEMAND=y
64CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
65---------------------------------
66Enabling Kernel Configuration to test filecaps security feature
67---------------------------------
68CONFIG_SECURITY_FILE_CAPABILITIES=y
69---------------------------------
70Enabling Kernel Configuration to test SELinux security feature
71---------------------------------
72Your Kernel should have been built with the following options to
73test SELinux:
74
75CONFIG_SECURITY=y
76CONFIG_SECURITY_NETWORK=y
77CONFIG_SECURITY_NETWORK_XFRM=y
78
79CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0
80This has to be set to a positive value if you want to test this check.
81Fedora kernels set it to 65536.
82
83CONFIG_SECURITY_SELINUX=y
84CONFIG_SECURITY_SELINUX_BOOTPARAM=y
85CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
86CONFIG_SECURITY_SELINUX_DEVELOP=y
87CONFIG_SECURITY_SELINUX_AVC_STATS=y
88CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
89CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y
90
91CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX=y
92You don't want this one unless you are running Fedora 3 or 4.
93On anything newer, it will cause unnecessary policy expansion.
94
95CONFIG_SECURITY_SMACK=y
96CONFIG_SECURITY_SELINUX=y
97
98By default, if you boot with multiple LSMs compiled into the kernel, the
99kernel won't boot succesfully - there can be only one (aside from
100explicit internal "stacking" e.g. as is done for combining SELinux or
101Smack with capabilities). Unless you use the security= option to select
102one at boot. SELinux and Smack will honor the security= option.
103---------------------------------
104---------------------------------
105Enabling Kernel Configuration to test SMACK security feature
106---------------------------------
107CONFIG_NETLABEL=y
108CONFIG_SECURITY=y
109CONFIG_SECURITY_NETWORK=y
110CONFIG_SECURITY_SMACK=y
111CONFIG_SECURITY_SELINUX should not be set
112
113For more information to build/install/run these tests, look through:
114ltp/testcases/kernel/security/smack/README
115---------------------------------
116---------------------------------
117Enablement for Enhancement to kexec/kdump for implementing the following features:
118- Backup/restore memory used by the original kernel before/after kexec.
119- Save/restore CPU state before/after kexec.
120Now, only the i386 architecture is supported. More from the following git logs:
121http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3ab83521378268044a448113c6aa9a9e245f4d2f,
122http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=89081d17f7bb81d89fa1aa9b70f821c5cf4d39e9,
123---------------------------------
124CONFIG_X86_32=y
125CONFIG_RELOCATABLE=y
126CONFIG_KEXEC=y
127CONFIG_CRASH_DUMP=y
128CONFIG_PM=y
129CONFIG_HIBERNATION=y
130CONFIG_KEXEC_JUMP=y
131---------------------------------
132Enabling HOTPLUG for your Kernels
133---------------------------------
134CONFIG_HOTPLUG_CPU=y
135CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
136CONFIG_ACPI_HOTPLUG_CPU=y
137CONFIG_HOTPLUG_PCI_PCIE=y
138CONFIG_HOTPLUG_PCI=y
139CONFIG_HOTPLUG_PCI_FAKE=y
140CONFIG_HOTPLUG_PCI_COMPAQ=y
141CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=y
142CONFIG_HOTPLUG_PCI_IBM=y
143CONFIG_HOTPLUG_PCI_ACPI=y
144CONFIG_HOTPLUG_PCI_ACPI_IBM=y
145CONFIG_HOTPLUG_PCI_CPCI=y
146CONFIG_HOTPLUG_PCI_CPCI_ZT5550=y
147CONFIG_HOTPLUG_PCI_CPCI_GENERIC=y
148CONFIG_HOTPLUG_PCI_SHPC=y
149---------------------------------
150Video For Linux Two API testing Requirements:
151You need to have a video device (i.e. webcam, tuner card, etc.) connected to your system and available under /dev/video0. If you don't have any hardware device available, you can still test the "Virtual Video Driver". To compile this you need to compile your kernel with CONFIG_VIDEO_VIVI=m under:
152 -> Device Drivers
153 -> Multimedia devices
154 -> Video For Linux
155 -> Video capture adapters
156 -> Virtual Video Driver
157
158The tests also require CUnit Framework to be installed before compiling the tests. Download & Install the same from:
159http://sourceforge.net/projects/cunit/
160---------------------------------
161---------------------------------
162Native language support (nls) testsuite requirements
163----------------------------------------------------
164CONFIG_NLS=m
165CONFIG_BLOCK=y
166---------------------------------
167Enabling Controller area network (CAN) protocol support for your Kernels
168---------------------------------
169CONFIG_NET=y
170CONFIG_CAN=m
171CONFIG_CAN_RAW=m
172CONFIG_CAN_BCM=m
173# CAN Device Drivers
174CONFIG_CAN_VCAN=m
175---------------------------------
176Enabling Fault Injection Support for your kernel (version 2.6.29).
177Please check with the original kernel for the fault injection
178types it supports. Following supports will be available:
179
180/sys/kernel/debug/fail_io_timeout/interval
181/sys/kernel/debug/fail_io_timeout/probability
182/sys/kernel/debug/fail_io_timeout/reject-end
183/sys/kernel/debug/fail_io_timeout/reject-start
184/sys/kernel/debug/fail_io_timeout/require-end
185/sys/kernel/debug/fail_io_timeout/require-start
186/sys/kernel/debug/fail_io_timeout/space
187/sys/kernel/debug/fail_io_timeout/stacktrace-depth
188/sys/kernel/debug/fail_io_timeout/task-filter
189/sys/kernel/debug/fail_io_timeout/times
190/sys/kernel/debug/fail_io_timeout/verbose
191
192/sys/kernel/debug/fail_make_request/interval
193/sys/kernel/debug/fail_make_request/probability
194/sys/kernel/debug/fail_make_request/reject-end
195/sys/kernel/debug/fail_make_request/reject-start
196/sys/kernel/debug/fail_make_request/require-end
197/sys/kernel/debug/fail_make_request/require-start
198/sys/kernel/debug/fail_make_request/space
199/sys/kernel/debug/fail_make_request/stacktrace-depth
200/sys/kernel/debug/fail_make_request/task-filter
201/sys/kernel/debug/fail_make_request/times
202/sys/kernel/debug/fail_make_request/verbose
203
204/sys/kernel/debug/fail_page_alloc/ignore-gfp-highmem
205/sys/kernel/debug/fail_page_alloc/ignore-gfp-wait
206/sys/kernel/debug/fail_page_alloc/interval
207/sys/kernel/debug/fail_page_alloc/min-order
208/sys/kernel/debug/fail_page_alloc/probability
209/sys/kernel/debug/fail_page_alloc/reject-end
210/sys/kernel/debug/fail_page_alloc/reject-start
211/sys/kernel/debug/fail_page_alloc/require-end
212/sys/kernel/debug/fail_page_alloc/require-start
213/sys/kernel/debug/fail_page_alloc/space
214/sys/kernel/debug/fail_page_alloc/stacktrace-depth
215/sys/kernel/debug/fail_page_alloc/task-filter
216/sys/kernel/debug/fail_page_alloc/times
217/sys/kernel/debug/fail_page_alloc/verbose
218
219/sys/kernel/debug/failslab/ignore-gfp-wait
220/sys/kernel/debug/failslab/interval
221/sys/kernel/debug/failslab/probability
222/sys/kernel/debug/failslab/reject-end
223/sys/kernel/debug/failslab/reject-start
224/sys/kernel/debug/failslab/require-end
225/sys/kernel/debug/failslab/require-start
226/sys/kernel/debug/failslab/space
227/sys/kernel/debug/failslab/stacktrace-depth
228/sys/kernel/debug/failslab/task-filter
229/sys/kernel/debug/failslab/times
230/sys/kernel/debug/failslab/verbose
231
232when the below kernel config options are set:
233
234CONFIG_FAULT_INJECTION=y
235CONFIG_DEBUG_KERNEL=y
236CONFIG_FAILSLAB=y (Fault-injection capability for kmalloc)
237(CONFIG_SLAB=y || CONFIG_SLUB=y) if CONFIG_FAILSLAB=y
238CONFIG_FAIL_PAGE_ALLOC=y (Fault-injection capabilitiy for alloc_pages())
239CONFIG_FAIL_MAKE_REQUEST=y (Fault-injection capability for disk IO)
240CONFIG_BLOCK=y if CONFIG_FAIL_MAKE_REQUEST=y
241CONFIG_FAIL_IO_TIMEOUT=y (Faul-injection capability for faking disk interrupts)
242CONFIG_BLOCK=y if CONFIG_FAIL_IO_TIMEOUT=y
243CONFIG_FAULT_INJECTION_DEBUG_FS=y (Debugfs entries for fault-injection capabilities)
244(CONFIG_SYSFS=y && CONFIG_DEBUG_FS=y) if CONFIG_FAULT_INJECTION_DEBUG_FS=y
245CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y (stacktrace filter for fault-injection capabilities)
246(CONFIG_FAULT_INJECTION_DEBUG_FS=y && CONFIG_STACKTRACE_SUPPORT=y && !CONFIG_X86_64) if
247 CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y
248
249For more information on Fault injection, please refer to:
250linux-2.6/Documentation/fault-injection/fault-injection.txt,
251
252You should also have made the following entries in your /etc/fstab file
253once the kernel is booted with the above CONFIG options set:
254
255debugfs /sys/kernel/debug/ debugfs
256
257# How the Kernel Fault Injection works for LTP ?
258
2591) Build Kernel with all the above possible kernel CONFIG Options,
2602) Create the above entry in /etc/fstab file,
2613) Reboot in the new kernel,
2624) Goto LTPROOT. Build and Install LTP as per ltp/INSTALL file,
2635) Choose your own test(or default) to run with fault injection as follows:
264 ./runltp -f <command_file> -F <LOOPS>,<FAULT_PROBABILITY>
265
266The algorithm functions like:
267loop (for each testcase)
268begin
269 execute_testcase(inside_stable_kernel)
270 begin
271 insert_fault_into_kernel()
272 loop X Times
273 begin
274 execute_testcase(inside_fault_kernel)
275 end
276 restore_kernel_to_normal()
277 end
278end
279
280# External TODOs:
2811) Add or modify testcases when relevant kernel functionality changes.
282---------------------------------
283
284---------------------------------
285Enabling Kernel Configuration to test ext4 new features
286---------------------------------
287CONFIG_EXT4_FS=y
288CONFIG_EXT4DEV_COMPAT=y
289CONFIG_EXT4_FS_XATTR=y
290CONFIG_EXT4_FS_POSIX_ACL=y
291CONFIG_EXT4_FS_SECURITY=y
292
293Beside that, the following packages are necessary.
294 e2fsprogs
295 e2fsprogs-devel
296 e2fsprogs-libs
297And the version of packages must be 1.41.4 or above.
298
299For more information to build/install/run these tests, look through:
300ltp/testcases/kernel/fs/ext4-new-features/README
301---------------------------------
302
README.md
1Linux Test Project
2==================
3
4Linux Test Project is a joint project started by SGI, OSDL and Bull developed
5and maintained by IBM, Cisco, Fujitsu, SUSE, Red Hat, Oracle and others. The
6project goal is to deliver tests to the open source community that validate the
7reliability, robustness, and stability of Linux.
8
9The LTP testsuite contains a collection of tools for testing the Linux kernel
10and related features. Our goal is to improve the Linux kernel and system
11libraries by bringing test automation to the testing effort. Interested open
12source contributors are encouraged to join.
13
14Project pages are located at: http://linux-test-project.github.io/
15
16The latest image is always available at:
17https://github.com/linux-test-project/ltp/releases
18
19The discussion about the project happens at ltp mailing list:
20http://lists.linux.it/listinfo/ltp
21
22The git repository is located at GitHub at:
23https://github.com/linux-test-project/ltp
24
25The patchwork instance is at:
26https://patchwork.ozlabs.org/project/ltp/list/
27
28Warning!
29========
30
31**Be careful with these tests!**
32
33Don't run them on production systems. Growfiles, doio, and iogen in particular
34stress the I/O capabilities of systems and while they should not cause problems
35on properly functioning systems, they are intended to find (or cause) problems.
36
37Quick guide to running the tests
38================================
39
40If you have git, autoconf, automake, m4, pkgconf / pkg-config, libc headers,
41linux kernel headers and other common development packages installed (see
42INSTALL and travis/*.sh), the chances are the following will work:
43
44```
45$ git clone https://github.com/linux-test-project/ltp.git
46$ cd ltp
47$ make autotools
48$ ./configure
49```
50
51Now you can continue either with compiling and running a single test or with
52compiling and installing the whole testsuite.
53
54For optional library dependencies look into scripts for major distros in
55`travis/` directory. You can also build whole LTP with `./build.sh` script.
56
57Shortcut to running a single test
58---------------------------------
59If you need to execute a single test you actually do not need to compile
60the whole LTP, if you want to run a syscall testcase following should work.
61
62```
63$ cd testcases/kernel/syscalls/foo
64$ make
65$ PATH=$PATH:$PWD ./foo01
66```
67
68Shell testcases are a bit more complicated since these need a path to a shell
69library as well as to compiled binary helpers, but generally following should
70work.
71
72```
73$ cd testcases/lib
74$ make
75$ cd ../commands/foo
76$ PATH=$PATH:$PWD:$PWD/../../lib/ ./foo01.sh
77```
78
79Open Posix Testsuite has it's own build system which needs Makefiles to be
80generated first, then compilation should work in subdirectories as well.
81
82```
83$ cd testcases/open_posix_testsuite/
84$ make generate-makefiles
85$ cd conformance/interfaces/foo
86$ make
87$ ./foo_1-1.run-test
88```
89
90Compiling and installing all testcases
91--------------------------------------
92
93```
94$ make
95$ make install
96```
97
98This will install LTP to `/opt/ltp`.
99* If you have a problem see `doc/mini-howto-building-ltp-from-git.txt`.
100* If you still have a problem see `INSTALL` and `./configure --help`.
101* Failing that, ask for help on the mailing list or Github.
102
103Some tests will be disabled if the configure script can not find their build
104dependencies.
105
106* If a test returns `TCONF` due to a missing component, check the `./configure`
107 output.
108* If a tests fails due to a missing user or group, see the Quick Start section
109 of `INSTALL`.
110
111Running tests
112-------------
113
114To run all the test suites
115
116```
117$ cd /opt/ltp
118$ ./runltp
119```
120
121Note that many test cases have to be executed as root.
122
123To run a particular test suite
124
125```
126$ ./runltp -f syscalls
127```
128
129To run all tests with `madvise` in the name
130
131```
132$ ./runltp -f syscalls -s madvise
133```
134Also see
135
136```
137$ ./runltp --help
138```
139
140Test suites (e.g. syscalls) are defined in the runtest directory. Each file
141contains a list of test cases in a simple format, see doc/ltp-run-files.txt.
142
143Each test case has its own executable or script, these can be executed
144directly
145
146```
147$ testcases/bin/abort01
148```
149
150Some have arguments
151
152```
153$ testcases/bin/fork13 -i 37
154```
155
156The vast majority of test cases accept the -h (help) switch
157
158```
159$ testcases/bin/ioctl01 -h
160```
161
162Many require certain environment variables to be set
163
164```
165$ LTPROOT=/opt/ltp PATH="$PATH:$LTPROOT/testcases/bin" testcases/bin/wc01.sh
166```
167
168Most commonly, the path variable needs to be set and also `LTPROOT`, but there
169are a number of other variables, `runltp` usually sets these for you.
170
171Note that all shell scripts need the `PATH` to be set. However this is not
172limited to shell scripts, many C based tests need environment variables as
173well.
174
175For more info see `doc/user-guide.txt` or online at
176https://github.com/linux-test-project/ltp/wiki/User-Guidelines.
177
178Network tests
179-------------
180Network tests require certain setup, described in `testcases/network/README.md`
181(online at https://github.com/linux-test-project/ltp/tree/master/testcases/network)
182and `INSTALL`.
183
184Developers corner
185=================
186
187Before you start you should read following documents:
188
189* `doc/test-writing-guidelines.txt`
190* `doc/build-system-guide.txt`
191* `doc/library-api-writing-guidelines.txt`
192
193There is also a step-by-step tutorial:
194
195* `doc/c-test-tutorial-simple.txt`
196
197If something is not covered there don't hesitate to ask on the LTP mailing
198list. Also note that these documents are available online at:
199
200* https://github.com/linux-test-project/ltp/wiki/Test-Writing-Guidelines
201* https://github.com/linux-test-project/ltp/wiki/LTP-Library-API-Writing-Guidelines
202* https://github.com/linux-test-project/ltp/wiki/Build-System
203* https://github.com/linux-test-project/ltp/wiki/C-Test-Case-Tutorial
204
205Although we accept GitHub pull requests, the preferred way is sending patches to our mailing list.
206
207It's a good idea to test patches on Travis CI before posting to mailing
208list. Our travis setup covers various architectures and distributions in
209order to make sure LTP compiles cleanly on most common configurations.
210For testing you need to sign up to Travis CI, enable running builds on your LTP fork on
211https://travis-ci.org/account/repositories and push your branch.
212