Skip to content

linux-test-project/ltp-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

198 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LTP Agent

AI agent configuration for reviewing, converting, and testing Linux Test Project patches.

Supported AI coding agents:

Setup

  1. 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.

  2. Clone the LTP source tree:

    git clone --recurse-submodules https://github.com/linux-test-project/ltp.git
  3. Start your AI coding agent from the LTP directory. The skills are discovered automatically from their installed location.

Usage

Reviewing a Patch

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.

Analyzing a Test

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.

Converting Old Tests to New API

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>

Rule Files

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.

Continuous Integration

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.

Additional Resources

License

This project is licensed under the GNU General Public License v2.0 or later. See COPYING for the full license text.

About

Linux Test Project Agent configuration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors