alaffin | 198500d | 2000-08-21 22:18:17 +0000 | [diff] [blame] | 1 | Linux Test Project |
subrata_modak | 7509b21 | 2008-08-27 13:36:52 +0000 | [diff] [blame] | 2 | (Maintained by: Subrata Modak<subrata@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 | |
alaffin | 198500d | 2000-08-21 22:18:17 +0000 | [diff] [blame] | 6 | |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 7 | About the Linux Test Project |
alaffin | 198500d | 2000-08-21 22:18:17 +0000 | [diff] [blame] | 8 | |
robbiew | 9ea3ce7 | 2001-09-18 20:38:09 +0000 | [diff] [blame] | 9 | 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] | 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 |
robbiew | 9ea3ce7 | 2001-09-18 20:38:09 +0000 | [diff] [blame] | 14 | effort. Interested open source contributors are encouraged to join the project. |
alaffin | 198500d | 2000-08-21 22:18:17 +0000 | [diff] [blame] | 15 | |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 16 | |
| 17 | In the Package |
alaffin | 198500d | 2000-08-21 22:18:17 +0000 | [diff] [blame] | 18 | -------------- |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 19 | Here is a short description of what is included in this package |
alaffin | 198500d | 2000-08-21 22:18:17 +0000 | [diff] [blame] | 20 | |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 21 | INSTALL |
| 22 | Installation documentation and quick start guide |
alaffin | 198500d | 2000-08-21 22:18:17 +0000 | [diff] [blame] | 23 | |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 24 | README |
| 25 | This document |
alaffin | 198500d | 2000-08-21 22:18:17 +0000 | [diff] [blame] | 26 | |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 27 | CREDITS |
| 28 | Credits to those who have contributed to the project. |
alaffin | 198500d | 2000-08-21 22:18:17 +0000 | [diff] [blame] | 29 | |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 30 | COPYING |
robbiew | 0eea352 | 2004-02-05 17:33:10 +0000 | [diff] [blame] | 31 | GNU General Public License |
alaffin | 198500d | 2000-08-21 22:18:17 +0000 | [diff] [blame] | 32 | |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 33 | ChangeLog |
| 34 | An incomplete list of changes to the project. We will try harder to |
| 35 | keep this up to date. |
nstraz | f307d5f | 2000-09-14 21:54:44 +0000 | [diff] [blame] | 36 | |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 37 | Makefile |
robbiew | 0eea352 | 2004-02-05 17:33:10 +0000 | [diff] [blame] | 38 | Top level make file for LTP. |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 39 | |
| 40 | runalltests.sh |
| 41 | A simple script to run all of the packaged tests in sequential order and |
robbiew | 0eea352 | 2004-02-05 17:33:10 +0000 | [diff] [blame] | 42 | report the overall result. |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 43 | |
robbiew | 9ea3ce7 | 2001-09-18 20:38:09 +0000 | [diff] [blame] | 44 | diskio.sh |
nstraz | d226d9d | 2002-01-09 23:03:50 +0000 | [diff] [blame] | 45 | A simple script to run all the diskio tests that pertain to the CD-ROM |
| 46 | and floppy disk file systems. |
robbiew | 9ea3ce7 | 2001-09-18 20:38:09 +0000 | [diff] [blame] | 47 | |
| 48 | networktests.sh |
nstraz | d226d9d | 2002-01-09 23:03:50 +0000 | [diff] [blame] | 49 | A simple script to run all the network related tests that require |
| 50 | another remote machine. |
robbiew | 9ea3ce7 | 2001-09-18 20:38:09 +0000 | [diff] [blame] | 51 | |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 52 | doc/* |
| 53 | Documentation for the project including man pages for some of the |
robbiew | ca0a7de | 2001-09-25 18:58:43 +0000 | [diff] [blame] | 54 | tools & library functions, as well as descriptions of every test. |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 55 | |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 56 | |
| 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 |
robbiew | 0eea352 | 2004-02-05 17:33:10 +0000 | [diff] [blame] | 61 | minimum. |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 62 | |
robbiew | 9ea3ce7 | 2001-09-18 20:38:09 +0000 | [diff] [blame] | 63 | testcases/* |
nstraz | d226d9d | 2002-01-09 23:03:50 +0000 | [diff] [blame] | 64 | Contains all tests that run under the LTP as well as the "bin" |
robbiew | 0eea352 | 2004-02-05 17:33:10 +0000 | [diff] [blame] | 65 | directory, which has hardlinks to all the test executables. |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 66 | |
| 67 | runtest/* |
subrata_modak | dddeb90 | 2009-05-29 10:06:08 +0000 | [diff] [blame] | 68 | It houses command lists that are used by ltp-pan for automated testing. |
robbiew | 9ea3ce7 | 2001-09-18 20:38:09 +0000 | [diff] [blame] | 69 | |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 70 | pan/* |
subrata_modak | dddeb90 | 2009-05-29 10:06:08 +0000 | [diff] [blame] | 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 |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 73 | page for more information. |
alaffin | 198500d | 2000-08-21 22:18:17 +0000 | [diff] [blame] | 74 | |
nstraz | d226d9d | 2002-01-09 23:03:50 +0000 | [diff] [blame] | 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. |
alaffin | 198500d | 2000-08-21 22:18:17 +0000 | [diff] [blame] | 79 | |
subrata_modak | 0c5f970 | 2007-04-26 11:02:47 +0000 | [diff] [blame] | 80 | testcases/kernel/containers/* |
subrata_modak | 8cd7305 | 2007-06-22 10:28:26 +0000 | [diff] [blame] | 81 | 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] | 82 | For further information on the each of the container functionality refer |
| 83 | the following file: testcases/kernel/containers/README |
| 84 | |
| 85 | |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 86 | Warning! |
| 87 | -------- |
alaffin | 198500d | 2000-08-21 22:18:17 +0000 | [diff] [blame] | 88 | Be careful with these tests! |
| 89 | |
| 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. |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 93 | |
| 94 | |
| 95 | Contact Information and Updates |
| 96 | ------------------------------- |
| 97 | |
robbiew | 9ea3ce7 | 2001-09-18 20:38:09 +0000 | [diff] [blame] | 98 | URL: http://ltp.sf.net |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 99 | |
nstraz | d226d9d | 2002-01-09 23:03:50 +0000 | [diff] [blame] | 100 | 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] | 101 | project page. |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 102 | |
subrata_modak | 23f869f | 2007-04-09 12:03:49 +0000 | [diff] [blame] | 103 | Using KDUMP test automation suite |
| 104 | --------------------------------- |
subrata_modak | 23f869f | 2007-04-09 12:03:49 +0000 | [diff] [blame] | 105 | For more information on how to use the kdump test automation suite please refer |
| 106 | to file testcases/kdump/README. |
| 107 | |
subrata_modak | 9b555d1 | 2007-08-24 09:41:59 +0000 | [diff] [blame] | 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. |
| 112 | |
subrata_modak | b8f04cd | 2008-10-24 08:24:37 +0000 | [diff] [blame] | 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 |
| 123 | |
| 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 |
| 135 | |
subrata_modak | 09be611 | 2009-03-04 07:03:41 +0000 | [diff] [blame] | 136 | The IPC namespaces do not automatically enable IPC, so you may |
| 137 | also want to have: |
| 138 | |
| 139 | CONFIG_SYSVIPC=y |
| 140 | CONFIG_SYSVIPC_SYSCTL=y |
| 141 | CONFIG_POSIX_MQUEUE=y |
subrata_modak | b8f04cd | 2008-10-24 08:24:37 +0000 | [diff] [blame] | 142 | |
| 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 |
subrata_modak | e1425aa | 2009-04-25 17:41:02 +0000 | [diff] [blame] | 153 | CONFIG_CGROUP_MEM_RES_CTLR=y |
| 154 | CONFIG_LOCKDEP=y |
subrata_modak | b8f04cd | 2008-10-24 08:24:37 +0000 | [diff] [blame] | 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 | --------------------------------- |
subrata_modak | d1ece56 | 2008-11-03 10:09:30 +0000 | [diff] [blame] | 178 | Enabling Kernel Configuration to test filecaps security feature |
| 179 | --------------------------------- |
subrata_modak | d261201 | 2009-06-02 08:06:40 +0000 | [diff] [blame] | 180 | CONFIG_SECURITY_FILE_CAPABILITIES=y |
subrata_modak | d1ece56 | 2008-11-03 10:09:30 +0000 | [diff] [blame] | 181 | --------------------------------- |
subrata_modak | a8b1aee | 2008-11-07 09:19:07 +0000 | [diff] [blame] | 182 | Enabling Kernel Configuration to test SELinux security feature |
| 183 | --------------------------------- |
| 184 | Your Kernel should have been built with the following options to |
| 185 | test SELinux: |
subrata_modak | d1ece56 | 2008-11-03 10:09:30 +0000 | [diff] [blame] | 186 | |
subrata_modak | a8b1aee | 2008-11-07 09:19:07 +0000 | [diff] [blame] | 187 | CONFIG_SECURITY=y |
| 188 | CONFIG_SECURITY_NETWORK=y |
| 189 | CONFIG_SECURITY_NETWORK_XFRM=y |
subrata_modak | a8b1aee | 2008-11-07 09:19:07 +0000 | [diff] [blame] | 190 | |
| 191 | CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0 |
| 192 | This has to be set to a positive value if you want to test this check. |
| 193 | Fedora kernels set it to 65536. |
| 194 | |
| 195 | CONFIG_SECURITY_SELINUX=y |
| 196 | CONFIG_SECURITY_SELINUX_BOOTPARAM=y |
| 197 | CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 |
| 198 | CONFIG_SECURITY_SELINUX_DEVELOP=y |
| 199 | CONFIG_SECURITY_SELINUX_AVC_STATS=y |
| 200 | CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 |
| 201 | CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y |
| 202 | |
| 203 | CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX=y |
| 204 | You don't want this one unless you are running Fedora 3 or 4. |
| 205 | On anything newer, it will cause unnecessary policy expansion. |
| 206 | |
| 207 | CONFIG_SECURITY_SMACK=y |
| 208 | CONFIG_SECURITY_SELINUX=y |
| 209 | |
| 210 | By default, if you boot with multiple LSMs compiled into the kernel, the |
| 211 | kernel won't boot succesfully - there can be only one (aside from |
| 212 | explicit internal "stacking" e.g. as is done for combining SELinux or |
| 213 | Smack with capabilities). Unless you use the security= option to select |
| 214 | one at boot. SELinux and Smack will honor the security= option. |
| 215 | --------------------------------- |
subrata_modak | 6c7dfab | 2009-03-19 07:27:04 +0000 | [diff] [blame] | 216 | --------------------------------- |
| 217 | Enabling Kernel Configuration to test SMACK security feature |
| 218 | --------------------------------- |
| 219 | CONFIG_NETLABEL=y |
| 220 | CONFIG_SECURITY=y |
| 221 | CONFIG_SECURITY_NETWORK=y |
| 222 | CONFIG_SECURITY_SMACK=y |
| 223 | CONFIG_SECURITY_SELINUX should not be set |
| 224 | |
| 225 | For more information to build/install/run these tests, look through: |
| 226 | ltp/testcases/kernel/security/smack/README |
| 227 | --------------------------------- |
| 228 | --------------------------------- |
subrata_modak | 138ce8c | 2008-11-25 13:06:58 +0000 | [diff] [blame] | 229 | Enablement for Enhancement to kexec/kdump for implementing the following features: |
| 230 | - Backup/restore memory used by the original kernel before/after kexec. |
| 231 | - Save/restore CPU state before/after kexec. |
| 232 | Now, only the i386 architecture is supported. More from the following git logs: |
| 233 | http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3ab83521378268044a448113c6aa9a9e245f4d2f, |
| 234 | http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=89081d17f7bb81d89fa1aa9b70f821c5cf4d39e9, |
| 235 | --------------------------------- |
| 236 | CONFIG_X86_32=y |
| 237 | CONFIG_RELOCATABLE=y |
| 238 | CONFIG_KEXEC=y |
| 239 | CONFIG_CRASH_DUMP=y |
| 240 | CONFIG_PM=y |
| 241 | CONFIG_HIBERNATION=y |
| 242 | CONFIG_KEXEC_JUMP=y |
| 243 | --------------------------------- |
subrata_modak | 6111aa8 | 2008-12-29 11:04:15 +0000 | [diff] [blame] | 244 | Enabling HOTPLUG for your Kernels |
| 245 | --------------------------------- |
| 246 | CONFIG_HOTPLUG=y |
| 247 | CONFIG_HOTPLUG_CPU=y |
| 248 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y |
| 249 | CONFIG_ACPI_HOTPLUG_CPU=y |
| 250 | CONFIG_HOTPLUG_PCI_PCIE=y |
| 251 | CONFIG_HOTPLUG_PCI=y |
| 252 | CONFIG_HOTPLUG_PCI_FAKE=y |
| 253 | CONFIG_HOTPLUG_PCI_COMPAQ=y |
| 254 | CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=y |
| 255 | CONFIG_HOTPLUG_PCI_IBM=y |
| 256 | CONFIG_HOTPLUG_PCI_ACPI=y |
| 257 | CONFIG_HOTPLUG_PCI_ACPI_IBM=y |
| 258 | CONFIG_HOTPLUG_PCI_CPCI=y |
| 259 | CONFIG_HOTPLUG_PCI_CPCI_ZT5550=y |
| 260 | CONFIG_HOTPLUG_PCI_CPCI_GENERIC=y |
| 261 | CONFIG_HOTPLUG_PCI_SHPC=y |
| 262 | --------------------------------- |
subrata_modak | 7a86bf3 | 2008-12-30 07:32:53 +0000 | [diff] [blame] | 263 | Video For Linux Two API testing Requirements: |
| 264 | 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: |
| 265 | -> Device Drivers |
| 266 | -> Multimedia devices |
| 267 | -> Video For Linux |
| 268 | -> Video capture adapters |
| 269 | -> Virtual Video Driver |
| 270 | |
| 271 | The tests also require CUnit Framework to be installed before compiling the tests. Download & Install the same from: |
| 272 | http://sourceforge.net/projects/cunit/ |
| 273 | --------------------------------- |
subrata_modak | 138ce8c | 2008-11-25 13:06:58 +0000 | [diff] [blame] | 274 | --------------------------------- |
subrata_modak | 250df92 | 2009-01-15 09:17:14 +0000 | [diff] [blame] | 275 | |
| 276 | Native language support (nls) testsuite requirements |
| 277 | ---------------------------------------------------- |
| 278 | CONFIG_NLS=m |
| 279 | CONFIG_BLOCK=y |
subrata_modak | fcce6dd | 2009-03-02 15:39:45 +0000 | [diff] [blame] | 280 | --------------------------------- |
| 281 | Enabling Controller area network (CAN) protocol support for your Kernels |
| 282 | --------------------------------- |
| 283 | CONFIG_NET=y |
| 284 | CONFIG_CAN=m |
| 285 | CONFIG_CAN_RAW=m |
| 286 | CONFIG_CAN_BCM=m |
| 287 | # CAN Device Drivers |
| 288 | CONFIG_CAN_VCAN=m |
| 289 | --------------------------------- |
| 290 | |