Open-source project
linux-test-project/ltp avatar
linux-test-project/ltp

Linux Test Project (LTP): A Kernel Test Suite You Build From Source

Linux Test Project (mailing list: https://lists.linux.it/listinfo/ltp)

2,600 stars1,126 forksCGPL-2.0

At a glance

What is it?
LTP is a C test suite from SGI, OSDL and Bull that validates Linux kernel reliability, built and run from a Git checkout rather than installed from a package. It is aimed at kernel and distribution engineers, and the README explicitly warns against running it on production systems.
Who is it for?
Adopt LTP if you build or ship a Linux kernel and need a repeatable pass/fail signal across syscalls, POSIX behaviour and I/O stress, on a machine you can afford to disturb. Do not adopt it as a general application test framework, and do not run it on a host carrying data you care about; the README states LTP tests should not run in production systems and that growfiles, doio and iogen are intended to find or cause problems.
Can I use it commercially?
Yes, with conditions. GPL-2.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly C, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What LTP actually covers, and who the suite is written for

LTP is a collection of tools for testing the Linux kernel and related features, started as a joint project by SGI, OSDL and Bull and developed and maintained by SUSE, Red Hat, Fujitsu, IBM, Cisco, Oracle and others. The stated goal is to deliver tests to the open source community that validate the reliability, robustness and stability of the Linux kernel, and to improve the kernel and system libraries by bringing test automation. That framing matters more than it looks. This is not a unit test framework you point at your own code. It is a body of tests aimed at the kernel and at libc, organised so that a failure means the kernel or the system libraries did something the test did not expect.

The audience follows from that. Kernel developers, distribution maintainers and hardware or platform teams use it to check that a build behaves as expected across syscalls, POSIX semantics and I/O paths. Topics listed for the repository include c, libc, linux, linux-kernel, linux-test, ltp, posix, syscalls, test-automation and unix, which is a fair summary of the ground covered. If you are writing a web service and want integration tests, none of this applies to you.

The README carries a warning that deserves to be read before anything else: LTP tests should not run in production systems, and in particular growfiles, doio and iogen stress the I/O capabilities of the systems and are intended to find or cause problems. A suite whose purpose is to provoke failures will provoke them. Treat any machine you run it on as disposable, or at least as a machine whose filesystems you are willing to lose.

How the test tree is organised and how a run is assembled

The repository layout tells you most of the mechanism. At the top level you find runltp, runtest/, testcases/, lib/, libs/, include/, tools/, utils/, scripts/, metadata/, doc/ and testscripts/, alongside the usual build files: Makefile, configure.ac, build.sh, INSTALL, VERSION and COPYING. The split between runltp and runtest/ is the part worth understanding. runtest/ holds scenario files, plain lists that name test binaries and their arguments. runltp is the driver that reads a scenario and executes the entries in it. testcases/ holds the C sources that get compiled into those binaries, grouped by area.

The top-level Makefile is a recursive build. It sets LC_COLLATE and LC_NUMERIC to C and unsets LC_ALL, then includes include/mk/env_pre.mk and include/mk/automake.mk, and defines target classes such as COMMON_TARGETS (utils, testcases, tools, metadata), INSTALL_TARGETS and CLEAN_TARGETS. Those target lists are what drive the per-directory recursion, and the runtest and testscripts directories are only added to the install and clean targets when the build is not an in-tree install. That conditional is the reason a build tree and a source tree can coexist without the build step overwriting the scenario files you are editing.

There is also a metadata/ directory at the top level, which sits alongside the test sources rather than inside them. The practical consequence is that a test's description and its C implementation are not in the same place, so when you go looking for what a given test asserts, you may need to check both the testcases path and the metadata entry. The README does not explain the metadata format, and the documentation site is the place to look for it.

Building LTP from a Git checkout and running a first scenario

LTP is distributed as source. The README points at the Releases page on GitHub and at the documentation site, and the repository ships build.sh, configure.ac and INSTALL rather than a package manifest for a language package manager. The build is the standard autotools shape. From the top of the checkout, build.sh bootstraps and configures:

bash
./build.sh

After that finishes you have a configured tree. The build itself is driven by the top-level Makefile, which recurses into the target directories listed in COMMON_TARGETS and INSTALL_TARGETS:

bash
make

To place the built tests and the runltp driver under a prefix, use the install target. The Makefile's install target list includes runtest and testscripts, which is what makes the scenario files available next to the binaries:

bash
make install

With the tree built, runltp is the entry point, and it is listed as a top-level entry in the repository. It reads a scenario file from runtest/ and executes the tests named in it. The README does not print a runltp invocation, so read the documentation site and the files under runtest/ before starting a run. A scenario file is a list of test names and arguments, and running the whole set on a machine you use for anything else is exactly the situation the README's production warning is about. Start with a single scenario that matches the subsystem you care about, and run it on a host or virtual machine you can rebuild.

The production warning is a real constraint, not boilerplate

Most projects put a warning in the README that nobody reads. This one is load-bearing. The suite includes I/O stress tools, and the README names three of them, growfiles, doio and iogen, describing them as stressing the I/O capabilities of the systems and as intended to find or cause problems. A test that is designed to cause problems will, on some fraction of runs, cause them. That is the point, but it means LTP is the wrong tool for any host whose state you need to preserve.

The second limitation is scope. LTP tests the kernel and system libraries. It does not test your application, your configuration management, or your container images. Teams sometimes reach for it as a general smoke test after a kernel upgrade, and that is a reasonable use, but the pass/fail signal is about kernel behaviour, not about whether your services came back up.

The third is that a full run is long and environment-sensitive. The repository includes ver_linux and IDcheck.sh at the top level, which suggests the project expects you to check the environment and the identity the tests run under before trusting results. The README does not document how to resume an interrupted run or how to roll back a partially completed scenario, so plan for a run to complete or be restarted from the beginning. Nothing in the README describes a rollback mechanism, and you should not assume one exists.

How LTP differs from kselftest and from generic CI test runners

The nearest alternative in the kernel world is kselftest, which lives in the kernel source tree itself and is built and run from the kernel's own Makefile. The difference in approach is where the tests live and what that implies. kselftest moves with the kernel version you are building, so a test and the code it exercises are always from the same commit. LTP lives in its own repository with its own release cadence, so you can point a current LTP at an older kernel, or an older LTP at a current kernel. That decoupling is useful when you want a stable test baseline across kernel versions, and it is a hazard when a test assumes a kernel interface that your build does not have.

The other comparison is with a general CI test runner such as a Python or Go test harness. Those give you fixtures, parallelism and structured reports for your own code. LTP gives you compiled C binaries and scenario files, and its reporting is oriented toward pass, fail and skip per test case. If you need rich per-test metadata and machine-readable reports for a dashboard, check what the metadata/ directory and the documentation site provide before assuming the output will fit your pipeline. The README does not describe a JSON or JUnit output mode.

Releases, upgrade cost and the GPL-2.0 licence

LTP ships dated releases. The recent ones are 20260529 published on 2026-05-29, 20260130 on 2026-01-30, and 20250930 on 2025-09-30. The naming is the date, which makes it easy to tell how far behind a pinned copy is. The last push to the default branch was on 2026-09-23.

Upgrade cost is the interesting part. Because the tests are compiled C that links against your libc, a new LTP release can fail to build on an older distribution, and a test that passed on the previous release can start failing because the test itself changed rather than because the kernel regressed. Pin a release tag if you need a stable baseline, and read the release notes before moving the pin. The repository also carries a Containerfile and a ci/ directory, which suggests a container-based build path exists for environments where installing the full toolchain on the host is undesirable; the README does not walk through it.

The licence is GPL-2.0, declared in COPYING and marked in the README with an SPDX-License-Identifier of GPL-2.0-or-later. Running the tests does not impose obligations on your own code. Copying test sources into your own repository is a different matter, and the terms of the GPL apply to the copied files. This is a description of what the repository states, not legal advice; if you plan to redistribute a modified test, talk to whoever handles licensing where you work.

Editorial conclusion

Adopt LTP if you build or ship a Linux kernel and need a repeatable pass/fail signal across syscalls, POSIX behaviour and I/O stress, on a machine you can afford to disturb. Do not adopt it as a general application test framework, and do not run it on a host carrying data you care about; the README states LTP tests should not run in production systems and that growfiles, doio and iogen are intended to find or cause problems. Before you commit, verify three things: that your toolchain and glibc satisfy what configure.ac checks for, that the runtest scenario you intend to run actually exercises the subsystem you changed, and whether your organisation is comfortable with GPL-2.0 obligations for any test you copy into your own tree rather than run from the checkout.

Frequently asked questions

Did Linus Torvalds create the Linux kernel?

The README does not address the history of the Linux kernel itself. It describes LTP as a joint project started by SGI, OSDL and Bull and now developed and maintained by SUSE, Red Hat, Fujitsu, IBM, Cisco, Oracle and others.

Is it legal to edit the Linux kernel?

The README does not discuss the legality of editing the kernel. It states that LTP is licensed GPL-2.0, declared in COPYING and marked with an SPDX-License-Identifier of GPL-2.0-or-later.

Who is the CEO of Linux Foundation?

The README does not mention the Linux Foundation or its officers. It lists the organisations behind LTP as SGI, OSDL, Bull, SUSE, Red Hat, Fujitsu, IBM, Cisco and Oracle.

What is the test command in Linux?

The README does not document a shell test command. For LTP, the runltp driver is the entry point: it reads a scenario file from runtest/ and executes the tests listed in it, and both runltp and runtest/ are top-level entries in the repository.

Official sources

  1. License: GPL-2.0
  2. linux-test-project/ltp on GitHub
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/linux-test-project-ltp.svg)](https://hysenlabs.com/projects/linux-test-project-ltp)