with one click
ltp-analyze
LTP Test Analyzer - evaluate test quality, robustness, and coverage
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
LTP Test Analyzer - evaluate test quality, robustness, and coverage
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Load anytime the working directory is a Linux Test Project (LTP) tree, and always load it when you answer questions or edit code inside an LTP tree. LTP conventions, rules, test structure, review, analysis, and old-to-new API conversion. Read this anytime you operate on LTP code.
LTP Patch Reviewer - perform reviews on patches
LTP Old-to-New API Converter
| name | ltp-analyze |
| description | LTP Test Analyzer - evaluate test quality, robustness, and coverage |
You are an agent that performs a deep analysis of an LTP test to evaluate its quality, robustness, and coverage. This skill works on any LTP test (old API, new API or shell) and it's read-only: analyze and report only, do not modify any files.
The goal is to answer: Is this test effective, and how can it be improved?
/ltp-analyze <file path or test name>
The argument may be a file path or a test name. Resolve it first:
getpid01): locate the source under testcases/
(search by basename). If multiple or no matches are found, ask the user
to disambiguate or provide a path, then stop.Read {{LTP_AGENT_DIR}}/rules/classify.md and classify the file. Then read
these files according to the file type:
{{LTP_AGENT_DIR}}/rules/c-tests.md,
{{LTP_AGENT_DIR}}/rules/ground-rules.md, and
{{LTP_AGENT_DIR}}/rules/documentation.md (sections 4-6 for the
high-level description block and kernel-doc comments).{{LTP_AGENT_DIR}}/rules/shell-tests.md and
{{LTP_AGENT_DIR}}/rules/ground-rules.md.{{LTP_AGENT_DIR}}/rules/openposix.md and
{{LTP_AGENT_DIR}}/rules/ground-rules.md.If the file cannot be classified, stop and tell the user why.
Answer each question, ignoring the source's API-level and framework details:
exit(1), parent waits, checks WEXITSTATUS == 1").Evaluate the test on these dimensions and flag any concerns:
Flag tests that do not meaningfully exercise the target feature:
fork()/wait() rather
than the nominal target).Check whether other tests in the same directory or runtest/ file already
cover the same behavior with better rigor:
Flag tests that exercise libc string functions, userspace-only logic, or
other things that are not kernel functionality when placed under kernel
test directories (e.g., string01.c tests strchr, strcmp, etc. under
testcases/kernel/).
Flag tests where the code is hundreds of lines but the actual kernel feature coverage is minimal. These may benefit from being rewritten with a simpler, more focused approach.
Evaluate the test's resilience to real-world conditions:
tst_brk() or a SAFE_* macro aborts mid-test, will cleanup still
release everything?#ifdef for feature detection where runtime detection
should be used?-i N (multiple iterations), does the test re-initialize
all state correctly?Identify what the test does NOT cover that it probably should:
Based on the syscall's man page and kernel implementation, list scenarios that are not tested but should be:
Flag cases where the test only checks the return value but not the side-effects:
Identify edge cases that could reveal kernel bugs:
Check compliance with the loaded rules ({{LTP_AGENT_DIR}}/rules/c-tests.md).
This is NOT a full patch review - it is a health check:
.save_restore,
manual option parsing vs framework options, manual tmpdir vs
.needs_tmpdir)SAFE_*?struct tcase + .test + .tcnt, or separate functions?Present the complete analysis to the user in this format:
tst_test.h) / old (test.h) / shell / N/Aruntest/<file> or MISSINGSummary from Step 2 - what the test does and how.
One of:
One of:
Numbered list of missing scenarios, side-effect checks, and edge cases from Step 5. For each gap, briefly explain what it would catch.
List of compliance findings from Step 6, if any. Mark each as:
Prioritized list of concrete actions to improve the test, from most impactful to least. Each recommendation should be actionable (not "improve coverage" but "add a test case for EINVAL when fd is negative").