# linux-test-project/ltp architecture

> Architecture diagram of the GitHub repository linux-test-project/ltp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/linux-test-project/ltp
- Repository: https://github.com/linux-test-project/ltp

## Overview

Linux Test Project (LTP) is a collection of tests and supporting libraries for checking Linux kernel reliability, robustness, and stability. The principal workflow is an operator running a test suite, which exercises a kernel or system interface and reports a result. The graph preserves major test domains and shared runtime support, including the indexed core modules. Source excerpts are limited, so most suite-to-kernel links reflect the README’s documented purpose; subsystem internals not evidenced by excerpts or indexed references are not connected.

Main entry points: [`testcases/realtime/func/async_handler/async_handler.c`](https://github.com/linux-test-project/ltp/blob/master/testcases/realtime/func/async_handler/async_handler.c) (Realtime tests), [`testcases/kernel/controllers`](https://github.com/linux-test-project/ltp/tree/master/testcases/kernel/controllers) (Controller tests), [`testcases/kernel/containers`](https://github.com/linux-test-project/ltp/tree/master/testcases/kernel/containers) (Container tests), [`testcases/kernel/fs`](https://github.com/linux-test-project/ltp/tree/master/testcases/kernel/fs) (Filesystem tests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_suites["Kernel test suites"]
  node_containers["Container tests"]
  node_controllers["Controller tests"]
  node_filesystem["Filesystem tests"]
  node_devices["Device tests"]
  node_crypto["Crypto tests"]
  node_network["Network tests"]
  node_cve["CVE tests<br/>[sctphantom.c]"]
  node_posix["POSIX tests"]
  node_realtime["Realtime tests<br/>[async_handler.c]"]
end

subgraph group_framework["Test framework"]
  node_test_api["Test API<br/>[tst_test_macros.h]"]
  node_safe_syscalls["Safe syscalls<br/>[tso_safe_macros.h]"]
  node_fuzzy_sync["Fuzzy synchronization<br/>[tst_fuzzy_sync.h]"]
  node_io_stress["LIO operations<br/>[tlibio.c]"]
  node_controller_lib["Controller helpers<br/>[libcontrollers.c]"]
  node_include_safe_macros_fn["Safe macro functions<br/>[safe_macros_fn.h]"]
end

subgraph group_specialized["Specialized libraries"]
  node_realtime_lib["Realtime support<br/>[librttest.c]"]
  node_realtime_stats["Latency statistics<br/>[libstats.h]"]
  node_sigwait["Signal wait library<br/>[tse_sigwait.c]"]
  node_ujson_reader["JSON reader<br/>[ujson_reader.c]"]
  node_ujson_writer["JSON writer<br/>[ujson_writer.c]"]
end

subgraph group_utilities["Supporting utilities"]
  node_net_vars["Network variables<br/>[tst_net_vars.c]"]
  node_metadata["Test metadata<br/>[metaparse.c]"]
end

node_operator(("Test operator"))
node_kernel["Linux kernel"]

node_operator -->|"runs tests"| node_containers
node_operator -->|"runs tests"| node_controllers
node_operator -->|"runs tests"| node_filesystem
node_operator -->|"runs tests"| node_devices
node_operator -->|"runs tests"| node_crypto
node_operator -->|"runs tests"| node_network
node_operator -->|"runs tests"| node_cve
node_operator -->|"runs tests"| node_posix
node_operator -->|"runs tests"| node_realtime
node_containers -.->|"validates behavior"| node_kernel
node_controllers -.->|"validates behavior"| node_kernel
node_filesystem -.->|"validates behavior"| node_kernel
node_devices -.->|"validates behavior"| node_kernel
node_crypto -.->|"validates behavior"| node_kernel
node_network -.->|"validates behavior"| node_kernel
node_cve -.->|"validates behavior"| node_kernel
node_posix -.->|"validates behavior"| node_kernel
node_realtime -.->|"validates behavior"| node_kernel
node_controllers -->|"uses helpers"| node_controller_lib
node_realtime -->|"uses support"| node_realtime_lib
node_realtime -->|"uses statistics"| node_realtime_stats
node_realtime -.->|"uses synchronization"| node_fuzzy_sync
node_realtime -.->|"uses test API"| node_test_api
node_safe_syscalls -->|"wraps calls"| node_include_safe_macros_fn

click node_containers "https://github.com/linux-test-project/ltp/tree/master/testcases/kernel/containers"
click node_controllers "https://github.com/linux-test-project/ltp/tree/master/testcases/kernel/controllers"
click node_filesystem "https://github.com/linux-test-project/ltp/tree/master/testcases/kernel/fs"
click node_devices "https://github.com/linux-test-project/ltp/tree/master/testcases/kernel/device-drivers"
click node_crypto "https://github.com/linux-test-project/ltp/tree/master/testcases/kernel/crypto"
click node_network "https://github.com/linux-test-project/ltp/tree/master/testcases/network"
click node_cve "https://github.com/linux-test-project/ltp/blob/master/testcases/cve/sctphantom.c"
click node_posix "https://github.com/linux-test-project/ltp/tree/master/testcases/open_posix_testsuite"
click node_realtime "https://github.com/linux-test-project/ltp/blob/master/testcases/realtime/func/async_handler/async_handler.c"
click node_test_api "https://github.com/linux-test-project/ltp/blob/master/include/tst_test_macros.h"
click node_safe_syscalls "https://github.com/linux-test-project/ltp/blob/master/include/old/tso_safe_macros.h"
click node_fuzzy_sync "https://github.com/linux-test-project/ltp/blob/master/include/tst_fuzzy_sync.h"
click node_io_stress "https://github.com/linux-test-project/ltp/blob/master/lib/tlibio.c"
click node_controller_lib "https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/controllers/libcontrollers/libcontrollers.c"
click node_realtime_lib "https://github.com/linux-test-project/ltp/blob/master/testcases/realtime/lib/librttest.c"
click node_realtime_stats "https://github.com/linux-test-project/ltp/blob/master/testcases/realtime/include/libstats.h"
click node_sigwait "https://github.com/linux-test-project/ltp/blob/master/libs/sigwait/tse_sigwait.c"
click node_ujson_reader "https://github.com/linux-test-project/ltp/blob/master/libs/ujson/ujson_reader.c"
click node_ujson_writer "https://github.com/linux-test-project/ltp/blob/master/libs/ujson/ujson_writer.c"
click node_net_vars "https://github.com/linux-test-project/ltp/blob/master/testcases/lib/tst_net_vars.c"
click node_metadata "https://github.com/linux-test-project/ltp/blob/master/metadata/metaparse.c"
click node_include_safe_macros_fn "https://github.com/linux-test-project/ltp/blob/master/include/safe_macros_fn.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_containers,node_controllers,node_filesystem,node_devices,node_crypto,node_network,node_cve,node_posix,node_realtime toneBlue
class node_test_api,node_safe_syscalls,node_fuzzy_sync,node_io_stress,node_controller_lib,node_include_safe_macros_fn toneAmber
class node_realtime_lib,node_realtime_stats,node_sigwait,node_ujson_reader,node_ujson_writer toneMint
class node_net_vars,node_metadata toneRose
class node_operator,node_kernel toneIndigo
```

## Components

### Kernel test suites

- [Container tests](https://github.com/linux-test-project/ltp/tree/master/testcases/kernel/containers): `testcases/kernel/containers`
- [Controller tests](https://github.com/linux-test-project/ltp/tree/master/testcases/kernel/controllers): `testcases/kernel/controllers`
- [Filesystem tests](https://github.com/linux-test-project/ltp/tree/master/testcases/kernel/fs): `testcases/kernel/fs`
- [Device tests](https://github.com/linux-test-project/ltp/tree/master/testcases/kernel/device-drivers): `testcases/kernel/device-drivers`
- [Crypto tests](https://github.com/linux-test-project/ltp/tree/master/testcases/kernel/crypto): `testcases/kernel/crypto`
- [Network tests](https://github.com/linux-test-project/ltp/tree/master/testcases/network): `testcases/network`
- [CVE tests](https://github.com/linux-test-project/ltp/blob/master/testcases/cve/sctphantom.c): `testcases/cve/sctphantom.c`
- [POSIX tests](https://github.com/linux-test-project/ltp/tree/master/testcases/open_posix_testsuite): `testcases/open_posix_testsuite`
- [Realtime tests](https://github.com/linux-test-project/ltp/blob/master/testcases/realtime/func/async_handler/async_handler.c): `testcases/realtime/func/async_handler/async_handler.c`

### Test framework

- [Test API](https://github.com/linux-test-project/ltp/blob/master/include/tst_test_macros.h): `include/tst_test_macros.h`
- [Safe syscalls](https://github.com/linux-test-project/ltp/blob/master/include/old/tso_safe_macros.h): `include/old/tso_safe_macros.h`
- [Fuzzy synchronization](https://github.com/linux-test-project/ltp/blob/master/include/tst_fuzzy_sync.h): `include/tst_fuzzy_sync.h`
- [LIO operations](https://github.com/linux-test-project/ltp/blob/master/lib/tlibio.c): `lib/tlibio.c`
- [Controller helpers](https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/controllers/libcontrollers/libcontrollers.c): `testcases/kernel/controllers/libcontrollers/libcontrollers.c`
- [Safe macro functions](https://github.com/linux-test-project/ltp/blob/master/include/safe_macros_fn.h): `include/safe_macros_fn.h`

### Specialized libraries

- [Realtime support](https://github.com/linux-test-project/ltp/blob/master/testcases/realtime/lib/librttest.c): `testcases/realtime/lib/librttest.c`
- [Latency statistics](https://github.com/linux-test-project/ltp/blob/master/testcases/realtime/include/libstats.h): `testcases/realtime/include/libstats.h`
- [Signal wait library](https://github.com/linux-test-project/ltp/blob/master/libs/sigwait/tse_sigwait.c): `libs/sigwait/tse_sigwait.c`
- [JSON reader](https://github.com/linux-test-project/ltp/blob/master/libs/ujson/ujson_reader.c): `libs/ujson/ujson_reader.c`
- [JSON writer](https://github.com/linux-test-project/ltp/blob/master/libs/ujson/ujson_writer.c): `libs/ujson/ujson_writer.c`

### Supporting utilities

- [Network variables](https://github.com/linux-test-project/ltp/blob/master/testcases/lib/tst_net_vars.c): `testcases/lib/tst_net_vars.c`
- [Test metadata](https://github.com/linux-test-project/ltp/blob/master/metadata/metaparse.c): `metadata/metaparse.c`

### Other components

- **Test operator**
- **Linux kernel**

## Connections

- Test operator → Container tests: runs tests
- Test operator → Controller tests: runs tests
- Test operator → Filesystem tests: runs tests
- Test operator → Device tests: runs tests
- Test operator → Crypto tests: runs tests
- Test operator → Network tests: runs tests
- Test operator → CVE tests: runs tests
- Test operator → POSIX tests: runs tests
- Test operator → Realtime tests: runs tests
- Container tests → Linux kernel: validates behavior
- Controller tests → Linux kernel: validates behavior
- Filesystem tests → Linux kernel: validates behavior
- Device tests → Linux kernel: validates behavior
- Crypto tests → Linux kernel: validates behavior
- Network tests → Linux kernel: validates behavior
- CVE tests → Linux kernel: validates behavior
- POSIX tests → Linux kernel: validates behavior
- Realtime tests → Linux kernel: validates behavior
- Controller tests → Controller helpers: uses helpers (evidence: `testcases/kernel/controllers/libcontrollers/libcontrollers.c`)
- Realtime tests → Realtime support: uses support (evidence: `testcases/realtime/func/async_handler/async_handler.c`)
- Realtime tests → Latency statistics: uses statistics (evidence: `testcases/realtime/func/async_handler/async_handler.c`)
- Realtime tests → Fuzzy synchronization: uses synchronization
- Realtime tests → Test API: uses test API
- Safe syscalls → Safe macro functions: wraps calls (evidence: `include/old/tso_safe_macros.h`)
