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