AI agent configuration for reviewing, converting, and testing Linux Test Project patches.
Supported AI coding agents:
-
Clone this repository and install the skills for your agent:
git clone <this-repo-url> ltp-agent ./ltp-agent/setup.sh <agent>
<agent>is one of:claude,pi,opencode,gemini,copilot. The skills are copied into the agent's native skill directory. The LTP source tree is not touched. -
Clone the LTP source tree:
git clone --recurse-submodules https://github.com/linux-test-project/ltp.git
-
Start your AI coding agent from the LTP directory. The skills are discovered automatically from their installed location.
With the patches applied into your development branch, invoke the review skill inside your agent:
/ltp-review
This performs a deep code review against all LTP rules and writes the resulting
inline email reply to review-inline.txt at the LTP tree root.
To perform a deep, read-only analysis of an LTP test (quality, robustness, and coverage):
/ltp-analyze <file path or test name>
The skill works on any LTP test (old API, new API, or shell). It produces a report covering test intent, value, robustness, coverage gaps, API/style compliance, and prioritized recommendations. No files are modified.
To convert a test from the legacy test.h API to the modern tst_test.h API:
/ltp-convert
The agent will analyze the old test, show a conversion plan, rewrite it using the new API.
Note
Converted test is just a draft, most of the times the developer will need to update the test by hand.
To find candidates for conversion, scan the tree with:
python3 ltp-agent/tools/scan-old-api.py --root-dir <ltp directory>The rules/ directory contains rule files that the agent loads on demand
based on the task:
| File | Description |
|---|---|
ground-rules.md |
Mandatory rules for all LTP code. |
c-tests.md |
Rules for LTP C tests. |
shell-tests.md |
Rules for LTP shell tests. |
openposix.md |
Rules for Open POSIX Test Suite. |
classify.md |
Classify rules for LTP files. |
commit-message.md |
Rules for LTP commit messages. |
build-system.md |
Rules for LTP Makefiles and build system. |
documentation.md |
Rules for LTP Sphinx docs and doc-comments. |
false-positive-guide.md |
Verification checklist applied after review. |
email-template.md |
Complete format of a review reply email. |
The .github/workflows/ci-copilot-review.yml workflow runs /ltp-review
automatically against LTP Patchwork series using GitHub Copilot CLI, posts
the verdict back to Patchwork as a check, and (if SMTP credentials are
configured) sends the inline review to the mailing list as a reply to the
original submission. It is triggered manually by series ID via
workflow_dispatch.
- LTP documentation: https://linux-test-project.readthedocs.io/
- LTP source code: https://github.com/linux-test-project/ltp
- LTP mailing list: https://lore.kernel.org/ltp/
- Patchwork: https://patchwork.ozlabs.org/project/ltp/list/
- Kirk test runner: https://github.com/linux-test-project/kirk
This project is licensed under the GNU General Public License v2.0 or later. See COPYING for the full license text.