Fix the creation of the dumpdir directory in stress_floppy Makefile
[ltp-debian.git] / README
blobe98827c58ad10a2a526bf737eadfd7046ecb96fc
1 Linux Test Project
2 (Maintained by: Subrata Modak<subrata@linux.vnet.ibm.com>)
4 The latest image is always available at http://ltp.sf.net
7 About the Linux Test Project
9 The Linux Test Project is a joint project with SGI, IBM, OSDL, and Bull with a
10 goal to deliver test suites to the open source community that validate the
11 reliability, robustness, and stability of Linux. The Linux Test Project is a
12 collection of tools for testing the Linux kernel and related features. Our goal
13 is to improve the Linux kernel by bringing test automation to the kernel testing
14 effort. Interested open source contributors are encouraged to join the project.
17 In the Package
18 --------------
19 Here is a short description of what is included in this package
21 INSTALL
22         Installation documentation and quick start guide
24 README
25         This document
27 CREDITS
28         Credits to those who have contributed to the project.
30 COPYING
31                  GNU General Public License
33 ChangeLog
34         An incomplete list of changes to the project.  We will try harder to
35         keep this up to date.
37 Makefile
38                  Top level make file for LTP.
40 runalltests.sh
41         A simple script to run all of the packaged tests in sequential order and
42                  report the overall result.
44 diskio.sh
45         A simple script to run all the diskio tests that pertain to the CD-ROM
46         and floppy disk file systems.
48 networktests.sh
49         A simple script to run all the network related tests that require
50         another remote machine.
52 doc/*
53         Documentation for the project including man pages for some of the
54         tools & library functions, as well as descriptions of every test.
57 include/*
58 lib/*
59         The include and lib directories contain headers and codes for common
60         routines used by many of the tests.  We have tried to keep this to a
61                  minimum.
63 testcases/*
64         Contains all tests that run under the LTP as well as the "bin"
65                  directory, which has hardlinks to all the test executables.
67 runtest/*
68         It houses command lists that are used by ltp-pan for automated testing.
70 pan/*
71         The pan directory contains a simple, lightweight test harness.  lpt-pan
72         has the ability to run tests randomly and in parallel.  See ltp-pan's man
73         page for more information.
75 scratch/*
76         The scratch directory is a dumping ground for snippets and test cases
77         that we found but haven't integrated into LTP yet.  Feel free to suggest
78         new snippets to be added, or take one of these and finish it off.
80 testcases/kernel/containers/*
81         Contains all the testcases related to container functionality ( e.g: sysvipc, utsname etc..)
82         For further information on the each of the container functionality refer
83         the following file: testcases/kernel/containers/README
86 Warning!
87 --------
88 Be careful with these tests!
90 Don't run them on production systems.  Growfiles, doio, and iogen in particular
91 stress the I/O capabilities of systems and while they should not cause problems
92 on properly functioning systems, they are intended to find (or cause) problems.
95 Contact Information and Updates
96 -------------------------------
98 URL: http://ltp.sf.net
100 Questions and comments should be sent to the LTP mailing list located on the
101 project page.
103 Using KDUMP test automation suite
104 ---------------------------------
105 For more information on how to use the kdump test automation suite please refer
106 to file testcases/kdump/README.
108 Using NUMA test automation suite
109 ---------------------------------
110 For more information on how to use the 'numa' test automation suite please refer
111 to file testcases/kernel/numa/README.
113 ---------------------------------
114 Enable CODE COVERAGE for your Kernel:
115 ---------------------------------
116 1) Apply kernel-gcov patch(s) against the corresponding Kernel. They are available here:
117 http://ltp.cvs.sourceforge.net/viewvc/ltp/utils/analysis/gcov-kernel/linux-2.*.*-gcov.patch?view=log,
118 2) Also enable the following options in your .config file before building the kernel
119 CONFIG_GCOV_PROFILE=y
120 CONFIG_GCOV_ALL=y
121 CONFIG_GCOV_PROC=m
122 CONFIG_GCOV_HAMMER=y
124 ---------------------------------
125 Enabling Kernel Configuration to test Containers/Namespaces
126 ---------------------------------
127 CONFIG_NAMESPACES=y
128 CONFIG_UTS_NS=y
129 CONFIG_IPC_NS=y
130 CONFIG_USER_NS=y
131 CONFIG_PID_NS=y
132 CONFIG_NET_NS=y
133 CONFIG_VETH=y
134 CONFIG_MACVLAN=y
136 The IPC namespaces do not automatically enable IPC, so you may
137 also want to have:
139 CONFIG_SYSVIPC=y
140 CONFIG_SYSVIPC_SYSCTL=y
141 CONFIG_POSIX_MQUEUE=y
143 ---------------------------------
144 Enabling Kernel Configuration to test Controllers
145 ---------------------------------
146 CONFIG_CGROUPS=y
147 CONFIG_CGROUP_DEBUG=y
148 CONFIG_CGROUP_NS=y
149 CONFIG_GROUP_SCHED=y
150 CONFIG_FAIR_GROUP_SCHED=y
151 CONFIG_RT_GROUP_SCHED=y
152 CONFIG_CGROUP_SCHED=y
153 CONFIG_CGROUP_MEM_RES_CTLR=y
154 CONFIG_LOCKDEP=y
155 ---------------------------------
156 Enabling Kernel Configuration to test Power Management features
157 ---------------------------------
158 CONFIG_CPU_FREQ=y
159 CONFIG_CPU_FREQ_TABLE=y
160 CONFIG_CPU_FREQ_DEBUG=y
161 CONFIG_CPU_FREQ_STAT=y
162 CONFIG_CPU_FREQ_STAT_DETAILS=y
163 CONFIG_CPU_IDLE=y
164 CONFIG_CPU_IDLE_GOV_LADDER=y
165 CONFIG_CPU_IDLE_GOV_MENU=y
166 CONFIG_SCHED_MC=y
167 CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
168 CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y
169 CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
170 CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
171 CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE=y
172 CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
173 CONFIG_CPU_FREQ_GOV_POWERSAVE=y
174 CONFIG_CPU_FREQ_GOV_USERSPACE=y
175 CONFIG_CPU_FREQ_GOV_ONDEMAND=y
176 CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
177 ---------------------------------
178 Enabling Kernel Configuration to test filecaps security feature
179 ---------------------------------
180 CONFIG_SECURITY_FILE_CAPABILITIES=y
181 ---------------------------------
182 Enabling Kernel Configuration to test p9auth security feature
183 ---------------------------------
184 CONFIG_CRYPTO=y
185 CONFIG_STAGING=y
186 # CONFIG_STAGING_EXCLUDE_BUILD is not set
187 CONFIG_PLAN9AUTH=m
188 (Or CONFIG_PLAN9AUTH=y)
189 You also will need openssl installed.
190 You will also need to have an user named 'ltp'
191 created to execute this test.
192 ---------------------------------
193 Enabling Kernel Configuration to test SELinux security feature
194 ---------------------------------
195 Your Kernel should have been built with the following options to
196 test SELinux:
198 CONFIG_SECURITY=y
199 CONFIG_SECURITY_NETWORK=y
200 CONFIG_SECURITY_NETWORK_XFRM=y
202 CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0
203 This has to be set to a positive value if you want to test this check.
204 Fedora kernels set it to 65536.
206 CONFIG_SECURITY_SELINUX=y
207 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
208 CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
209 CONFIG_SECURITY_SELINUX_DEVELOP=y
210 CONFIG_SECURITY_SELINUX_AVC_STATS=y
211 CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
212 CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y
214 CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX=y
215 You don't want this one unless you are running Fedora 3 or 4.  
216 On anything newer, it will cause unnecessary policy expansion.
218 CONFIG_SECURITY_SMACK=y
219 CONFIG_SECURITY_SELINUX=y
221 By default, if you boot with multiple LSMs compiled into the kernel, the
222 kernel won't boot succesfully - there can be only one (aside from
223 explicit internal "stacking" e.g. as is done for combining SELinux or
224 Smack with capabilities).  Unless you use the security= option to select
225 one at boot.  SELinux and Smack will honor the security= option.
226 ---------------------------------
227 ---------------------------------
228 Enabling Kernel Configuration to test SMACK security feature
229 ---------------------------------
230 CONFIG_NETLABEL=y
231 CONFIG_SECURITY=y
232 CONFIG_SECURITY_NETWORK=y
233 CONFIG_SECURITY_SMACK=y
234 CONFIG_SECURITY_SELINUX should not be set
236 For more information to build/install/run these tests, look through:
237 ltp/testcases/kernel/security/smack/README
238 ---------------------------------
239 ---------------------------------
240 Enablement for Enhancement to kexec/kdump for implementing the following features:
241 - Backup/restore memory used by the original kernel before/after kexec.
242 - Save/restore CPU state before/after kexec.
243 Now, only the i386 architecture is supported. More from the following git logs:
244 http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3ab83521378268044a448113c6aa9a9e245f4d2f,
245 http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=89081d17f7bb81d89fa1aa9b70f821c5cf4d39e9,
246 ---------------------------------
247 CONFIG_X86_32=y
248 CONFIG_RELOCATABLE=y
249 CONFIG_KEXEC=y
250 CONFIG_CRASH_DUMP=y
251 CONFIG_PM=y
252 CONFIG_HIBERNATION=y
253 CONFIG_KEXEC_JUMP=y
254 ---------------------------------
255 Enabling HOTPLUG for your Kernels
256 ---------------------------------
257 CONFIG_HOTPLUG=y
258 CONFIG_HOTPLUG_CPU=y
259 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
260 CONFIG_ACPI_HOTPLUG_CPU=y
261 CONFIG_HOTPLUG_PCI_PCIE=y
262 CONFIG_HOTPLUG_PCI=y
263 CONFIG_HOTPLUG_PCI_FAKE=y
264 CONFIG_HOTPLUG_PCI_COMPAQ=y
265 CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=y
266 CONFIG_HOTPLUG_PCI_IBM=y
267 CONFIG_HOTPLUG_PCI_ACPI=y
268 CONFIG_HOTPLUG_PCI_ACPI_IBM=y
269 CONFIG_HOTPLUG_PCI_CPCI=y
270 CONFIG_HOTPLUG_PCI_CPCI_ZT5550=y
271 CONFIG_HOTPLUG_PCI_CPCI_GENERIC=y
272 CONFIG_HOTPLUG_PCI_SHPC=y
273 ---------------------------------
274 Video For Linux Two API testing Requirements:
275 You 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:
276   -> Device Drivers
277     -> Multimedia devices
278       -> Video For Linux
279         -> Video capture adapters
280          -> Virtual Video Driver
282 The tests also require CUnit Framework to be installed before compiling the tests. Download & Install the same from:
283 http://sourceforge.net/projects/cunit/
284 ---------------------------------
285 ---------------------------------
286 Native language support (nls) testsuite requirements
287 ----------------------------------------------------
288 CONFIG_NLS=m
289 CONFIG_BLOCK=y
290 ---------------------------------
291 Enabling Controller area network (CAN) protocol support for your Kernels
292 ---------------------------------
293 CONFIG_NET=y
294 CONFIG_CAN=m
295 CONFIG_CAN_RAW=m
296 CONFIG_CAN_BCM=m
297 # CAN Device Drivers
298 CONFIG_CAN_VCAN=m
299 ---------------------------------
300 Enabling Fault Injection Support for your kernel (version 2.6.29).
301 Please check with the original kernel for the fault injection
302 types it supports. Following supports will be available:
304 /sys/kernel/debug/fail_io_timeout/interval
305 /sys/kernel/debug/fail_io_timeout/probability
306 /sys/kernel/debug/fail_io_timeout/reject-end
307 /sys/kernel/debug/fail_io_timeout/reject-start
308 /sys/kernel/debug/fail_io_timeout/require-end
309 /sys/kernel/debug/fail_io_timeout/require-start
310 /sys/kernel/debug/fail_io_timeout/space
311 /sys/kernel/debug/fail_io_timeout/stacktrace-depth
312 /sys/kernel/debug/fail_io_timeout/task-filter
313 /sys/kernel/debug/fail_io_timeout/times
314 /sys/kernel/debug/fail_io_timeout/verbose
316 /sys/kernel/debug/fail_make_request/interval
317 /sys/kernel/debug/fail_make_request/probability
318 /sys/kernel/debug/fail_make_request/reject-end
319 /sys/kernel/debug/fail_make_request/reject-start
320 /sys/kernel/debug/fail_make_request/require-end
321 /sys/kernel/debug/fail_make_request/require-start
322 /sys/kernel/debug/fail_make_request/space
323 /sys/kernel/debug/fail_make_request/stacktrace-depth
324 /sys/kernel/debug/fail_make_request/task-filter
325 /sys/kernel/debug/fail_make_request/times
326 /sys/kernel/debug/fail_make_request/verbose
328 /sys/kernel/debug/fail_page_alloc/ignore-gfp-highmem
329 /sys/kernel/debug/fail_page_alloc/ignore-gfp-wait
330 /sys/kernel/debug/fail_page_alloc/interval
331 /sys/kernel/debug/fail_page_alloc/min-order
332 /sys/kernel/debug/fail_page_alloc/probability
333 /sys/kernel/debug/fail_page_alloc/reject-end
334 /sys/kernel/debug/fail_page_alloc/reject-start
335 /sys/kernel/debug/fail_page_alloc/require-end
336 /sys/kernel/debug/fail_page_alloc/require-start
337 /sys/kernel/debug/fail_page_alloc/space
338 /sys/kernel/debug/fail_page_alloc/stacktrace-depth
339 /sys/kernel/debug/fail_page_alloc/task-filter
340 /sys/kernel/debug/fail_page_alloc/times
341 /sys/kernel/debug/fail_page_alloc/verbose
343 /sys/kernel/debug/failslab/ignore-gfp-wait
344 /sys/kernel/debug/failslab/interval
345 /sys/kernel/debug/failslab/probability
346 /sys/kernel/debug/failslab/reject-end
347 /sys/kernel/debug/failslab/reject-start
348 /sys/kernel/debug/failslab/require-end
349 /sys/kernel/debug/failslab/require-start
350 /sys/kernel/debug/failslab/space
351 /sys/kernel/debug/failslab/stacktrace-depth
352 /sys/kernel/debug/failslab/task-filter
353 /sys/kernel/debug/failslab/times
354 /sys/kernel/debug/failslab/verbose
356 when the below kernel config options are set:
358 CONFIG_FAULT_INJECTION=y
359 CONFIG_DEBUG_KERNEL=y
360 CONFIG_FAILSLAB=y (Fault-injection capability for kmalloc)
361 (CONFIG_SLAB=y || CONFIG_SLUB=y) if CONFIG_FAILSLAB=y
362 CONFIG_FAIL_PAGE_ALLOC=y (Fault-injection capabilitiy for alloc_pages())
363 CONFIG_FAIL_MAKE_REQUEST=y (Fault-injection capability for disk IO)
364 CONFIG_BLOCK=y if CONFIG_FAIL_MAKE_REQUEST=y
365 CONFIG_FAIL_IO_TIMEOUT=y (Faul-injection capability for faking disk interrupts)
366 CONFIG_BLOCK=y if CONFIG_FAIL_IO_TIMEOUT=y
367 CONFIG_FAULT_INJECTION_DEBUG_FS=y (Debugfs entries for fault-injection capabilities)
368 (CONFIG_SYSFS=y && CONFIG_DEBUG_FS=y) if CONFIG_FAULT_INJECTION_DEBUG_FS=y
369 CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y (stacktrace filter for fault-injection capabilities)
370 (CONFIG_FAULT_INJECTION_DEBUG_FS=y && CONFIG_STACKTRACE_SUPPORT=y && !CONFIG_X86_64) if
371         CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y
373 For more information on Fault injection, please refer to:
374 linux-2.6/Documentation/fault-injection/fault-injection.txt,
376 You should also have made the following entries in your /etc/fstab file
377 once the kernel is booted with the above CONFIG options set:
379 debugfs         /sys/kernel/debug/              debugfs
381 # How the Kernel Fault Injection works for LTP ?
383 1) Build Kernel with all the above possible kernel CONFIG Options,
384 2) Create the above entry in /etc/fstab file,
385 3) Reboot in the new kernel,
386 4) Goto LTPROOT. Build and Install LTP as per ltp/INSTALL file,
387 5) Choose your own test(or default) to run with fault injection as follows:
388         ./runltp -f <command_file> -F <LOOPS>,<FAULT_PROBABILITY>
390 The agorithm will work as:
391 loop (for each testcase)
392 begin
393         execute_testcase(inside_stable_kernel)
394         begin
395                 insert_fault_into_kernel()
396                 loop X Times
397                 begin
398                         execute_testcase(inside_fault_kernel)
399                 end
400                 restore_kernel_to_normal()
401         end
404 # Eternal TODOs:
405 1) Add as many framework as they get added/modifed in the kernel
406 ---------------------------------
408 ---------------------------------
409 Enabling Kernel Configuration to test ext4 new features
410 ---------------------------------
411 CONFIG_EXT4_FS=y
412 CONFIG_EXT4DEV_COMPAT=y
413 CONFIG_EXT4_FS_XATTR=y
414 CONFIG_EXT4_FS_POSIX_ACL=y
415 CONFIG_EXT4_FS_SECURITY=y
417 Beside that, the following packages are necessary.
418   e2fsprogs
419   e2fsprogs-devel
420   e2fsprogs-libs
421 And the version of packages must be 1.41.4 or above.
423 For more information to build/install/run these tests, look through:
424 ltp/testcases/kernel/fs/ext4-new-features/README
425 ---------------------------------